Eventsub webhook_secret verification fixes

Pull request summary
Fix #366 eventsub webhook_secret verification bug.
Make eventsub callback more robust (missing signature/timestamp headers).
Add additional logging; fix log message spelling errors.
Checklist

[x] If code changes were made then they have been tested.

[ ] I have updated the documentation to reflect the changes.
[ ] I have updated the changelog with a quick recap of my changes.

[x] This PR fixes an issue.
[ ] This PR adds something new (e.g. new method or parameters).
[ ] This PR is a breaking change (e.g. methods or parameters removed/renamed)
[ ] This PR is not a code change (e.g. documentation, README, ...)

Please update the changelog

I'm confused what these changes are fixing, other than the early return? Can you elaborate, as these fields that are being try/except'ed are not optional. They are required to perform a validation of the message, and if they don't exist, the client should error out, as further processing is a waste of processing power

Thanks for your review @IAmTomahawkx :)

... if they don't exist, the client should error out ...

Right, but it should do that gracefully!
My argument is that if those fields don't exist (or really if anything about the received http request is unsatisfactory), that the TwitchIO client should handle that situation by gracefully returning an http error.  But that's not what happens.  What happens is that the TwitchIO client crashes with a traceback like the following, and fails to return any http error.
$ twitch -F "$CALLBACK_URL" event trigger follow    # <- note the lack of "-s webhook_secret"

05:19:28 ERROR    aiohttp.server       Error handling request
Traceback (most recent call last):
  File ".../aiohttp/web_protocol.py", line 435, in _handle_request
    resp = await request_handler(request)
  File ".../aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File ".../twitchio/ext/eventsub/server.py", line 238, in _callback
    event = _message_types[typ](self, payload, request)
  File ".../twitchio/ext/eventsub/models.py", line 104, in __init__
    self.headers = Headers(request)
  File ".../twitchio/ext/eventsub/models.py", line 78, in __init__
    self.signature: str = request.headers["Twitch-Eventsub-Message-Signature"]
KeyError: 'Twitch-Eventsub-Message-Signature'

My commit eventsub: handle message with missing signature/timestamp fixes that specific condition.  Instead of crashing, the request gets processed (with an empty signature and timestamp strings) and then properly rejected later by the .valid() call -- and that allows for the proper http error to be returned.
However, after thinking about this further I'd argue that all of the accesses of "presumed" request.headers in _ _ init _ _() are really just as bad.  It is undesirable that ANY malformed incoming http request should be able to crash TwitchIO.  A better solution (than my proposed commit) would be to ensure that init() can't ever crash due to a malformed request by (1) actually checking for the presence of all presumed and required header fields and (2) doing that outside of init() but before the call to .valid() --  where we can properly return the suitable http error.
If you'd like to drop eventsub: handle message with missing signature/timestamp from this PR (or would like me to), I'll submit a separate one to address it as described.  Note though that it is important to apply the fix for #366 before fixing this crash, or else "no-webhook-secret" messages will actually slip past any validation!

I believe the majority of this PR is solely for a CLI isolated scenario.
In my opinion the only worthwhile portion is the != 200: return  to stop potential event invocations.
Those headers are always present when a message is received from Twitch.
You will also receive a failed response from Twitch if you try and sub with an empty string or less than 10 character string and the lib shows that error message when attempting this, so you are extremely unlikely to receive a response back with the challenge as an empty string, but the return is still good to implement.

The correct place to handle that is the server callback, a simple try except while constructing the object would suffice, as if anything goes wrong while constructing the entire thing is a throwaway. As for the missing fields from using twitchCLI, that's a twitchcli issue, not a lib issue. an error doesnt actually crash aiohttp, it just produces a noisy traceback and returns a 500 error. The traceback may not be ideal but the 500 is fine for our usecase.

In my opinion the only worthwhile portion is the != 200: return to stop potential event invocations.

Feel free to apply just the first commit, which implements only that #366 fix, and close this PR.

closed in 64f3fb7


feat: implement ddev pull upsun provider integration, fixes #5446

The Issue

#5446

How This PR Solves The Issue
Adds integration for Upsun.
Manual Testing Instructions
Docs are here https://ddev--5529.org.readthedocs.build/en/5529/users/providers/upsun/
Try ddev pull upsun in Upsun project
Try ddev push upsun
Automated Testing Overview
TestUpsunPull and TestUpsunPush.

Related Issue Link(s)
Release/Deployment Notes

ddev-windows-mutagen isn't supposed to run on PRs...  I guess it's because you did this PR on ddev org. And of course it's irrelevant to this PR.  But TestUpsunPull/Push worked, yay, https://github.com/ddev/ddev/actions/runs/6829336445/job/18575278444?pr=5529

Multiple databases does not yet work, because upsun relationships has a different structure than platform relationships.
To configure multiple databases in upsun you need to have them configured in the .upsun/config.yaml:
services:
  mariadb:
    type: mariadb:10.6
    configuration:
      schemas:
        - main
        - junk
      endpoints:
        mysql:
          default_schema: main
          privileges:
            main: admin
            junk: admin

upsun relationships looks like this:
mariadb:
    -
        host: mariadb.internal
        hostname: 2jins5mtttge2mfrfdcxkxkpte.mariadb.service._.ca-1.platformsh.site
        cluster: 47kohks3azo5c-main-bvxea6i
        service: mariadb
        rel: mysql
        scheme: mysql
        username: mysql
        password: 365d3d4b06cdf5173da0bf86008de9bf
        port: 3306
        epoch: 0
        path: main
        query:
            is_master: true
        fragment: null
        public: false
        host_mapped: false
        type: 'mariadb:10.6'
        ip: <IP_ADDRESS>
        url: 'mysql://mysql:365d3d4b06cdf5173da0bf86008de9bf@mariadb.internal:3306/main'

But platform relationships lists the databases (path):
database:
    -
        username: user
        fragment: null
        ip: <IP_ADDRESS>
        cluster: 5bviezdszcmrg-platform-pull-7tsp6cq
        host: database.internal
        path: main
        query:
            is_master: true
        password: ‘’
        port: 3306
        host_mapped: false
        service: db
        hostname: jzglbn36ugubmwptswhuwv62sm.db.service._.ca-1.platformsh.site
        epoch: 0
        rel: mysql
        scheme: mysql
        type: ‘mariadb:10.4’
        public: false
        url: ‘mysql://user:@database.internal:3306/main’

I guess the difference is the key, database as opposed to mariadb ?

I guess the logic in https://github.com/ddev/ddev/blob/a0e022ec9a50fd6de204a07d8c60d2c75b532001/pkg/ddevapp/dotddev_assets/providers/platform.yaml#L54-L57 is inadequate for upsun.
It's worth a little effort to fix it, or we can just say "only one db for now"

I will look into it tomorrow, and if I can't figure it out quickly, we can proceed with "only one db for now".

So far I haven't found a good way to list the databases provided. Have questions going in slack. You don't need to fiddle with it until they reply. thanks!

Rebased, but didn't re-push. This will need to be re-pushed before it's merged.

I updated the ddev-webserver image.


refactor: remove level from doc-style action

While asking for an update in vale-action, I discovered that level is no longer an input of this action, see https://github.com/errata-ai/vale-action/commit/c4213d4de3d5f718b8497bd86161531c78992084.
I've opened an issue to update the version of reviewdog in vale-action. If this occurs, vale-action could leverage the new feature fail-level which could lead to level being added back. However, this is just an issue and I don't know what the maintainer will decide, see https://github.com/errata-ai/vale-action/issues/131 for more information.
In the mean time, I propose we remove this misleading input which gave me the impression that we could chose the level on which the action will fail.

Can't we wait to see what the vale maintainer decides? I wouldn't want to duplicate efforts on this.

Can't we wait to see what the vale maintainer decides? I wouldn't want to duplicate efforts on this.

Agreed. Let's leave this in draft for the moment until Vale and Reviewdog take a final decission.
Thanks for noticing this unused input parameter, Sebastien.

Can't we wait to see what the vale maintainer decides? I wouldn't want to duplicate efforts on this.

Agreed. Let's leave this in draft for the moment until Vale and Reviewdog take a final decission.
Thanks for noticing this unused input parameter, Sebastien.

I'll work on vale-action to add this feature. The maintainer doesn't seem to be opposed to adding a fail-level !

What's the status here @SMoraisAnsys?

What's the status here @SMoraisAnsys?

I didn't have time to work on the vale action and probably won't be able to work on it next week either. If you want to handle the vale action modification, please do so.

JSYK, there is a code error in the PR that got merged into reviewdog20. I proposed a fix and it seems to be working on the repo. I'll update the PR afterward.
@jorgepiloto You mentioned before that you would like to try the resulting branch to see if it could run on cases where the reviewdog branch was failing due to too many changes. Feel free to give a shot at the fix on my fork if you want :)


Intercept redirects will cause ContentNotRenderedError with django-debug-toolbar 1.9

I tried newest django-debug-toolbar, 1.9.
And when I enabled Intercept Redirects and accessed a view returns 302, It returned ContentNotRenderedError:
ContentNotRenderedError at /admin/

The response content must be rendered before it can be accessed.

Request Method: 	GET
Request URL: 	http://<IP_ADDRESS>:8000/admin/
Django Version: 	1.11.7
Exception Type: 	ContentNotRenderedError
Exception Value:

The response content must be rendered before it can be accessed.

Exception Location: 	/tmp/venv/lib/python3.6/site-packages/django/template/response.py in content, line 129
Python Executable: 	/tmp/venv/bin/python
Python Version: 	3.6.3
Python Path:

['/tmp/myproj',
 '/usr/lib/python36.zip',
 '/usr/lib/python3.6',
 '/usr/lib/python3.6/lib-dynload',
 '/tmp/venv/lib/python3.6/site-packages']

Server time: 	Wed, 15 Nov 2017 11:17:34 +0000

Environment:

Request Method: GET
Request URL: http://<IP_ADDRESS>:8000/admin/

Django Version: 1.11.7
Python Version: 3.6.3
Installed Applications:
['django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'debug_toolbar']
Installed Middleware:
['debug_toolbar.middleware.DebugToolbarMiddleware',
 'django.middleware.security.SecurityMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware']

Traceback:

File "/tmp/venv/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
  41.             response = get_response(request)

File "/tmp/venv/lib/python3.6/site-packages/django/utils/deprecation.py" in __call__
  142.             response = self.process_response(request, response)

File "/tmp/venv/lib/python3.6/site-packages/debug_toolbar/middleware.py" in process_response
  125.         content = force_text(response.content, encoding=response.charset)

File "/tmp/venv/lib/python3.6/site-packages/django/template/response.py" in content
  129.                 'The response content must be rendered before it can be accessed.'

Exception Type: ContentNotRenderedError at /admin/
Exception Value: The response content must be rendered before it can be accessed.

Reason
This error caused by content = force_text(response.content, encoding=response.charset), accessing response.content.
In this case the response was returned by RedirectsPanel.
https://github.com/jazzband/django-debug-toolbar/blob/master/debug_toolbar/panels/redirects.py#L9
The panel returns SimpleTemplateResponse object. this class will raise ContentNotRenderedError when response.content was accessed before calling response.render().
like content = force_text(response.content, ...).
This error wasn't on django-debug-toolbar 1.8.
And I think this change caused it
https://github.com/jazzband/django-debug-toolbar/commit/c369384945cfc5a4e65fa5f153e231a7ec06b11b
Fix idea
Simply, we can avoid this error by adding response.render() in RedirectsPanel,
folloing here https://github.com/jazzband/django-debug-toolbar/blob/master/debug_toolbar/panels/redirects.py#L27
like this.
                # Using SimpleTemplateResponse avoids running global context processors.
                response = SimpleTemplateResponse('debug_toolbar/redirect.html', context)
                response.cookies = cookies
                response.render()

Or any other nice plan? (or this issue was not correct?)
I don't know well about codes of django-debug-toolbar, so I didn't create PR yet.
Please ask and tell me anything.

I don't have the time right now to think about the best way to fix this, but maybe @jdufresne has an idea? If not I'll get back to this in the next few days.
This is a regression introduced by 64ef4a3bbb4d9d5d38933ebb8b3bdea38ccee4dd, and unfortunately there was no test to detect this :-/

Simply, we can avoid this error by adding response.render() in RedirectsPanel

I believe this would still be a problem for DebugToolbarMiddleware for handling any other SimpleTemplateResponse/TemplateResponse. These types of responses could be returned by any view or middleware, not just django-debug-toolbar. It looks like DebugToolbarMiddleware never had support for delayed rendering. I'll add this with tests. I think the correct approach is to render the content just before manipulating it:
        # If the response supports deferred rendering and hasn't been rendered
        # yet, then ensure that it does get rendered before proceeding further.
        if hasattr(response, 'render') and callable(response.render):
            response.render()
        # Insert the toolbar in the response.
        content = force_text(response.content, encoding=response.charset)

After further analyzing the issue, I think @hirokiky original suggested fix is the best one. I think it is incorrect for Panel.process_resposne() to return a non-rendered response. Unlike Django middleware, panels do not have the (process-template-response)[https://docs.djangoproject.com/en/1.11/topics/http/middleware/#process-template-response] method to ensure that the response is eventually rendered. As I don't see a use case for panels returning non-rendered response, I don't think there is a need ot add one.

Thank you for your reply and fix @jdufresne and @matthiask .
I understood about the middleware.

It means third party panels which returns response from process_response method should call .render() method too.
But I think there's not so much panels like intercept redirects, It won't be so big issue.


Add ServiceUrls

@pnepywoda @ashwinr

FYI,  I was trying to add this before and we concluded that http-remoting may not be best place for serviceUrls , as there is no internal/external concept on the client side.

Yep, not sure http-clients wants an API of more than Set for URLs.

What's the motivation for this? (Sorry, I may have missed some conversation)

Compass was about to put a ServiceUrl's class in their compass-client and I
pointed out that I didn't think anything more should be added to
compass-client - it should be removed as much as possible (note how we're
also trying to remove our foundry-clients)
On Fri, Jan 22, 2016 at 10:48 AM, Robert Fink<EMAIL_ADDRESS>wrote:

What's the motivation for this? (Sorry, I may have missed some
conversation)
—
Reply to this email directly or view it on GitHub
https://github.com/palantir/http-remoting/pull/26#issuecomment-174008096
.

thoughts on just adding another project here called 'service-config' and putting it in there? This class is not an http-client concern.

Would the highline library i am currently working on be the right place for that? since it focuses on app/bundle configuration, i was planning on adding a highline-urls or config for that

sure, is that something you're planning on making an OSS contrib?

Yes, that is the plan.

@rob Set won't always suffice. For example, we need to configure
urls that are accessible both by internal host and by public DNS.
On Fri, Jan 22, 2016 at 17:50 Qinfeng Chen<EMAIL_ADDRESS>wrote:

Yes, that is the plan.
—
Reply to this email directly or view it on GitHub
https://github.com/palantir/http-remoting/pull/26#issuecomment-174079235
.

Thanks @leeavital

Given that @qinfchen is going to open source this elsewhere, going to close this out.


Release the monitor package of version 2018-04-16 to support autoMitigate on LogSearchRule

Service Package Request

Per https://azure.microsoft.com/en-au/updates/public-preview-stateful-and-1minute-frequency-log-alerts-in-azure-monitor/, there is a new property called autoMitigate added for LogSearchRule.
From the swagger spec history, it was introduced in Apr.19 (btw, why is it allowed to introduce new properties in a stable version). The affected Go SDK package is github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights.
This new property is needed for terraform-providers/terraform-provider-azurerm#12341

btw, why is it allowed to introduce new properties in a stable version

Adding new, optional fields to the response in a stable version isn't a breaking change (since the existing payload keeps working), so that's fine - if they were Required that would be, however?

Hi @magodo thanks for this issue!
Releasing a new package will require the service to submit a new SDK release request, I have added the label on this issue so that the corresponding service team could take this a look.
I also sent some internal emails to the contact of the corresponding service team about this.

latest version https://github.com/Azure/azure-sdk-for-go/tree/ec2ed6d8450ad53978efa96822bf9c9431a63ab4/services/preview/monitor/mgmt/2021-07-01-preview


GPU memory requirements

Hi!
I'm trying to run the code with the default images but I'm getting this error:
RuntimeError: cuda runtime error (2) : out of memory

I'm running it on a 1080 ti (11GB). Do you know what the GPU memory requirements are?

It needs at most 4GB on GPU.

Humm.... any idea why I could be getting this error? It's happening right after running the code.

Can u run other pytorch programs with GPU?

How much memory on your CPU?

Try to change:
csF = Variable(csF)
to:
csF = Variable(csF, volatile=True)
in WCT.py line 93. It helped for me.


Is xgboost C++ api thread-safety?

I will use c++ api in my project,I only use xgboost  load model from file on my disk and predict(predict request from other servers). When I read the xgboost code, I found a some comment said that "not thread-safety", is really like this ?

No, XGBoost is not thread safe,  and I'm afraid that's not something can be achieved in recent future.


Create NetlifyCMS to StaticCMS Migration Guide

Document all steps necessary to migrate from NetlifyCMS to StaticCMS, covering as many scenarios as possible.

[ ] All deprecated features were removed
[ ] Some widget properties/options have changed
[ ] Single field select widget has been removed
[ ] New markdown editor comes with new plugin interface, old editor components no longer work
[ ] Widget control properties have changed
[ ] List widget - Dropped support for string lists and the field property
[ ] Dropping Moment for date-fns
[ ] Passing a config to .init() will now completely override config.yml (they are not exclusive), instead of being merged with config.yml
[ ] CMS must be explicitly initiated now.
[ ] Dropped the following beta features from NetlifyCMS.
- GraphQL support for GitHub and GitLab
- Remark plugins (new markdown editor has its own plugin system)
[ ] Dropped support for AssetStore integration
[ ] Dropped support for Azure backend
[ ] registerWidget props have changed
[ ] isValid in widget control component replaced by validator function in registerWidget props
[ ] createClass is deprecated, functional components should be used instead. Basic react hooks are provided as globals now.
[ ] Dropped support for toml. May revisit in the future if there is enough interest
[ ] React 18.2.0

Hi! Excited to see this project. I would like to help out, as my team have built quite a bit on top of netlify-cms but we're approaching the limits of what we can do without it being maintained. I don't know if I would feel confident switching as it is, because it looks to me like a "permanent" fork. That is, in the event of Netlify assigning developers officially to netlify-cms, and it becoming an actively-maintained project - it would be bad if this fork weren't able to keep in sync. I haven't spent long looking at this, but it looks significantly different from netlify-cms. I don't doubt that the changes are good, but I'd have thought they make it impossible to every sync from the upstream repo ever again. Does that sound right, or do you plan on syncing from netlify-cms again some day?

As it stands Netlify CMS is no longer maintained and it doesn't look like it will be for the foreseeable future. The last release was 6 months ago with no development being done since. One of the authors said there were no plans for more development and no one was reviewing PRs. This combined with it looking like Netlify itself is focusing on other (paid) CMS systems to integrate with (Contentful for example), and I don't see much future for Netlify CMS.
That why I forked from it. I had already made several modifications to it before making the decision, and many parts of the code proved troublesome to work with (or modify in any way reliably). So I proceeded to do a rewrite of the app completely into TypeScript. This has allowed me to get the code into a healthier state to really dive deep into it so I could better understand the code.
As for plans to ever sync with the upstream. Even if it became active again I believe this repo/project will have diverged too far from it to really ever sync again. But as I said before I do not think Netlify CMS will become active again any time soon (if ever). So I am proceeding as if its dead and moving forward.
The project right now is still unstable after the rewrite, so I would not suggest switching to it at this time. I am going through, updating the documentation and testing everything as I go. Once that task is complete (hopefully by mid November at the latest) I will release a beta version and begin working on writing a proper migration guide from Netlify CMS to Static CMS.
Right now I am using this GitHub issue to jot down things I need to remember to put in that guide when the time comes.

Also as for the monorepo part, it is still a monorepo. The only thing I moved out was the proxy server, but that might move back in the near future as I reorganize the repo some more. What I did do though was condense all of the independent packages into a single core package. They were all used when you started up Netlify CMS anyways so it made little sense for them to be separated like that. All it did was create a lot more overhead for maintaining and releasing updates to the package.

@mmkal if you have any feature suggestions or ideas you would want in the project in the future, feel free to open up a issue or add a comment to the discussion board!

Thanks for the response - I guess my concern is that this repo becomes unmaintained too, and with a small fraction of the community of netlify-cms. Are you building it supported by an organization, or just on the side? It's a huge project and I'd have thought too much for a single person to maintain, especially in their spare time. I could be wrong, though, I don't mean to be discouraging at all - and even if this project is too fresh to make sense for my team, that doesn't necessarily apply to others.
(Also, I'm not sure that comment you linked was from a netlify-cms maintainer. I think it was just a person with an opinion which might or might not be well-founded. It is far from unheard of for projects to come back to life after a year or so of not much activity, especially when there's as much community interest and a commercial upsell in play)

You are right about that comment. I read that wrong. My bad.
I am currently the only maintainer and not backed by any company.
My motavations for this project stems from using it in my own project (my church's website) and becoming frustrated with various small usability issues with Netlify CMS. So my main focus with this project is to provide a easy to use, small CMS system for static websites.
Too that end, and to help me maintain the project, I have been removing a lot of unnecessary (for the core of the cms) extra parts from the project, most notably the editorial workflow (a feature that nearly double the lines of code for the backends and parts of the UI).

Hi! Excited to see this project. I would like to help out, as my team have built quite a bit on top of netlify-cms but we're approaching the limits of what we can do without it being maintained. I don't know if I would feel confident switching as it is, because it looks to me like a "permanent" fork. That is, in the event of Netlify assigning developers officially to netlify-cms, and it becoming an actively-maintained project - it would be bad if this fork weren't able to keep in sync or merge back into netlify-cms. I haven't spent long looking at this, but it looks significantly different from netlify-cms (e.g. is it not a monorepo anymore??). I don't doubt that the changes are good, but I'd have thought they make it impossible to ever sync from the upstream repo again. Does that sound right, or do you plan on syncing from netlify-cms again some day?

Hey @mmkal do you happen to know if your team's work is opensource? That seems like a Goldmine if it is since I honestly believe the future of Netlify CMS (or whatever the original repo or this fork may become) relies upon its community and the extra features built by those looking for more than what's already offered. It is the only way it can survive amongst the freemium and api-based giants like Contentful and Sanity 😕

It isn't OSS right now, but we intend to open-source it this year. We've talked to the netlify team about the future of the netlify-cms project - and we're sticking with netlify-cms for now in hopes that it will either have people assigned to it, or at least allow the community to contribute more.
IMO, it's a bigger risk to switch to a fork like this. It seems it's made by a single person for a fairly small use case, and while I like the look of many of the tech decisions, the risk that that one person gets a new job, can't handle the scope of work, or just loses interest, seems too high. Especially given how big the differences from the original are.

Also as for the monorepo part, it is still a monorepo. The only thing I moved out was the proxy server, but that might move back in the near future as I reorganize the repo some more. What I did do though was condense all of the independent packages into a single core package. They were all used when you started up Netlify CMS anyways so it made little sense for them to be separated like that. All it did was create a lot more overhead for maintaining and releasing updates to the package.

This is a myth, usually caused by improper changelog tools and version automation.
Ironically, by merging all the packages back into a monolithic package, you've now made it more likely  that maintenance is going to be problematic.
Two tools I've used in monorepos on large teams that make this a non problem :

changesets
auto


Align request type width to be equal

see image:
http://prntscr.com/a34x2o

will be implemented as part of #68


docs(km) note Kong Manager perf issue in traditional mode

Summary

Add a note for the Kong Manager perf issue in traditional mode.
Reason

We are telling the clients that using Kong Manager in traditional mode may have an impact on the overall performance of the Kong.
INTF-2900
Testing

@mayocream Why is this only an issue in traditional mode as opposed to Hybrid mode?

@mayocream Why is this only an issue in traditional mode as opposed to Hybrid mode?

I might not express it clearly; the Kong Manager (Lua code in EE) consumes CPU, I/O resources to calculate and handle frontend user operations, if the client runs in the traditional mode (not Hybrid), this would increase the Kong Proxy's P99 latency.
But in the Hybrid mode, the Kong Manager only runs in the CP node, not impact on the DP performance.

@Guaris I wouldn't look for this information in the Hybrid mode docs. It'd work well in a Kong Manger section if we have one

We had a Kong Manager section (<= 2.5.x), but got removed in the latest docs :(
@Kong/team-km will probably start a conversation internally about this.

Understood, then this is a good place for now.

@Guaris Could we issue a followup PR explaining why proxy performance may be impacted in traditional mode and why it's not an issue in hybrid mode?


Add "experiment id" flag

The interactive learning approach can't use the excluded predicates flag, so I need some other way to distinguish between different experiment runs. This changes the config and save path strings.
The changes to analysis/analyze_supercloud_experiments.py mean the new script won't work on previously saved results.

thank you for doing this! genuine question, i'm not sure: what do you think about making this backwards compatible by doing the following... if experiment_id is empty, then don't add the "" at the end. a downside is that when parsing the filenames, you'd have to do in cases, because sometimes that would be N ""s and other times there would be N+1. @ronuchit @amburger66

cool, @amburger66 let me know if you want to make any changes, otherwise I will merge!

ok, no more changes from me!


Chargeback: Skip calculation when there is zero consumed hours

Consumed_hours_in_interval are used for calculating average metrics. When you divide by zero you get Infinity as a result. The report formater breaks when it gets Infinity.
    WARN -- : <AuditFailure> MIQ(Async.rescue in _async_generate_table) userid: [admin] - Infinity
    ERROR -- : MIQ(MiqQueue#deliver) Message id: [6427], Error: [Infinity]
    ERROR -- : [FloatDomainError]: Infinity  Method:[rescue in deliver]
    ERROR -- : activesupport-<IP_ADDRESS>/lib/active_support/number_helper/number_to_human_size_converter.rb:53:in `to_i'

This is a corner case. It can happen only few hours after you add provider with C&U. Then it is possible some metric rollup exists in the interval, while the full consumed hours is zero.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1416626
@miq-bot add_label chargeback, bug, euwe/yes, blocker
@miq-bot assign @gtanzillo

Euwe backport details:
$ git log -1
commit 64ebc5c2e0b07691caddb073d1a0d51f4941763c
Author: Gregg Tanzillo<EMAIL_ADDRESS>Date:   Fri Feb 3 12:08:44 2017 -0500

    Merge pull request #13723 from isimluk/rhbz#1416626

    Chargeback: Skip calculation when there is zero consumed hours
    (cherry picked from commit bf42c47c4efa898230c0c355fdd61ad638fb6c47)

    https://bugzilla.redhat.com/show_bug.cgi?id=1419186


cmd shell broken on 2008 sp2

It is basically broken on any windows version prior to 2008R2/win 7. The powershell is fine (yay PSRP). Calling .bat/.cmd files essentially do nothing. The command immediately returns with no output but without invoking the script. The reason is codepage. We use 65001 (UTF-8) which:

Supports the broadest range of characters accross locales
Allows Windows Nano server to "work" (it returns a WSManFault otherwise)

However older OS's do not know how to UTF-8.
I'd like to discuss a few options to fix this:

Bring back the winrm v1 implementation of preceeding a create_shell with a WMI OS check and default to codepage 437 (ascii) for older OSs.
Go back to defaulting to 437 instead of 65001 (we used to default to 437 and changed to 65001 a year ago). Then rescue on the WSManFault received on Nano and switch to 65001 and retry.
Allow users the ability to specify a codepage and if working with older OS's, expect users to know to use 437 (or another codepage appropriate to their locale).

I personally like 3 the most but here are some comments on each:

I don't like having to incur the WMI roundtrip for everyone just to appeal to 10 year old OSs.
A universal 437 default is not ideal (but we can customize) and this forces an extra round trip for Nano server on every shell create.
Its not obvious that commands do nothing because of codepage so this is not discoverable at all.

I'd like to get other's thoughts on this:
cc @sneal @smurawski @btm @MatthiasWinzeler

My preference is to default towards making newer OSs happy, not 10 year old ones. I would prefer dropping support for anything older than 2008R2, however downstream consumers like Chef probably can't easily do that.
Another option that came to mind just now, what about making the WinRM API ask the user for their target OS?
opts = {
  endpoint: 'http://myhost:5985/wsman',
  user: 'administrator',
  password: '123456',
  os: :windows2012r2
}
conn = WinRM::Connection.new(opts)

Slightly more abstracted away from code page, and there's potential for other specific actions/config based on OS type.

On the lines of graceful degradation suggested by @sneal (which I'm in favor of), we could alternatively interrogate the winrm endpoint get the wsman stack version.  if it is 2.0, you know you are on 2008r2 or earlier.  Also, if you make an authenticated request to the endpoint, you can get the OS version, which could be a better discriminator.

fixed via #233


Build fails with 'filePath' of 'bundle.getMainEntry(...)' as it is undefined.

Hi.
When I hit the command serve or build parcel ./src/index.pug, an error occurs.
Error messages below:
🚨 Build failed.
parcel-namer-custom: Cannot destructure property 'filePath' of 'bundle.getMainEntry(...)' as it is undefined.

parcel version -> 2.0.0-beta.3.1
parcel-namer-custom version -> 0.2.0
Here is .parcelrc
{
    "extends": "@parcel/config-default",
    "namers": ["parcel-namer-custom", "..."],
}

Here is partial of package.json related this plugin
    "parcel-namer-custom": {
        "src/index.pug$": "[name].[type]",
        ".(pug|html)$": "[dir]/[name].[type]",
        ".(js|ts)$": "[dir]/[name].[type]",
        ".styl$": "[dir]/[name].[type]",
        ".(jpg|gif|png|webp|svg)$": "[dir]/[name].[type]",
        ".jsx?$": "scripts/[name].[hash].[type]"
    },

Update:
I load css files in app.js like below.
// head of app.js
import "normalize.css/normalize.css"
import '../css/style.styl' // this is my custom css file.
import 'swiper/swiper-bundle.css'
import Swiper from 'swiper/bundle'

and I let them to be commented out.
// import "normalize.css/normalize.css"
// import '../css/style.styl' // this is my custom css file.
// import 'swiper/swiper-bundle.css'
import Swiper from 'swiper/bundle'

BOOM! Terminal said
parcel-namer-custom: src/index.pug → dist/index.html
/Users/kohkishikata/git-repo/the_repository/src/index.pug
parcel-namer-custom: src/assets/img/logowa.png → assets/img/logowa.png
/Users/kohkishikata/git-repo/the_repository/src/assets/img/logo_wa.png
parcel-namer-custom: src/assets/js/app.js → assets/js/app.js
/Users/kohkishikata/git-repo/the_repository/src/assets/js/app.js

Almost workaround what I expected.
However, I still need to use css in app.js and use npm modules.
Does anyone have any solution?

I am hitting this too, but mine seems to be with including another local JS file.

Hey guys, have any progress? I'm hitting the issue too. 😢

hey, any progress on this? i am facing the same problem


fix CIP-0040 table omissions

forgot to make some changes to the line for CIP 40 after it was merged (https://github.com/cardano-foundation/CIPs/pull/216#issuecomment-1172955353)

Closing this until I can figure out (again) why all the commits above got included since my last PR in this repo.  Be patient with me please. 🙏


Updating the vesrion of editable-html-tm

Why:
To generate a new version
How:
Updated package json for package
Jira:
BLUE-243
Tags:
editable-html-tm package version release

Version update only, no review required.


Fixed a handful of spelling errors

I was going through the source, to get an idea of how the interaction
with credstash worked, since I need to solve a similar problem.  It
seems silly, but the spelling caught my eye and bothered me.  I hope no
one is offended...

Thanks for the typo fixes.


Removing a node from categories doesn't work

The option to remove a node from categories (shown top right when a node is selected) doesn't seem to work. Pressing it doesn't appear to remove a node.
This should be fixed so that pressing the option removes the node from categories -- this should be shown visually with the node no longer being in a category and also with the option disappearing from the menu when the node is in no categories.
Whilst we're fixing this, we should also update the copy used from Remove all categories to Remove from all categories.

Reopening since although the functionality works it doesn't save.


Add CAI filter option to filter out app-script and pending delete resources from inventory.

[ ] Determine how to identify pending delete resources in CAI data set
[ ] Determine how to identify app-script data in CAI data set
[ ] Build Forseti feature to exclude or filter this data from inventory import
[ ] Add feature to Terra-from configuration options (default state: include pending delete and include app-script data)

Background: CAI exports include pending delete resources and app-script resources which may or may not be useful in the inventory data set. In CSCC today I believe these resources are filtered from import or from the CSCC view. There is no action that can be taken on these resources; but we want Forseti to support the ability to include or exclude these assets from the Forseti inventory.

@garrettwong Were you able to confirm what the filter list is with CSCC that we should consider with Forseti.


refactor: Various code simplifications

1. Why is this change necessary?
Just things I stumbled upon while working with the codebase. If there are any changes not liked, I can also remove/rework them.
2. What does this change do, exactly?
In my opinion simplify some code places.
3. Describe each step to reproduce the issue or behaviour.
-
4. Please link to the relevant issues (if any).
-
5. Checklist

[x] I have rebased my changes to remove merge conflicts
[ ] I have written tests and verified that they fail without my change
[ ] I have created a changelog file with all necessary information about my changes
[ ] I have written or adjusted the documentation according to my changes
[ ] This change has comments for package types, values, functions, and non-obvious lines of code
[x] I have read the contribution requirements and fulfill them.

thanks @aragon999 - I just replaced the array + op with array_replace because none of here ever remember the diff between + and array_merge without looking it up.

@AydinHassan ah yes, perfect. I also always needed to look it up, I keep in my head, the + is doing the opposite of array_merge :grinning:


Linux Binary Dist includes only Windows Executables

I downloaded the 3.8 Linux binary distribution and extracted it only to find Windows executables. Is this intended? I wanted to build it locally, but it requires cmake 2.8.12, and Centos 7 is locked to 2.8.11. Getting cmake built and integrated with my system is far more trouble than it's worth and potentially breaks the system, so I need to avoid that.
Thanks

Easy way is to manualy change hardcored version inside "CMakeLists.txt"
Inside "Torque3D/CMakeLists.txt" you have there "cmake_minimum_required (VERSION 2.8.12)
". That is on line "1", you cannot miss it.
lower that to version what your cMake for CentOS is supporting and that will solver your problem.
Thanks for reporting this, I hope that someone with write access will edit "CMakeLists" and fix that
:)

The issue with that is some build systems require features introduced in 2.8.12. I've tried to build other projects, like Open Broadcast Software, by lowering the required cmake version, only to run into unavailable or unsupported features. I can't seem to find a full version of the changelog for 2.8.12, but this is as close as I can get: https://cmake.org/pipermail/cmake/2013-October/056020.html
I'm only an amateur builder and don't know the specifics of cmake. Someone more knowledgeable of Torque's build system would have to tell me if 2.8.12-specific features are being used.

No.
AFAIK, none of improvements what are introducted with "2.8.12" versions are used while generating build solution
Also, others used "2.8.12" version because they thought that it is the lowest known working version number for all platforms.

If i were you I would go download a newer CMake from CMake.org. Obviously this is the problem with Linux package managers. They do not keep up to date on stuff. We are now at Cmake 3.5 yet for some reason the package manager you are using is still on 2.x. I would personally advocate for completely dropping 2.x support as it is old.

Yeah, I was just about to link https://cmake.org/download/
I'd say go and try and grab and use the latest binary from there first before having to worry about hacking in support for older versions.
If that doesn't work, we can take it from there.

I didn't realize I could download premade binaries for cmake...
Centos 7 has been bugging me because of this lock on extremely old packages. I can understand the need for stability and reliability, but reverting a package to an older version than in the previous release of centos is just ridiculous. I will go with the premade binaries for now and contemplate my choice of distro later. Thanks everybody!

No problem :)
Let us know if that does, indeed work for you. As for the issue's namesake, that was likely an upload issue on my part, I do apologize. I'll re-upload the linux binaries this weekend. Thanks for the spot on that :)

I downloaded cmake 3.5 binaries and it seems to build Torque no problem. Configuring in cmake gives no errors, and I can build the engine and get into the editor. Thanks! I also got OBS built tonight, so two birds with one stone.

Great to hear!
I'll see to it that the instructions for building T3D on linux link to the downloads for CMAKE to avoid this kind of confusion in the future. When we get to implementing the Project Manager 2.0, those binaries can just be included in there as well to make doubly sure :)
And as said before, I'll get the linux binaries re-uploaded this weekend.

On a related note, I changed the required version to 2.8.11 and it configured and built without issue. It seems like either way would work. As far as I know, Centos 7 is the only one with cmake 2.8.11; even Debian stable is newer than this. Now that I know cmake binaries can be downloaded, I don't have a need for projects to maintain a low minimum.
Out of curiosity, is there a minimum supported GCC?


Render big-text inside popup

Is it possible to render inside the popup SizedWrapper of your other library?
BTW I love your stuff!!

@jfrader I'm consolidating several repos (popup, prompt, scrollview, etc.) into this one to make it simpler to maintain and do things like this that involve cross crate changes.


S1-8812: chore(cis) port over our custom Ubuntu18.04-CIS changes

S1-8812 - Port 18.04-CIS rmd specific changes to 20.04-CIS playbook
We had some custom work for the CIS module in 18.04 and want to preserve that work in 20.04.  Most of it surrounds specific controls in configuration as well as some triggers for things like iptables to refresh.
These changes are the byproduct of generating patches from the master 18.04 master repo:
https://github.com/florianutz/Ubuntu1804-CIS @ 187ff8d5454328d6f9d90e947a5e267f09e76656
with our modified fork:
https://github.com/Remediant/Ubuntu1804-CIS @ 0445ce6d2f6c96dd15d2f36dc29e213e69b8dc6d
and applying these patches to our Ubuntu 20.04 CIS fork:
https://github.com/Remediant/ubuntu2004_cis @ 3a98f70988c6c2ffe94b1e50287ff1e36f2ad97c
Script to generate the patches
cd <path to Ubuntu18.04-CIS repo>
mkdir -p patches

for file in $(git diff --stat 187ff8d5454328d6f9d90e947a5e267f09e76656 0445ce6d2f6c96dd15d2f36dc29e213e69b8dc6d | tac | awk 'NR>1 {print $1}') ;
    do git diff 187ff8d5454328d6f9d90e947a5e267f09e76656 0445ce6d2f6c96dd15d2f36dc29e213e69b8dc6d -- "${file}" | sed 's/ubuntu1804cis/ubuntu2004cis/g' > patches/${file////_}.patch ;
done

And then apply the patches in the ubuntu2004_cis repo and manually reviewing rejections, failures, etc.
patch -p1 < ../Ubuntu1804-CIS/patches/<patch_name>

@ivan-rmd there is still a need to update: https://github.com/Remediant/infrastructure/blob/develop/ansible/remediant/os-harden.yml to run this with the right optionset

@ivan-rmd there is still a need to update: https://github.com/Remediant/infrastructure/blob/develop/ansible/remediant/os-harden.yml to run this with the right optionset

right, but changes there shouldn't affect how/if the CIS rules run; those options only need to to be customized for particular customers.

right, but changes there shouldn't affect how/if the CIS rules run; those options only need to to be customized for particular customers.

Correct.  Don't think its just on a per-customer basis either.  Rather its the entrypoint to running the ansible role.  But was just throwing it out to reinforce that.  I can actually drop the file in an infra pr that I was using.  We'll prolly have to change the naming scheme up a little bit.

opened this PR with the focal play: https://github.com/Remediant/infrastructure/pull/694


Added commands for checking openssl version via apt, yum or apk

Thank you for your contribution! Some pointers to get it merged quickly:
For contributions in software/:

[x] PR Title: Please use "Add <vendor/product name>" (instead of "Update README.md")
[ ] Status: please select a value from the status table at the top
[ ] Version: Status Vulnerable / Workaround? -> List vulnerable versions.
Status Fix?                     -> List fixed versions.
[ ] Links: make sure you link to a public statement by the developer.
Alternatively, include and link a file in the software/vendor-statements/ directory
[x] Please mind the sorting

Could also add dpkg -k | grep openssl (I don't know if there are systems using dpkg but not apt, but there might be)

@fdellwing Thanks for the idea! PR updated.

Hi @b4bay is it also possible to add version numbers, to make it more specific?

@pbeij done

Could also add a check for Arch based systems: pacman -Q local/openssl

@victordejong Thanks for the idea! PR updated.

I would suggest something like: dpkg -O -l | grep "openssl\s*3.0.[0-6]"

Perhaps add dnf as well?

Discussion closed by Pascal


since 0.6 req#logout requires a callback function

since the latest version logout seems to require a callback function,
but @types/passport is saying there isn't even a parameter

I do not explicity register any session manager, .. looking at the code it seems this is only required if there is a session manager.. or is this somehow the default now?
see https://github.com/jaredhanson/passport/blob/42630cbd1ffd44d146ff96f0a4be6f3c12f81d75/lib/http/request.js
Expected behavior
no callback required
Actual behavior
a callback is "suddenly" required

Duplicate of #902.

This change is intentional, as described in the release announcement. It is necessary in order to improve the security of how sessions are managed during logout. Upgrading to 0.6.0 will require applications to pass a callback to req#logout. I'm still working on updating the docs and examples.
I don't maintain the TypeScript types, so those may be out-of-date of the most recent changes.


File is removed but not to the recycle bin

I'm on Windows 11, Python 3.7/3.9/3.10/3.11. I'm using the send2trash module, and while the file is removed, it is not placed in the recycle bin/trash.

In case if I used  folder, mounted like network drive -  I have the same problem.
For exsample:
\PC Name\C$\Data\Folder - I have the same problem
C:\Data\Folder - it is works correctly


Link to Windows 8 app development is broken

Link to article:
https://docs.microsoft.com/en-us/previous-versions/windows/
Problem:
The link 'Windows 8' in the 'Windows app development' section is broken. Instead of browsing to the Windows 8 API documentation the current page just reloads
In addition I'm missing any reference to Windows 8.1 API in the previous versions documentation overview.

@Khairunj can you help investigate this, please?

The Windows 8 link is now fixed thanks for reporting the issue.


Monetization Doc Changes

Description:
I followed the monetization and noticed the following as the needed improvements/ corrections so that it is easy to follow. And some of the information are invalid with Stripe UIs as well.
In https://apim.docs.wso2.com/en/latest/design/api-monetization/monetizing-an-api/
In https://apim.docs.wso2.com/en/latest/design/api-monetization/monetizing-an-api/#monetize-an-api in "Let's use the wso2-am-stripe-plugin to monetize an API in the following example scenario." Lets mention in a Note that this scenario can be tried out using test data by turning on the toggle button

Some information can be changed/ improved in (A) - Configure the billing engine.
1) Create an account for the Tenant Admin.
b) Click on Developers > API keys > Reveal test key to obtain the keys. For more information refer to Obtain the keys

3) Enable Connect and create a [connected account](https://stripe.com/docs/connect/quickstart#create-account) in Stripe.
a.0) Click on settings and then select connect section settings

a.1) edit Appearance section in Branding section and click on "Save Branding Changes"

b) enable OAuth for Standard Accounts by scrolling further more

c) Click connect and then click on Create

d) Continue

e) copy the URL pops up next in

f) Enter it in the browser to onboard the application and click on skip this form if you are on test mode

g) Refresh https://dashboard.stripe.com/test/connect/accounts/overview to see the newly created account

Some information can be changed/ improved in (B) - Configure WSO2 API Manager

Optionally, configure WSO2 API Manager to work with Choreo Analytics.
a) Enable analytics by referring to https://apim.docs.wso2.com/en/latest/api-analytics/getting-started-guide/#step-2-register-your-environment
b) Can add an additional note which says analytics_access_token is the one generated in the step a

In Step 1 - Create a subscription policy Better if we can give them a sample configuration as well for 2 then its easier to go with the flow.
2) Create a subscription policy.

In Step 2 - Enable monetization
3) << This step is missing
Click on subscription and select the policy created in Create a subscription policy and click save

Enter the connect ID as the connected account key and click Save. You could find the ConnectID: you could find the connect ID when you click on the created account. And simply click “Copy ID” when you click on the created account. And simply click “Copy ID”

Additionally, if you refresh the page the policy section has to be shown as below << new step to verify

In Step 4 - Send usage data to the billing engine

Publish usage data to the Stripe billing engine
URL should be changed to https://localhost:9443/api/am/admin/v3/monetization/publish-usage. (v1 to v3)

Fixed this with PR : https://github.com/wso2/docs-apim/pull/6818


Empty array as args in yaml file is not handled correctly

In yaml,
- BUILD:     image: applatix/claudia-builder:latest     command: [/src/build.py]     args: []
After axops processing it, it shows up as there is no args.

This turns out to be golang's json omitempty behavior, which we use for args, command, and other string arrays:
type ContainerTemplate struct {
...
	Command         []string            `json:"command,omitempty"`
	Args            []string            `json:"args,omitempty"`
...
}

The documentation states:

The "omitempty" option specifies that the field should be omitted from the encoding if the field has an empty value, defined as false, 0, a nil pointer, a nil interface value, and any empty array, slice, map, or string.

I verified, that during unmarshaling, the empty array is preserved in the datastructure form. However when marshalling back to json, the args is omitted if the array is empty. Golang json package has no way to be more specific about nulls vs. empty arrays.
In order to fix this, we will probably need to alias []string with our own definition with a custom MarshalJSON() method.

I should also add, simply removing the omitempty from the json annotation is not desirable since we truly want to omit the value if the user did not supply it.

In order to fix this, we will probably need to alias []string with our own definition with a custom MarshalJSON() method.

Actually, we would need to implement MarshalJSON() on the surrounding type (i.e. ContainerTemplate) for it to intelligently omit args depending on if it's an empty array or nil. There is a proposal for being able to control this in the encoding/json package, but it is not implemented.
We could solve this by making []string become *[]string, but I'd rather not do that since the use case for having an empty args array is quite limited, and I believe that this can be worked around.
Closing this wontfix


Optimize decoding blocks of postings using the vector API. (#13636)

Backport of #13636 to branch_9x.

@uschindler I was wondering while doing this backport: would you apply the same refactoring wrt PanamaVectorConstants to the src/java20 folder, or would you keep it as-is?

Maybe for consistency it would be good. I don't remember, did we backport Chris changes to java 20, too?

I don't remember, did we backport Chris changes to java 20, too?

No we did not. Nevertheless, maybe the constants code backport would be cool.

OK, I did it for src/java20 too.


Ignore clippy::empty_loop

Using the #[async_backtrace::framed] macro was triggering this lint, unsure why this wasn't ignored as I believe the empty_loop is a default lint in clippy, but I noticed in CI only check is run, not clippy.

This has been released in v0.2.2! Thanks for the contribution.


Can't remap tuple keys to object keys in mapped types

🔎 Search Terms
mapped tuple, mapped types
🕗 Version & Regression Information

This is the behavior in every version I tried, and I reviewed the FAQ for entries about mapped types

⏯ Playground Link
https://www.typescriptlang.org/play?ts=5.2.2#code/CYUwxgNghgTiAEkoGdnwCLgPahgHgBUA+eAbwCh4r5QwcQAKWGKATwCEBXAM25BgBc8AIIwWHHnxgBKIQQDc5AL7lyAF1YAHBADUoETiAJaQAeW6F4IAB5qQAO2BpMdXHij3WREgF54BK1sHJwxsNwBLeyl4ACUSAH5Y+CF7EAA3fkV1E3gAZTUYTjA1TGQwGHDNNSwYeD8YkChgLHsIVlFxPDgmlrb4AG0AaxBWIWQCyIBzABp4DW0hF3p8Dy8AXSIs+YR8wuLjbQAxGrxS8srq2ps7RzRdopKQMoqqmt8ySmp+gGl4SPgGMNWFhuKFnhcatJ4AAyeD2TgAWwARvx4CgwedXjAfmt+gAGNZrIR6AxGEzmU5PTGXHH9ACMG0USiySFQeQKDyWbjo9nGGJel0CNxC92KZwFbyFwWcYX4eFFagOIGO+HFEJg3g+1EQLXGe0uDFA4KxiypEpkWu11GQnG0MAY0kU2pUKnItGgcB1vLUfwAzAAmLn8U2uOXw5H8TZu8AehA8vnhABsABYg4JQqH8EjwpNImoo+R4z69ZzZbU-KkAO7s-Vphj9T5UfoAIigzdm4QDabW00bA2bSPbfxT3d7a0dqiL8BLxTq045YrLADpaPQGFWRGI2FxePwGHS8XjpBPC7qfWkUoiUeX5-ql1BFEA
💻 Code
declare class Decoder<T> {
    decode(arrayBuffer: ArrayBuffer): T;
}

type ValueTypeOf<T extends Decoder<any>> = T extends Decoder<infer R> ? R : never;

type StructDescriptor = ReadonlyArray<readonly [key: string, type: Decoder<any>]>;

type StructTypeFor<Descriptor extends StructDescriptor> = {
    [K in (keyof Descriptor) & number as Descriptor[K][0]]: ValueTypeOf<Descriptor[K][1]>;
};

class StructDecoder<const Descriptor extends StructDescriptor> extends Decoder<StructTypeFor<Descriptor>> {
    constructor(descriptor: Descriptor) {
        super();
    }
}

declare const i32Decoder: Decoder<number>;
declare const i64Decoder: Decoder<bigint>;

const structDecoder = new StructDecoder([
    ["a", i32Decoder],
    ["b", i64Decoder],
]);

const struct = structDecoder.decode(new ArrayBuffer(100));

// I expected this would work, but it does not
const v: number = struct.a;

🙁 Actual behavior
The type of struct.a has type number | bigint, however it should only have type number.
🙂 Expected behavior
struct.a should have type number (and similarly struct.b should have type bigint).
Additional information about the issue
This does work when using a record instead, however this isn't as useful as I want the descriptor to still be an array so I can iterate over it.

May be related to https://github.com/microsoft/TypeScript/issues/27995.
Workaround: Do not use keyof SomeTuple & number as a mapped index, instead, use a utility type to get the correct numeric index type of the tuple.
type KeyofTuple<T extends readonly any[]> =
    Exclude<keyof T, keyof []> extends infer StringIndex
    ? StringIndex extends `${infer NumericIndex extends number}`
        ? NumericIndex
        : never
    : never;

type StructTypeFor<Descriptor extends StructDescriptor> = {
-    [K in (keyof Descriptor) & number as Descriptor[K][0]]: ValueTypeOf<Descriptor[K][1]>;
+    [K in KeyofTuple<Descriptor> as Descriptor[K][0]]: ValueTypeOf<Descriptor[K][1]>;
};

I think that perhaps this could work (but it doesn't):
type StructTypeFor<Descriptor extends StructDescriptor> = {
    [K in keyof Descriptor as Descriptor[K][0]]: ValueTypeOf<Descriptor[K][1]>;
};

I might play with implementing a change that would allow this if I find the time for this next week.

You should use & ${number} instead of & number. That's because 0, 1, etc are string keys containing a number, not numbers.
declare class Decoder<T> {
    decode(arrayBuffer: ArrayBuffer): T;
}

type ValueTypeOf<T extends Decoder<any>> = T extends Decoder<infer R> ? R : never;

type StructDescriptor = ReadonlyArray<readonly [key: string, type: Decoder<any>]>;

type StructTypeFor<Descriptor extends StructDescriptor> = {
    [K in keyof Descriptor & `${number}` as Descriptor[K][0]]: ValueTypeOf<Descriptor[K][1]>;
};

class StructDecoder<const Descriptor extends StructDescriptor> extends Decoder<StructTypeFor<Descriptor>> {
    constructor(descriptor: Descriptor) {
        super();
    }
}

declare const i32Decoder: Decoder<number>;
declare const i64Decoder: Decoder<bigint>;

const structDecoder = new StructDecoder([
    ["a", i32Decoder],
    ["b", i64Decoder],
]);

const struct = structDecoder.decode(new ArrayBuffer(100));

const v: number = struct.a;

Playground

My own understanding of what is going on so far:
We have a mapped type called StructTypeFor<Descriptor>. The return type of structDecoder.decode(...), i.e. the type of struct, is that mapped type instantiated with Descriptor = readonly [readonly ["a", Decoder<number>], readonly ["b", Decoder<bigint>]], which is the type inferred from the argument passed to structDecoder.decode(...).
Depending on how you write the mapped type StructTypeFor<Descriptor>, you get different types for struct.

If you write the mapped type like this:

type StructTypeFor<Descriptor extends StructDescriptor> = {
    [K in (keyof Descriptor) & number as Descriptor[K][0]]: ValueTypeOf<Descriptor[K][1]>;
};

Then, when we resolve the mapped type with  Descriptor = readonly [readonly ["a", Decoder<number>], readonly ["b", Decoder<bigint>]],  K will range over (keyof Descriptor) & number, but what does that intersection resolve to?
First, keyof Descriptor is going to be a union of:

"0", because Descriptor ends up being a tuple type of length 2
"1", also from the tuple type of length 2
"length", "toString", "map", "filter", "reduce", etc, all the array methods, because a tuple is an array after all, so those methods get inherited by tuple types
number, from the number index signature[^1] present in arrays, again because a tuple is an array (* this part doesn't entirely make sense to me... why do we need a fixed-length tuple type to have a number index signature?)

This union, when intersected with number, results in number, and that's what K ends up ranging over.
This results in the properties of our mapped type being Descriptor[number][0] = "a" | "b", and the types of those properties is ValueTypeOf<Descriptor[K][1]> = ValueTypeOf<Descriptor[number][1]> = ValueTypeOf<Decoder<number> | Decoder<bigint>> = number | bigint. (* this is an approximation that omits some details).
The result is that the type of struct resolves to { "a": number | bigint, "b": number | bigint }.

If you write the mapped type like this:

type StructTypeFor<Descriptor extends StructDescriptor> = {
    [K in (keyof Descriptor) & `${number}` as Descriptor[K][0]]: ValueTypeOf<Descriptor[K][1]>;
};

then roughly the same will happen, except K now will range over  (keyof Descriptor) & `${number}` .
keyof Descriptor resolves to the same union described above, i.e. "0" | "1" | "length" | "toString" | ... | number.
When that is intersected with `${number}`, the result is "0" | "1", and that's what K ranges over.
So the properties of the resolved mapped type will be Descriptor["0"][0] and Descriptor["1"][0], which are respectively "a" and "b".
When we resolve the type of a property of the mapped type, say the type of the property for when K is "0", we resolve ValueTypeOf<Descriptor[K][1]> = ValueTypeOf<Descriptor["0"][1]> = ValueTypeOf<Decoder<number>> = number.
The result is that the type of struct resolves to { "a": number, "b": bigint }.

If you write the mapped type like this:

type StructTypeFor<Descriptor extends StructDescriptor> = {
    [K in keyof Descriptor as Descriptor[K][0]]: ValueTypeOf<Descriptor[K][1]>;
};

then you get errors on Descriptor[K][0], saying that "Type '0' cannot be used to index type 'Descriptor[K]'.", and that "Type 'Descriptor[K][0]' is not assignable to type 'string | number | symbol'."
Note that we don't get the same error on Descriptor[K][1] occurring ValueTypeOf<Descriptor[K][1]>, because as of #48837, since K ranges over keyof Descriptor and Descriptor is an array or tuple type, K has an implicit constraint of number | `${number}`  in ValueTypeOf<Descriptor[K][1]>.
So we can read that part of our mapped type declaration as ValueTypeOf<Descriptor[K & (number | `${number}`)][1]>.
Ignoring that error, then what happens is similar to to the first case, except that K will range over all properties of Descriptor now. When K is one of the array methods, then Descriptor[K][0] will resolve to unknown, and therefore those array methods don't contribute to the properties of the resolved type, so we're left with K ranging over "0" | "1" | number to produce the properties of the resolved type.
When we are resolving the types of the properties of the resolved mapped type, we resolve ValueTypeOf<Descriptor[K][1]>, and that ends up resolving to number | bigint via a similar process to the first case listed above.
Some things I don't understand or that bother me here:

A tuple type of a fixed, known length still has a number index signature, and that leads to us mapping over this index signature in a mapped type, and I find this surprising.

Adding an intersection to the K in keyof Descriptor with number and `${number}` has different behavior, and the distinction seems easy to overlook. Intersecting with `${number}` works because we represent the tuple properties as "0", "1", etc, i.e. as numeric string literals. But couldn't we also represent those properties as 0, 1, etc? It makes some sense to think so, because we do index arrays/tuples with numbers. I know ultimately, at run time, the numbers are converted to strings to access the array...
The other part of one way working while the other doesn't is that intersecting with `${number}` also gets rid of the number signature index, since number & `${number}`  is never. But couldn't the index signature for arrays/tuples use `${number}` instead? I.e. couldn't it be [n: `${number}`]: SomeType?

When you write the mapped type with { [K in keyof Descriptor as Descriptor[K][0]]: ValueTypeOf<Descriptor[K][1]> }, you get an error on Descriptor[K][0] because we think K can range over any property of Descriptor, including the array methods. But you don't get a similar error on ValueTypeOf<Descriptor[K][1]>, because that occurrence of K is implicitly constrained to number | `${number}`  since #48837. That distinction seems to me like an overlook, and I think there shouldn't be an error there. That distinction is fixed by part of #55774 (though that PR also implements other things).

[^1]: by "number index signature" I mean here an index signature that looks like [n: number]: SomeType.

A tuple type of a fixed, known length still has a number index signature, and that leads to us mapping over this index signature in a mapped type, and I find this surprising.

I suspect that not having that would result in some questionable DX:
const tuple = ['', 10] as const
function getX(i: number) {
  return tuple[i] // would be an error
}

For improved type safety of this access, you can opt into noUncheckedIndexedAccess. So with that option in mind, there is nothing quite wrong with having that number index. That option is not the default though.

Adding an intersection to the K in keyof Descriptor with number and ${number} has different behavior, and the distinction seems easy to overlook.

This ☝ That's why I decided to open my PR - with it you don't even need to use an intersection so I think it's an improvement since one doesn't have to even consider what's the correct way to do this intersection. They can just use the builtin language features to achieve the desired outcome.

But couldn't we also represent those properties as 0, 1, etc?

That's (kinda) what I tried in https://github.com/microsoft/TypeScript/pull/48599 and that PR ultimately led to https://github.com/microsoft/TypeScript/pull/48837

I know ultimately, at run time, the numbers are converted to strings to access the array...

Yes, from that PoV TypeScript representation is correct.  I don't think it's super pragmatic though :P but certainly, there are also other considerations here beyond just arrays. number/string indexers have at times weird behaviors/overlaps between each other.

But couldn't the index signature for arrays/tuples use ${number} instead? I.e. couldn't it be [n: ${number}]: SomeType?

It's worth noting that then arrays/tuples would have to have both index signatures because ${number} would reject plain numbers.

I think for now we don't really want to change the rules regarding (homomorphic) mapped types instantiated with array or tuple types.
There's already a way to express what this issue asks for, as suggested above:

You should use & `${number}` instead of & number. That's because 0, 1, etc are string keys containing a number, not numbers.
type StructTypeFor<Descriptor extends StructDescriptor> = {
    [K in keyof Descriptor & `${number}` as Descriptor[K][0]]: ValueTypeOf<Descriptor[K][1]>;
};

Playground

The current rule we have landed on is to instantiate mapped types with array and tuple types in a special way when the mapped type is homomorphic and has no as clause, i.e. mapped types that look like { [K in keyof T]: SomeType<T, K> }.
That means that, if you have such a mapped type instantiated with an array or tuple type:
type Mapped<T> = { [K in keyof T]: SomeType<T, K> };
type MappedTuple = Mapped<[1, 2, 3]>; // [SomeType<T, K>, SomeType<T, K>, SomeType<T, K>]

then only the element properties of the type are considered when mapping (e.g. K will range over "0", "1", "2" in MappedTuple), so the "shape" (or the "array-ness", if you will) of the input type is preserved and the result produced is also an array or tuple type.
I think this rule makes it clear when the "array-ness" of the input type is preserved by a mapped type, and it does what users expect. Compare that to when a mapped type is homomorphic but has an as clause: TypeScript can't be sure whether or not you want this special behavior of preserving the "array-ness".
In the issue's example:
type StructTypeFor<Descriptor extends StructDescriptor> = {
    [K in (keyof Descriptor) & number as Descriptor[K][0]]: ValueTypeOf<Descriptor[K][1]>;
};

when instantiating mapped type StructTypeFor with some array type, because StructTypeFor is not a homomorphic mapped type without an as clause, K will range over all properties of type (keyof Descriptor) & number, as there will be no special instantiation behavior.
The same goes for rewriting the mapped type like this:
type StructTypeFor<Descriptor extends StructDescriptor> = {
    [K in keyof Descriptor as Descriptor[K][0]]: ValueTypeOf<Descriptor[K][1]>;
};

I agree with @gabritto 's reasoning - if this is solvable today, and the proposed fix would make things harder to understand, then the best thing to do is to stick with the current behavior. We can reevaluate in a new issue if unsolvable use cases appear.


OpenAI API References > Audio > Text2Speech

Hi,
Is there any plan to add Audio section from OpenAI API references, text2speech?
I couldn't find any workaround within current functions.

We have no such plans


Tests for package manager API

Proposed changes
This PR adds missing tests for the package manager API
Fixes
If it fixes a bug or resolves a feature request, be sure to link to that issue.
Types of changes
What types of changes does your code introduce to agents-aea?
Put an x in the boxes that apply

[ ] Bugfix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist
Put an x in the boxes that apply.

[ ] I have read the CONTRIBUTING doc
[ ] I am making a pull request against the develop branch (left side). Also you should start your branch off our develop.
[ ] Lint and unit tests pass locally with my changes and CI passes too
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] I have checked that code coverage does not decrease.
[ ] I have added necessary documentation (if appropriate)
[ ] Any dependent changes have been merged and published in downstream modules

Further comments
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

Codecov Report
Base: 96.81% // Head: 97.19% // Increases project coverage by +0.38% :tada:

Coverage data is based on head (46cbcc4) compared to base (fd0e7b0).
Patch has no changes to coverable lines.

Additional details and impacted files
@@                    Coverage Diff                    @@
##           feat/pm-depedency-res     #464      +/-   ##
=========================================================
+ Coverage                  96.81%   97.19%   +0.38%
=========================================================
  Files                        208      208
  Lines                      19062    19062
=========================================================
+ Hits                       18454    18527      +73
+ Misses                       608      535      -73

Flag
Coverage Δ

unittests
97.19% <ø> (+0.38%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

aea/package_manager/base.py
98.59% <0.00%> (+2.81%)
:arrow_up:

aea/package_manager/v1.py
90.78% <0.00%> (+10.52%)
:arrow_up:

aea/package_manager/v0.py
87.09% <0.00%> (+56.98%)
:arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

Windows failure: INTERNALERROR> MemoryError
macOS: known libp2p failure


Image editor not WYSIWYG

In general I think it is too difficult to use and to GWYW (Get What You Want). The end image of crop does not show what later becomes the end result after clicking Update. Once Update reediting becomes more limited because the image file is not like the original any more. To go back and retry is then delayed because original needs to  reloaded from the library.

Thanks for report. We will fix it.


Align Body Content Left or Right

Hi,
I am trying to align the whole MJML body content to left, i have read the mj-body attribute and i dont find any option to align it as left, i tried putting align="left" in the body section same as we set the width of the mj-body content by putting width="700px".
Best Regards,
Expected behavior:
The whole body contents should align left or right.
MJML version:
I am sing MJML 4.1 Beta

hey @mjml1982, this is not possible due to the approach behind MJML (mobile-first + fluid-hybrid). You can read more about this here: https://github.com/mjmlio/mjml/issues/988

Without concern for adverse effects, (In my case I have an email that I want to emulate a plain text email but want to still uniformly use MJML for all my templates), I use some basic css and raw tags to get the desired result.
<mjml>
  <mj-head>
    <mj-style>
      .body-left>div{
        Margin: 0px 20px !important;
      }
    </mj-style>
  </mj-head>
  <mj-body background-color="white" mj-class="body-left">
      <mj-raw>
</mj-raw>

      <mj-raw>
</mj-raw>
  </mj-body>
</mjml>

I agree it goes against MJML standards and is a bit of hack, (definitely don't think anything like this belongs in MJML core.) But not fair to say it is not possible if you want to manipulate the HTML manually and test for adverse effects after. Leaving this hear in case someone comes along looking for a similar solution.
This works in MJML 4.8.

This wouldn't alter the Outlook conditionnal comments and it will be still
centered on Outlook desktop. Plus some of the component would not behave
well (like mj hero ? & probably the divider )
On Mon, Aug 13, 2018 at 8:05 PM J Riley Harrington<EMAIL_ADDRESS>wrote:

Without concern for adverse effects, (In my case I have an email that I
want to emulate a plain text email but want to still uniformly use MJML for
all my templates), I use some basic css and raw tags to get the desired
result.

      .body-left>div{
        Margin: 0px 20px !important;
      }

I agree it goes against MJML standards and is a bit of hack, (definitely
don't think anything like this belongs in MJML core.) But not fair to say
it is not possible if you want to manipulate the HTML manually and test for
adverse effects after. Leaving this hear in case someone comes along
looking for a similar solution.
This works in MJML 4.8.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/mjmlio/mjml/issues/1252#issuecomment-412610494, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAizzSs38IvIPXyjY4AwEMD2jF8QlWV8ks5uQb_igaJpZM4UyjLA
.

--
Cordialement,
Maxime BRAZEILLES

True, I think its safe to say if you really want to make these changes you have to start being very careful and test appropriately. But my point is, with mj-raw you can always fallback to uncomfortable html fixes if mjml isn't equipped to do something you need.


bug in plotting to html map

Plotting function powergim.plots_map.plot_map(...)creates strange plots when plotting optimisation results
Wrong branches are plotted.
Possibly because branch index is changed when merging with nodes, se plots_map2.py line 66.

Possibly fixed in (commit commit 06e1450830ef0e42e430c702f2a2673e838a5412) and included in PR #15.


Continous output evades timeout

bug.c
#include <stdio.h>
int main(void) {
  while (1) printf("a");
}

whitelist
brk
mmap2
access
open
fstat64
close
read
set_thread_area
mprotect
munmap
write

# playpen sandbox -u nobody -S whitelist -t 1 -- /bug

Expected: Timeout triggered. Actual: No timeout triggered. Verified on git master and version 10.

Linux 3.14.40-2-lts #1 SMP Fri May 1 14:20:55 CEST 2015 i686 GNU/Linux

Your example stops reliable for me, but I could understand why it might not. The event loop drains the input pipe from the child into stdout until it hits again so it might be possible for it to go forever if the pipe is filling faster than it's being drained.
Does it still happen if you redirect the Playpen output to /dev/null? That would be a strong indication that this is the problem. It wouldn't be hard for me to fix it.

No, redirecting output to /dev/null makes the timeout trigger properly. But you're right, it's probably the underpowered VPS instead of it being 32bit.
Other symptoms, with stdout not redirected, are that Ctrl+C is no longer sent, at least the handler doesn't seem to fire anymore. SIGQUIT (Ctrl+Alt+\) eventually fires after a few attempts, I suppose because there is no trap on it.

This might fix the problem:
diff --git a/playpen.c b/playpen.c
index cd22231..ba35e0a 100644
--- a/playpen.c
+++ b/playpen.c
@@ -196,12 +196,14 @@ static void epoll_add(int epoll_fd, int fd, uint32_t events) {
 // This could often use `splice`, but it will not always work with `stdout` and `stderr`.
 static void copy_pipe_to(int in_fd, int out_fd) {
     ssize_t n;
+    unsigned iterations = 0;
     do {
         uint8_t buffer[BUFSIZ];
         n = read(in_fd, buffer, sizeof buffer);
         if (check_eagain(n, "read")) return;
         check_posix(write(out_fd, buffer, (size_t)n), "write");
-    } while (n != 0);
+        iterations++;
+    } while (n != 0 && iterations < 100);
 }

 static int get_syscall_nr(const char *name) {

It could also just not loop at all, which would make the timeout as precise as possible.

It certainly improved it a lot, the timeout seems to always trigger now. Remaining minor issues seem to be that Ctrl+C now only fires when the timeout would hit and I'm seeing about 1.3 seconds extra runtime here, both with which I could live from my side.

Can you try with that iterations < 100 part changed to iterations < 1? I think writing to the TTY is probably just really slow.

Small correction: Ctrl+C triggers after the 1.3 seconds apparently, I just wasn't fast enough. Another possible factor might be that I run this over SSH, though I've also seen this when reading playpens stdout over a pipe when spawned from another process.
iterations < 1 reduced the extra delay to about 0.3 seconds.

@jhass: Changing uint8_t buffer[BUFSIZ]; to uint8_t buffer[256] would no doubt make it even faster, but I'm going to have to find a good balance between performance and responsiveness. Sending the output over a network is somewhat of a niche: the timeout still needs to work (i.e. not loop forever) but I don't want to sacrifice too much throughput to make it responsive.

Sure, as said I totally could live even with the extra 1.3 seconds for my usecase.

BTW, this is basically caused by a POSIX design flaw. Ideally, I could just do non-blocking output with stdout and stderr and there would be no issue here at all. It would only write when the pipe to ssh was ready to receive more input immediately. Sadly, you can't really use O_NONBLOCK on stdout and stderr because POSIX decided to associate with the instance of the open file rather than the file descriptors or the system calls so it can break other processes sharing the open file instance if they don't expect it.
There might be a nice hack to work around this... but nothing perfect.

(it would still need an arbitrary iteration limit to deal with regular files, but the case where stdout is a pipe case would never block)

Another way to handle this properly would be to use a thread for each standard stream with non-blocking pipes (or eventfd, to avoid copying) used to communicate with each one.

Thanks for the quick fix!

I didn't try to reproduce this in a local minimal setup yet, but maybe you can answer this on a quick glance, could it be that the issue is still there for standard error?
#include <stdio.h>
int main(void) {
  while (1) fprintf(stderr, "a");
}

It should work the same way for both.


Various Thaumcraft wand foci bypasses protection

Sponge: 1.8.9-1808-4.1.0-BETA-1265
GP: 12.7.1
Mods: Thaumcraft 5.2.4

[x] Equal Trade

Equip a wand with the Equal Trade focus
Start the conversion process outside someone else's claim
As the blocks spread out, blocks inside the claim will still be replaced

It is blocked correctly if the initial click is done inside the claim

[ ] Nine Hells

Equip a wand with the Nine Hells focus
Click on a protected entity
A deny message appears, but the fire bats still attack and kill the entity

[X] Pech's Curse

Equip a wand with the Pech's Curse focus
Click on a protected entity
The entity still receives the potion effects

@Wolfizen  Please retest with latest build as there were a few permission bugs that were fixed.

The bugs involving Equal Trade and Pech's Curse have been fixed. However, the issue with Nine Hells still remains. There is now an exception thrown when the bats explode on the targeted entity: http://pastebin.com/pzDaMXn0

Fixed in SpongeCommon commit
https://github.com/SpongePowered/SpongeCommon/commit/8eca553ee8592c67a390d351dbf90306c87b92dc


ZEVA - MY Report History wording refinement

Title: MY Report History wording refinement
Description: The lines regarding report being returned by the director or analyst need to be better written so as not to be confused.
Wireframe:
Private Zenhub Image
Purpose and benefit to user:
More clarity with the wording, change text to read:
Model year report returned to the supplier [date] by [name]
Model year report returned to the analyst [date] by [name]
Acceptance Criteria:

[ ] Given I am a IDIR user, When I am looking at the MY report history, then I am able to easily distinguish between the two different 'returned' actions.

Development Checklist:

[ ] A
[ ] B
[ ] C

Notes:

Hey team! Please add your planning poker estimate with Zenhub @emi-hi @tim738745


Functional Tests 3.4 API Tests

https://github.com/WSUCptSCapstone-Fall2022Spring2023/msft-imagedataprocessing/issues/125
https://github.com/WSUCptSCapstone-Fall2022Spring2023/msft-imagedataprocessing/issues/124
https://github.com/WSUCptSCapstone-Fall2022Spring2023/msft-imagedataprocessing/issues/123
https://github.com/WSUCptSCapstone-Fall2022Spring2023/msft-imagedataprocessing/issues/122
https://github.com/WSUCptSCapstone-Fall2022Spring2023/msft-imagedataprocessing/issues/121
https://gyazo.com/fa96567f940c542adba80dcfe3e7a98d
https://gyazo.com/14a729453b6c9fefa3e6460bce7bbe47
https://gyazo.com/0c8aecedfb7dc0793190bda3a83e1594
@zach6215 view these links and close this issue if you see that the documentation is fit. I will close the child issues after.

Good job


Can't get landing / contact page working

The README isn't quite clear as to how to get the landing / contact page working. What needs to be done exactly?
A landing.md, contact.md with the Title, Heading. Subheading, etc... in content/ ??

motiteux, you have made my day :)

Thanks @motiteux, you save me the debug time, you rock!


Fresh air to the code

I made some mostly cosmetic changes to the repository to make the code base a bit cleaner and easier to integrate with other projects. Highlights:

A bit more modern CMake file
More conventional location of sources and headers
Lua dependency through Conan
Header generation removed
Dead/commented out code removed
Const references for string parameters
Update to Lua 5.3

I also created a conan package from LuaCppTemplater (from my fork currently).
I realize that these changes are not necessarily things that you want in your codebase (since the improvements are mostly cosmetic and somewhat a matter of taste), but I wanted to offer the pull request anyway.

Thanks! Gentle preference to have each change as a separate PR, so I can think about it separately :-)

(basically:

anything that makes everyone's life easier => I'll probably be open to
anything that makes your life easier, and no change either way to my life => I'll probalby be open to
things that make your life easier, my life harder (eg removing cog) => depends :-)
things that dont obviously improve your life, but reduce backwards compatbility (eg bumping minimum version) => depends :-)

)

removing cogapp sources

probalby ok.  at the time I included them, there was a breaking bug in cog, if  iremember rightly.

naming consistency

Seems reasonable to me.

changing lua to 5.3

So, lua 5.3 is incompatible with luajit, which is used by Torch.  Any particulr reason/advantgae you see for bumping the version?  Otherwise, reaosnably strong preference for leaving it at 5.1 for now :-)

Gentle preference to have each change as a separate PR, so I can think about it separately :-)

You are absolutely right and I do apologize (initially I did not think of making a pull request so I just kept making changes). But I see that you started to respond to the commits. Would you still like me to split it up to separate PRs?

Any particulr reason/advantgae you see for bumping the version?

Actually it was the first conan package I saw and only realized later that there were some minor issues. I will downgrade it and update the PR.

Separate PRs make it much easier to review/accept.

Since this is really old, and no updates, closing. Please feel free to reopen if needed.


⚠ Samsung has degraded performance

In 7cf34a5, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 2286 ms

Resolved: Samsung performance has improved in dc68d1e.


Rails::Auth::ErrorPage::DebugMiddleware

This middleware provides detailed debugging information about a
request intended to simplify development, or for use debugging
authorization problems in a staging environment.
It displays what request was made, all of the credentials currently
in the Rack environment, and all of the candidate ACL entries
which match the current request.
Screenshot:

FYI @thirstscolr @stouset @lukaszx0 @ggilder @zanker @nerdrew @xaviershay


Error:(22) No resource identifier found for attribute 'isDone' in package 'com.myapp

I have just added your project in my gradle and it throws me this error during the sync:
C:\Users\Daniq\.android\build-
    cache\47f85a58837f42204ad53113b8b4916ad78affec\output\res\layout\date_time_range_picker.xml
    Error:(22) No resource identifier found for attribute 'isDone' in package 'com.myapp'
    Error:(39) No resource identifier found for attribute 'isVisible' in package 'com.myapp'
    Error:(52) No resource identifier found for attribute 'isVisible' in package 'com.myapp'
    Error:(98) No resource identifier found for attribute 'isVisible' in package 'com.myapp'
    Error:(111) No resource identifier found for attribute 'isVisible' in package 'com.myapp'
    Error:(28, 21) No resource type specified (at 'isDone' with value '@{viewModel.isCompletable}').
    Error:(50, 26) No resource type specified (at 'isVisible' with value '@{!viewModel.hasStartDate}').

I think you have not included your own xml layout attributes

Is there a solution for this error ?

What I have done.
I have forked

Worked with Android Studio pre 3.0. Now i face this error:
Did anyone come up with a solution?
Error:Execution failed for task ':app:compileReleaseJavaWithJavac'.

android.databinding.tool.util.LoggedErrorException: Found data binding errors.
****/ data binding error ****msg:Cannot find the setter for attribute 'app:isDone' with parameter type android.databinding.ObservableBoolean on android.support.v7.widget.Toolbar.
file:C:\Users\marku.gradle\caches\transforms-1\files-1.1\DateTimeRangePicker-v1.3.aar\80f3a844e0a9f0e3c9f07dd88e0eb0f2\res\layout\date_time_range_picker.xml
loc:27:22 - 27:44
****\ data binding error ****

can i get this project sample .. i can't found simple app from this library


Fastly configuration

Purpose of this pull request
This PR adds instructions for for configuring Fastly as a CDN in Adobe Commerce with API Mesh.
Pages affected:

Edge Caching

Staging site: https://adobedocs.github.io/graphql-mesh-gateway/gateway/fastly/

@amolina-adobe @cpartica my internal cloud does not have access to Fastly, so I was unable to confirm these instructions.

thanks @amolina-adobe! I believe I have addressed your comments. I attempted to tidy up the vcl snippets where possible. I'll hold off on making changes in response to your comments where we need @cpartica's input.

@cpartica @amolina-adobe I have updated this PR with the changes we discussed earlier, with two outstanding exceptions:

Adding a diagram
Verify the appropriate cURL timer


Correctly displays only the main page. The second level shows the error:

Correctly displays only the main page. The second level shows the error:
Warning: include(/home/mystart/oftalmika.com/www/wp-content/plugins/accelerated-mobile-pages/themes//oftalmika/template-single-service.php): failed to open stream: No such file or directory in /home/mystart/oftalmika.com/www/wp-includes/template-loader.php on line 89
Warning: include(): Failed opening '/home/mystart/oftalmika.com/www/wp-content/plugins/accelerated-mobile-pages/themes//oftalmika/template-single-service.php' for inclusion (include_path='.:/usr/local/pear/php54') in /home/mystart/oftalmika.com/www/wp-includes/template-loader.php on line 89

Have you deactivated the plugin? As I cannot see the amp on oftalmika.com
Also, if you are trying to add AMP on custom post types, it is not supported yet, but it will be supported very soon, as we are working on the update which will release on few days.
Thanks.

I deactivated the plugin due to incorrect display, so as not to lose traffic.
01.09.2016 16:25, Mohammed Kaludi<EMAIL_ADDRESS>Have you deactivated the plugin? As I cannot see the amp on oftalmika.com
Also, if you are trying to add AMP on custom post types, it is not supported yet, but it will be supported very soon, as we are working on the update which will release on few days.
Thanks.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
-- реклама -----------------------------------------------------------
Поторопись зарегистрировать самый короткий почтовый адрес @i.ua
http://mail.i.ua/reg - и получи 1Gb для хранения писем

This issue was after the 0.8 release.


Add more missing issue links to plugins

This is a follow up to https://github.com/jenkins-infra/repository-permissions-updater/pull/2559, which adds more missing issue tracker links to the plugins, allowing them to appear on plugins.jenkins.io and in Jenkins itself through the update center.

build is failing for a typo somewhere

build is failing for a typo somewhere

There we go, should be good now.

more apparently 👅

Checks are all green, had to read the error twice to understand that we actually need a github repository listed in a file.


Smoothfox values in quotation marks

In your Smoothfox /  NATURAL SMOOTH SCROLLING V3 part of your js you use the following three values without quotation marks:
user_pref("general.smoothScroll.msdPhysics.slowdownMinDeltaRatio", 2);
user_pref("general.smoothScroll.currentVelocityWeighting", 1);
user_pref("general.smoothScroll.stopDecelerationWeighting", 1);

The three need to be in quotation ("") to be recognized by Firefox - like in the original config by AveYo: https://github.com/AveYo/fox/blob/main/Natural Smooth Scrolling for user.js
So this works:
user_pref("general.smoothScroll.msdPhysics.slowdownMinDeltaRatio", "2");
user_pref("general.smoothScroll.currentVelocityWeighting", "1");
user_pref("general.smoothScroll.stopDecelerationWeighting", "1");

This issue might be specific to my German formats. Without quotation I only get the default or previous correct values. Tested on both of my Windows devices.

Hmm. I wonder why I didn't include the quotation marks from those values. I don't recall any discussion about those.
Anyway, thanks for catching that!


[SQL] az sql mi create, az sql mi update: Add --service-principal-type parameter to support Win Auth (Kerberos)

Description
Adding Service Principal parameter to az sql mi update and az sql mi create command for Windows Authentication for MI feature.
Testing Guide
A scenario test has been added for update of MI with service principal.
For manual testing: use az sql mi update and az sql mi create with --service-principal-type SystemAssigned
This checklist is used to make sure that common guidelines for a pull request are followed.

[x] The PR title and description has followed the guideline in Submitting Pull Requests.

[x] I adhere to the Command Guidelines.

[x] I adhere to the Error Handling Guidelines.

SQL

It seems not following our guideline for managed identity: https://github.com/Azure/azure-cli/blob/dev/doc/managed_identity_command_guideline.md

@evelyn-ys It appears that the existing command already doesn't follow the guidelines. I have not added a new command, only added a new parameter to existing command, as per PM's request for this feature. We are not looking to change the command at this time because this feature is supposed to be released soon.

@evelyn-ys @zhoxing-ms Could someone please review and approve this PR? The snap is in less than a week and I have not heard from anyone in a while?


About At

Good work! I have two questions:

The generation of the sparse domain attention (SDA) vector in the code is different from that in the paper. Why?  In your paper, there is an embedding layer. But in the code, the sparse domain attention (SDA) vector is initialized and regularized by their norm.

Why target domain attention can be generalized by only using the source data? It seems that At is generalized by feeding source data to a different path with a mask that is initialized differently. Why does this work?

Hi there.

Please carefully read the code and its comment, we do use the embedding layer as in the paper (feat_bootleneck_sdaE). Using randomly generating ones also work but lead to performance degradation a bit.

As mentioned in Sec. 3.4: "first we train the model on Ds with the cross-entropy loss, with both source and target domain attention As, At, this is to provide a good initialization for target adaptation where only At is engaged". The target adaptation must start from a good source model, which is the reason we train both As and At on source data at the beginning.


Include a warning for using external reward account

Include a warning in the quickstart, that using an different reward account needs manual moving funds to the validator account for the bridge.

Not relevant anymore because of #559


Memory Error!

Traceback (most recent call last):
File "train.py", line 385, in
train()
File "train.py", line 216, in train
for datum in data_loader:
File "/home/aeye/Documents/YOLACTvenv/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 582, in next
return self._process_next_batch(batch)
File "/home/aeye/Documents/YOLACTvenv/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 608, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
MemoryError: Traceback (most recent call last):
File "/home/aeye/Documents/YOLACTvenv/lib/python3.6/site-packages/torch/utils/data/_utils/worker.py", line 99, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/aeye/Documents/YOLACTvenv/lib/python3.6/site-packages/torch/utils/data/_utils/worker.py", line 99, in
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/aeye/yolact-master_Resent50_aug16/data/coco.py", line 88, in getitem
im, gt, masks, h, w, num_crowds = self.pull_item(index)
File "/home/aeye/yolact-master_Resent50_aug16/data/coco.py", line 151, in pull_item
{'num_crowds': num_crowds, 'labels': target[:, 4]})
File "/home/aeye/yolact-master_Resent50_aug16/utils/augmentations.py", line 661, in call
return self.augment(img, masks, boxes, labels)
File "/home/aeye/yolact-master_Resent50_aug16/utils/augmentations.py", line 54, in call
img, masks, boxes, labels = t(img, masks, boxes, labels)
File "/home/aeye/yolact-master_Resent50_aug16/utils/augmentations.py", line 380, in call
current_masks = masks[mask, :, :].copy()
MemoryError
During training, i am facing the above error after 4 lakh iterations are complete. I don't seem to understand as to why this error occurs..
@dbolya Can you help me with this?

It's kind of weird that you're half way through training and this is happening, but you're running out of memory.
What GPU are you using, what model, and what batch size? And are you sure that only YOLACT is using that GPU? Usually the memory used throughout training is pretty stable so idk why you're getting that error now.

@dbolya I'm currently running on RTX 2080Ti,.
Yes its using both the GPU stacks,
Batch size 8, Model = Resnet 50.
No other process is using the GPU stacks

Hmm okay that shouldn't be running out of memory. What version of Pytorch are you on? Pytorch 1.0.1 uses less GPU memory than the subsequent versions. See #33 for tips on how to downgrade if you have a later version.

@dbolya  Python 3.6
pytorch 1.1.0
torchvision 0.3.0

Yup I recommend you downgrade. Try this command:
pip3 install https://download.pytorch.org/whl/cu100/torch-1.0.1-cp36-cp36m-win_amd64.whl

I downgraded PyTorch version to 1.0.1 and torchvision to 0.2.0
Still i am facing the same issue..training stops  after a few iterations post 400K

Even after downgrading the Pytorch to 1.0.1 and Torch to 0.2.0, i am still facing the same issue..

Waaaait that's not a GPU memory error, that's a CPU memory error (augmentations are done on the CPU). What about your RAM? How much do you have available and is anything else using it at the moment?

Would this occur if the training input images are of 2k or 4k resolutions??

Uh maybe? If you have enough RAM, then it should be fine since the augmentation code scales it down to 550x550 anyway.

Okay.. i reduced the batch size and it happens to be training without errors for now...i will let you know if there are any further hurdles
Thanks for your input @dbolya

I find the same error, you can change the parameter of  num_workers，the default is 4 , maye be cause memorterror,  I used 0 is ok. @dbolya

I find the same error, you can change the parameter of num_workers，the default is 4 , maye be cause memoryerror, I used 0 is ok. @dbolya

@Mozen  thanks for the advice when i used the numworks 0 i am still getting this
ERROR: UNEXPECTED SEGMENTATION FAULT ENCOUNTERED IN WORKER
DataLoader worker (pid:2343) is killed by signal :Killed
any thoughts on this @dbolya