How to disable all pylance rules?

Hi!
I was recently forced to switch from old MS LSP (which was amazing and served me well for like 4 years) to Pylance.
My usage pattern of such tools includes very minimum interactions of me with the tool.
I don't want any errors / warnings / etc to be shown, no noise at all. Just like it was with the MS LSP.
For now, I can disable each individual rule from https://github.com/microsoft/pylance-release/blob/main/DIAGNOSTIC_SEVERITY_RULES.md But, there are lots of rules inside. And probably you are going to add new ones / remove / rename existing in the future. So, it would require to sync all this things manually almost each release.
Maybe I am missing something? How can I disable it once and for all (while keeping the only feature I need: go-to-definition)? Docs have no mention of it.

Most diagnostic rules in pylance are off unless you explicitly enable type checking (i.e. set python.analysis.typeCheckingMode to "basic"). Only the most basic of errors (those that will result in syntax errors) will appear. Those are presumably useful, since your code will crash at parse time if you try to run a source file that contains a syntax error.
The remaining diagnostic rules are all configurable, and only a few of them are enabled by default when typeCheckingMode is "off". For a full list, refer to this table. We do add new diagnostic rules occasionally, but so far all new rules have been off by default. It's unlikely that we'd add a new rule that is enabled by default, so you shouldn't need to worry about the need to continually update your settings.
It would be useful for us to understand which diagnostics you're seeing that you find annoying or unhelpful.

Thanks a lot for the quick response!

It would be useful for us to understand which diagnostics you're seeing that you find annoying or unhelpful.

Awesome, I would love to share my story! 🙂
Some more context on why this is important to me.
I spend most of my day (some days even more than 12 hours) in my text editor and I really want it to be as minimalistic as possible. Here's how it looks in my ideal world:

I've turned off everything I possibly could. All I need is code highlight and rare go-to-definition (it does not work in some cases (quite a lot of them), so I generally prefer to use cmd+shift+f to find symbols I need). But, still I'm used to it and sometimes right now (while MSLSP is disabled and my "languageServer" is set to "None" to keep my sanity) I miss it.
So, basically I just want to enable go-to-definition feature, that's all. But, when I enable Pylance it starts to show some output (which is might be perfectly useful for other users, just not for me). Here's how it looks like:

What bothers me?

Colorful underlines
By the way, I've learned to disable them with:

  "workbench.colorCustomizations": {
    // Disable wavy/squiggly underline in vscode
    "editorError.foreground":   "#00000000",
    "editorWarning.foreground": "#00000000",
    "editorInfo.foreground":    "#00000000"
  },

Red sector in right sidebar, I am still not able to disable it 😞
Even when disabling all rules from https://github.com/microsoft/pyright/blob/ff55b895f98533ad9e64c635996e6eeb80129f96/packages/pyright-internal/src/common/configOptions.ts#L372-L425 I still see some errors in my message window (this is very low priority, because I almost never use it):

For some reason it changes some colors of my text:

Looks like it reports unused variable / import. It still happens even after I explicitly set:
"python.analysis.diagnosticSeverityOverrides": {
    "reportMissingImports": "none",
    "reportUnusedVariable": "none",
  },

I've also tried to disable "editor.semanticHighlighting.enabled": false, nothing has changed.

It highlights code that I write as "invalid", despite the fact I am still writing it:

Demo: https://user-images.githubusercontent.com/4660275/136688246-4bab74bd-63be-4450-86ee-e7520ac3b04c.mov
This is partially solved with hidden underlines, but side bar is still affected.
I really hope this helps to illustrate my problem. Basically, it would be a good-enough solution for me if:

I will be able to hide errors from my sidebar (I don't want to disable the sidebar itself, because it shows where my git diffs are, which is helpful)
I will switch off semantic highlighting of my text, like for unused variables / arguments / etc
Underlines hack is already working, that's fine

It sounds like the main thing you're looking for is a way to disable any and all diagnostics, something we don't have and would be pretty niche, but I believe C/C++ and Java (at least) have such a thing (and VS Code does not offer any way to disable them wholesale).
I do think there's something to be said about ensuring messages we report are under a specific diagnostic rule, though; we have a good number of diagnostics outside syntax errors that can't be disabled, which feels inconsistent.
I'll also say that having | or reveal_type is are very uncommon; reveal_type crashes at runtime (and is only used in the context of testing out type checking), and we only give errors on | if you're using an interpreter before 3.10 (when that was introduced) outside of a stub.

It highlights code that I write as "invalid", despite the fact I am still writing it:

This is something that is explicitly a feature of all language servers I am aware of; it's what distinguishes them from the old days of on-save linters. This was largely covered by #237 (set an infinite delay so we only update things on save), in which we didn't receive wide feedback was needed.

we don't have and would be pretty niche, but I believe C/C++ and Java (at least) have such a thing

Awesome! Maybe I can send a PR with the same feature? Would it be accepted?

I'll also say that having | or reveal_type is are very uncommon; reveal_type crashes at runtime (and is only used in the context of testing out type checking), and we only give errors on | if you're using an interpreter before 3.10 (when that was introduced) outside of a stub.

Yes, but I am mostly working on type related things in Python, that's my main toolbox 🙂

Moving this issue to discussion as an enhancement request for comments and upvotes.


Add id key for storing the doi

We need an id key to store the generated doi for the model. Note that we already supported id key in the minimal RDF:
"id": {
            "type": "string",
            "description": "unique identifier for the resource, you can also use a `doi` e.g. generated from [zenodo](https://zenodo.org/)"
},

So it's natural to have it also here as an optional key.

let's not merge this, but incorporate it into #80

implemented in 7e9effe


Documentation suggestions

Love the docs! One nitpick -- there are a couple of objects you use, but don't show the import for (e.g. AutoTokenizer). Would you mind making those explicit?

Thanks! Basic usage code snippets were updated to show all imports as requested in commit 242a5551f65cd8d9ab5928293ba8388507837def
(linking for notification in main thread openjournals/joss-reviews#3652)


TableSelecDialog: pressing close button triggers search event

OpenUI5 version: openui5nightly, 1.52.7, 1.56.4
Browser/version (+device/version): any
URL (minimal example if possible):

Does not Work as Expected:

TableSelecDialog in UI5 1.52.7: https://sapui5.hana.ondemand.com/1.52.7/#/sample/sap.m.sample.TableSelectDialog/preview
TableSelecDialog in OpenUI5 Nightly: https://openui5nightly.hana.ondemand.com/#/sample/sap.m.sample.TableSelectDialog/preview
TableSelecDialog in UI5 1.56.6: https://sapui5.hana.ondemand.com/1.56.4/#/sample/sap.m.sample.TableSelectDialog/preview

Works As Expected:

TableSelecDialog in UI5 1.44.38: https://sapui5.hana.ondemand.com/1.44.38/explored.html#/sample/sap.m.sample.TableSelectDialog/preview

Steps to reproduce the problem:

Open the samples mentioned above
set a breakpoint anywhere in the handleSearch event handler of the controller
Now press the first button on the UI ("Show Table Select Dialog")
When the dialog opens press the close button

What is the expected result?
The search event handler should not be called at all (so the  breakpoint should not be hit)
What happens instead?
The search event handler is called (so the  breakpoint hits)
Any other information? (attach screenshot if possible)
In UI5 1.44.38 everything worked as expected (see link above). It seems that inside press handler of the cancel button this._resetSelection() is called (also note the comments in the code). In there, this._executeSearch is called which in turn fires the search event. This behavior is not documented - at least I can't find the documentation for that. Furthermore, the changed behavior can lead to ugly side effects.
I understant why search is called. However, IMHO there are several things I'd suggest as improvements:

clearly document for the search event that this event is fired if the close button is pressed and that it's fired before the close event itself is fired. Maybe it makes sense discussing the order in which the events are fired.
in the event parameter passed to the handler of the search event there should be an property like "reason" with the values "search" or "close" or so... At least something that allows the developer to detect in the search handler why it is called... This helps the developer to better decide what to do, for example to avoid certain things (i.e. skip setting the view to busy while the search request is running in case of "close").

Hi,
Thank you for the ticket. I've tracked this internally as<PHONE_NUMBER>. The status of the issue will be updated here in GitHub.
Regards,
Alexander Ivanov (UI5)


Improve opening multiple catalogs

I think it's worth clearing up that when you open multiple catalog yaml files into one catalog, the catalog entries are combined into a new catalog, which is a union of those individual catalogs.

When multiple catalog yamls are opened with open_catalog, the __repr__ of the returned catalog object is no different from an empty catalog

<Intake catalog: None>

whereas if you open just one catalog yaml file mycatalog.yaml, it shows
<Intake catalog: mycatalog>

I understand this is because the new combined catalog now has no name and if I give explicitly name='mycat' keyword, it will show that. Still, I think it's an issue that empty catalog is not distinguished from non-empty catalog. I think one possible way is to indicate the number of catalog entries available: for non-empty it would be non-zero.

If there are multiple sources with the same name, this raises no warning/exception and whatever is read later silently overwrites.

In fact, it seems much more natural to me to have a collection of catalogs object (that's actually what I expected originally from opening multiple catalog yaml files). To be able to do something like
d = open_catalog(<multiple catalogs>)
a = d.catalog1.source1.read()
b = d.catalog2.source1.read()

If I open multiple catalog yamls with the same metadata field (e.g., description), what description would I get in the resulting combined catalog?

Thank you for posting, @smoh
The docstring for yaml_files_cat specifies the parameter flatten, which controls whether the separate files become catalog objects within the root or whether all the entries come into the same namespace. This sounds like exactly what you were after. Is this documentation too hidden, where do you think it should go? Is True an unexpected default here?
Totally agree on the repr of the Catalog object. How about, if a glob was passed, it appears as given
<Intake catalog: /my/path/*.yaml>, but if a list of files or globs was given, it just says how many <Intake catalog: 3 paths> ?
On name collisions when flattening from multiple catalogs, this feels like it should raise an exception - agreed?

Thanks for your reply.

Oh, I just didn't see that option and didn't look around enough from open_catalog function. The behavior from flatten=False is exactly what I wanted all along. Since I had it in my mind that one catalog (a related set of sources) = one yaml, it seemed more natural to have flatten=False behavior by default but I'm not sure if it is for everyone. Even if it is left as is, how about a) being more specific about

passed to subclass instance, see documentation of the individual
    catalog classes.

and/or b) having a
See also
--------
intake.open_yaml_files_cat, ...

Your suggestions on __repr__ look very sensible!

Name collision: Yes, something other than nothing will be better but I think strictly raising an exception is best.


stop logging of createOrUpdateJob

The current implementation of createOrUpdateJob prints "createOrUpdate" and "createOrUpdateJob Finished" info logs every time the function runs, both before and after execution. Since this function is called repeatedly from the reconciliation loop, these logs are generated excessively. However, they don't provide any meaningful information and clutter the log readability.
This commit removes these logs to make the logs for pie much clearer.

There is a similar log output at the end of this function. Does this log need to be reconsidered?

Indeed. I removed this logging, too.


Don't index sitemap listings themselves

Add the noindex HTTP header to the sitemap responses, since we may wish to avoid indexing certain names that also appear in the URLs themselves of the reports.

Deployed, and the header looks good


[AutoPR cdn/resource-manager] update description for UrlRewrite Action

Created to sync https://github.com/Azure/azure-rest-api-specs/pull/7715

(message created by the CI based on PR content)

This PR has been merged into https://github.com/Azure/azure-sdk-for-python/pull/8374


mouse is not change to hand style in clicking pencil icon to call tasks modify pan

and after click pencil icon, it open page in the same time

The task creat or edit modal should be called out if you have the Tasks plugin installed, otherwise it just open the page.

The task creat or edit modal should be called out if you have the Tasks plugin installed, otherwise it just open the page.

yes i know, but if the pencil icon can be click, it may great to change the mouse to hand style to notice user which can be clicked

You are right, I will change the element type of the pencil icon to the  tag to make it happen.

It should be as expected in v0.1.17.


Feature: incloud flag

Add method to determine if photo is in the cloud (cloudstate)
incloud()

This is needed to implement #49 applescript export causes Photos to hang with modal dialog if attempt to export photo that’s missing and not in cloud


Refactoring the javaewah

I have refactored the javaewah code where I have used the extract class, extract method, move class, rename variable, move field, replace conditional with polymorphism as a part of my course study. It would be great if you can review the PR request and accept it.

Running tests.

Adding the Refactored Set II updated. Since previous one was failing the compilation

I have added the Refactored SET II after changing the refactor method. Can you please review the PR again

I have looked at the code and I'd like you to do is to break down the proposed changes and to justify each change.
Acceptable changes should fall into one of these three categories generally...

Bug fixing.
Performance enhancement.
New features.

Other changes (e.g., coding style) are discouraged. It might still be acceptable, but you need to carefully justify the proposed change.
Refactoring in general is discouraged.
I am going to close this. I invite you to propose specific and justified changes.


Fixes and tests clean up

What this PR does:
Which issue(s) this PR fixes:
Fixes to accept username and password instead of token, so the driver ll automatically generate/refresh token.
Fixes and test cases clean up based on integration testing JSON API server on local.
Checklist

[X] Changes manually tested
[ ] Automated Tests added/updated
[ ] Documentation added/updated
[ ] CLA Signed: DataStax CLA

Thanks @vkarpov15!


App is cant taking without directx

hi i m searching to process for select the target process. After that example game using directx11 name is hesoyam.
i will see just hesoyam without directx version...
also bullshit i saw chrome dx11, explorer dx09... its mean irrelevant things have directx version.....
but in ur app i can do that. I mean i can hooked in ur app.

What I mean is normally a game works with directx11 but I see it here without the directx version and I see other programs that do not work with directx have the directx version, it's a very strange thing.

wtf

if i not used Filter. i can see directx game names but without directx version.
example i see League of Legends without directx version.
code is ; ;
Me.checkboxProcessList.Items.Clear()
For Each process As Process In process.GetProcesses()
If Me.processDict.ContainsKey(process.ProcessName) Then
Dim procInfo As ProcInfo = Me.processDict(process.ProcessName)
If procInfo IsNot Nothing AndAlso (Not Me.checkFilerList.Checked OrElse procInfo.usedDX <> 0) Then
Me.checkboxProcessList.Items.Add(procInfo)
End If
Else
Dim procInfo As ProcInfo = New ProcInfo()
' procInfo.usedDX = 0
Dim flag As Boolean = False
Try
For Each obj As Object In process.Modules
Dim processModule As ProcessModule = CType(obj, ProcessModule)
If processModule.ModuleName = "d3d9.dll" Then
procInfo.usedDX = 1
flag = True
ElseIf processModule.ModuleName = "d3d10.dll" Then
procInfo.usedDX = 2
flag = True
ElseIf processModule.ModuleName = "d3d11.dll" Then
procInfo.usedDX = 4
flag = True
End If
Next
Catch ex As Exception
Me.processDict.Add(process.ProcessName, Nothing)
GoTo IL_17A
End Try
If Not Me.checkFilerList.Checked OrElse flag Then
ProcInfo.procname = process.ProcessName
Me.processDict.Add(process.ProcessName, ProcInfo)
Me.checkboxProcessList.Items.Add(ProcInfo)
End If
End If
next

i mean it getting "Game + unknown" so need to be = "Game + DX11"
in ur app it getting game+dx11 ,, in my unknown dx


Catch some incorrect method parameter or call argument formatting patterns with checkstyle

There is no existing and precise check for this in checkstyle, but it's possible to create a regexp that catches a lot of violations of the corresponding Druid style rule without false positives.
One important file to review is codestyle/parameters_and_arguments.txt.

+1

@QiuMM No

Hmm, is Travis running for the last two commits? The last Travis job I found is https://travis-ci.org/apache/incubator-druid/builds/442767166 which tested https://github.com/apache/incubator-druid/commit/4bd3e4e29fd9ad319fc4c305e796ade53cdd8cad.

@jihoonson there is a Github outage: https://status.github.com/messages

@leventov thanks for the check. It's running now.


Incorrect register addresses in stm32wb55xx.h

Describe the bug
Following section found in stm32wb55xx.h file is probably there by accident.
Addresses belong to I2C3 and CRS peripherals not USB
Correct base address for packet memory can be also found in this header defined as USB1_PMAADDR,
same for USB1_BASE
#define USB_BASE                              (0x40005C00UL)                   /*!< USB_IP Peripheral Registers base address */
#define USB_PMAADDR_Pos           (13U)
#define USB_PMAADDR_Msk           (0x20003UL << USB_PMAADDR_Pos)               /*!< 0x40006000 */
#define USB_PMAADDR               USB_PMAADDR_Msk                              /*!< USB_IP Packet Memory Area base address */

#define USB_CNTR                             (USB_BASE + 0x40)           /*!< Control register */
#define USB_ISTR                             (USB_BASE + 0x44)           /*!< Interrupt status register */
#define USB_FNR                              (USB_BASE + 0x48)           /*!< Frame number register */
#define USB_DADDR                            (USB_BASE + 0x4C)           /*!< Device address register */
#define USB_BTABLE                           (USB_BASE + 0x50)           /*!< Buffer Table address register */
#define USB_LPMCSR                           (USB_BASE + 0x54)           /*!< LPM Control and Status register */
#define USB_BCDR                             (USB_BASE + 0x58)           /*!< Battery Charging detector register*/

ST Internal Reference: 126136

Hi @kasjer,
The issue you reported has been fixed in the frame of version v1.12.0 of the cmsis_device_wb recently published on GitHub.
Please allow me thus to close this thread.
With regards,


RequireJS and Ink

Hi guys, awesome work with Ink. I use it regullary on multiple projects.
Recently I started using RequireJS and the whole AMD concept. I am still pretty new to this problematics. Now I'm trying to use RequireJS and Ink in one project. I understand that Ink has its own module loader simillar to RequireJS.
Is there a way to use these two alongside with each other like this:

Load Ink with RequireJS with shimming (exports attribute)

2.Still be able to use classes and data attributes, so that I dont have to load single modules for every ink-dismiss on every page. Basically what I want is to load few of the commonly used modules on every page load and attach them automatically to classes (like autoload.js does). Less frequently used modules can be loaded by requireModules.
Thanks for responses and ceers!

Ok, I just found out that simly using require on autoload.js enables the Ink functionality, just like

requireModules is not AMD-compatible. In AMD, modules can be anonymous, and are defined by URLs. In Ink, every module must have a name, and their name is a dotted path.
You may have luck with monkey patching the require function into loading both AMD modules and Ink modules, but ultimately these simply weren't designed to work together.
You mention using autoload.js to enable Ink functionality.
Autoload.js works by creating UI widgets on elements with certain classes. For example, just by adding ink-modal to a div you're making that div an Ink modal, as long as you use autoload.js. You'll notice most examples on the site have their javascript preceded with a "you don't need this if you're using autoload.js" note.

Hello Fabio,
thank for a fast response! Indeed the autoload.js now works like a charm. I was just curious why other approach didn't work before I tried autoload and you have satisfied that curiosity :-) Thanks again!


Issue with gradle version 7.0

Hi bjorn,
upgrading to gradle version 7.0 causes an error in combination with the plugin.

Type 'Wsdl2JavaTask' property 'sourcesOutputDir' is annotated with @PathSensitive but that is not allowed for 'OutputDirectory' properties.
Reason: This modifier is used in conjunction with a property of type 'OutputDirectory' but this doesn't have semantics.
Possible solution: Remove the '@PathSensitive' annotation.
Please refer to https://docs.gradle.org/7.0/userguide/validation_problems.html#incompatible_annotations for more details about this problem.

Is it possible to remove this issue in a newer version of this plugin?
I could open a PR with the possible solution, but I'm not sure this issue will resolve all incompatibilities with gradle 7.0. Looking forward to your response
Thanks

Thank you for the report, and apologies for the very late response. It has been fixed in the newest version of the plugin.


Allow to change primary email before account activation

Maybe I haven't read the code carefully, but is there a CAPTCHA validation (if it's enabled) to change email before account activation? I mean I can:

Register with an email address, pass the CAPTCHA validation on the registration page manually.
Use a bot script to resend validation emails automatically, and each time with a different email address.

Maybe I haven't read the code carefully, but is there a CAPTCHA validation (if it's enabled) to change email before account activation? I mean I can:
* Register with an email address, pass the CAPTCHA validation on the registration page manually.

* Use a bot script to resend validation emails automatically, and each time with a different email address.

There is no difference. Because the "limit" is done by username:

Maybe I haven't read the code carefully, but is there a CAPTCHA validation (if it's enabled) to change email before account activation? I mean I can:
* Register with an email address, pass the CAPTCHA validation on the registration page manually.

* Use a bot script to resend validation emails automatically, and each time with a different email address.

There is no difference. Because the "limit" is done by username:

As I have tested, it's unavailable since it's unrelated to this PR.

why not allow not actived user using '/user/settings' router directly?

why not allow not actived user using '/user/settings' router directly?

Inactive users should have the minimum services.


Current Dictionary not identified

I use two dictionaries for the same language because some words can only be found in one, others in the other. So I often switch between the two, without knowing which one is currently active.

The active dictionary is only identified via the flag, which is obviously the same for both dictionaries. (Not counting the info via "About dictionary...")
In the dictionary list the active dictionary is not highlighted.
Selecting the active dictionary from the list is not quicker than switching to any other. If it was I'd know that I haven't switched.

I propose to implement any of these (in descending preference):

fix https://github.com/rdoeffinger/Dictionary/issues/31
highlight/deactivate/grey out the active dictionary in the dictionary list
skip the switching process if the active dictionary is selected
add an info about the current dictionary in the dictionary view

Why don't you just use the flag toggle to see what the other language is?

highlight/deactivate/grey out the active dictionary in the dictionary list

sounds like a very reasonable suggestion though. Even if I know Android little enough that it might be non-trivial to actually implement.

skip the switching process if the active dictionary is selected

I actually don't truly understand the advantage that would have for you?

add an info about the current dictionary in the dictionary view

Didn't come up with a good way for that so far (in particular, not wasting space).
One thing I considered though was to let the dictionary open at a random word instead of at the start by default.
I'd think in many cases you'd then see from the translation which language it is, plus you wouldn't each time see the "messy" entries at the start.
But I wasn't sure if this is really a good idea or this would maybe just be annoying users, which is probably the major reason I haven't done it yet.

Why don't you just use the flag toggle to see what the other language is?

See my 1st paragraph. My issue is when I use, for example, two English dictionaries. The problem is not to know if it's English or German but which English it is.

skip the switching process if the active dictionary is selected

I actually don't truly understand the advantage that would have for you?

If it behaves like as if tapped return (quick) I'd know that I haven't changed the dictionary. I know which one I just tapped, so I'll tap the other one. If it takes a while to load the dictionary I'll have to look again at the search result, if it's different from what I just saw. Sometimes it's very similar, so I switch back and forth...
My phone is a slow single core, so maybe on modern phones that doesn't even make a difference.

But I wasn't sure if this is really a good idea or this would maybe just be annoying users, which is probably the major reason I haven't done it yet.

Yep, guess so. Please don't.

See my 1st paragraph. My issue is when I use, for example, two English dictionaries. The problem is not to know if it's English or German but which English it is.

Oh, you don't mean a English-to-something and a English-to-something-else, but e.g. the included English dictionary and one you created yourself from a different source.
Sorry, I completely misunderstood.
The random word thing would be complete nonsense for that of course.
I don't like that loading the dictionary is slow though, even if it's an old slow phone, I kind of think it shouldn't be...

Well, you're right given the power in my device (even though a little outdated now) compared to the technology of a decade ago. Actually, the phone is quick enough, but often it's busy with something else. But let's not get started with that rant...
Anyway, it's not like it's taking ages to load a dictionary. Then I wouldn't use the app. But you know, if you routinely and frequently use a device you get quite swift and any second of delay, which is irrelevant for sporadic use, becomes annoying.

Changed in c9012e8abcdbd2d68f348eefe72f7faae979d5d5 so that the button for the active directory is shown pressed in the list.
Apart from that, it likely should be possible to improve dictionary load performance.
I am mostly surprised since it is not too bad even on the emulator.
Possibly the biggest issue I see there is the collation/transliteration loading, which is necessary for the search. That is not handled intelligently and should probably be cached as there is no reason to re-load it when not switching languages.

Nice, thanks!
Well, your emulator runs on a big CPU and doesn't have to handly Whatsapp, Push-E-Mail, Facebook and whatnot along the way. Maybe my Android 4.4 is not really designed to run on single cores.
No need to reload anymore now!


Policies making use of host capabilities are slow

Policies that make use of host capabilities (like the ones interacting with Kubernetes) are slower than the ones that do not make use of this feature.
The situation tends to get even worse when one or more of these events happen:

The policy server hosting the policy is under a high load
The amount of data exchanged between the policy server and the wasm guest is big

Testing environment
I've been able to reproduce this issue also when running Policy Server outside of Kubernetes, on my local machine. This is great for development purposes.
I've been using k6 to generate load against a Policy Server instance that hosts two policies:

Gatekeeper policy (hence written with Rego)
TinyGo policy

Both policies ask the host to get all the Kubernetes Namespaces available.
In my tests, the Kubernetes cluster has 3000 Namespace resources.
k6 and policy-server are on the same machine, communication happens over http (no TLS).
Benchmark data
These are the benchmarks produced by non context aware policies:
          /\      |‾‾| /‾‾/   /‾‾/
     /\  /  \     |  |/  /   /  /
    /  \/    \    |     (   /   ‾‾\
   /          \   |  |\  \ |  (‾)  |
  / __________ \  |__| \__\ \_____/ .io

  execution: local
     script: main.js
     output: -

  scenarios: (100.00%) 1 scenario, 20 max VUs, 1m35s max duration (incl. graceful stop):
           * policy_server: Up to 20 looping VUs for 1m5s over 3 stages (gracefulRampDown: 30s, gracefulStop: 30s)

     █ apparmor psp

       ✓ response code was 200
       ✓ response uid matches request
       ✓ admission request accepted

     █ PSP user group - accept

       ✓ response code was 200
       ✓ response uid matches request
       ✓ admission request accepted

     █ PSP user group - reject

       ✓ response code was 200
       ✓ response uid matches request
       ✓ admission request accepted

     checks.........................: 100.00% ✓ 293013      ✗ 0
     data_received..................: 39 MB   592 kB/s
     data_sent......................: 334 MB  5.1 MB/s
     group_duration.................: avg=11.76ms min=1.16ms   med=10.93ms max=66.91ms  p(90)=19.18ms p(95)=22.43ms
     http_req_blocked...............: avg=4.4µs   min=1.43µs   med=3.06µs  max=17.32ms  p(90)=4.19µs  p(95)=4.72µs
     http_req_connecting............: avg=247ns   min=0s       med=0s      max=17.24ms  p(90)=0s      p(95)=0s
   ✓ http_req_duration..............: avg=10.94ms min=797.15µs med=10.15ms max=60.58ms  p(90)=18.19ms p(95)=21.33ms
       { expected_response:true }...: avg=10.94ms min=797.15µs med=10.15ms max=60.58ms  p(90)=18.19ms p(95)=21.33ms
   ✓ http_req_failed................: 0.00%   ✓ 0           ✗ 97671
     http_req_receiving.............: avg=66.69µs min=16.25µs  med=36.91µs max=22.26ms  p(90)=58.98µs p(95)=79.57µs
     http_req_sending...............: avg=32.35µs min=8.63µs   med=18.71µs max=41.59ms  p(90)=26.16µs p(95)=31.19µs
     http_req_tls_handshaking.......: avg=0s      min=0s       med=0s      max=0s       p(90)=0s      p(95)=0s
     http_req_waiting...............: avg=10.84ms min=756.63µs med=10.07ms max=58.68ms  p(90)=18.05ms p(95)=21.17ms
     http_reqs......................: 97671   1502.393345/s
     iteration_duration.............: avg=35.38ms min=4.26ms   med=35.35ms max=119.18ms p(90)=51.51ms p(95)=57.76ms
     iterations.....................: 32557   500.797782/s
     vus............................: 1       min=1         max=20
     vus_max........................: 20      min=20        max=20

running (1m05.0s), 00/20 VUs, 32557 complete and 0 interrupted iterations
policy_server ✓ [======================================] 00/20 VUs  1m5s

While these are the results against the Gatekeeper policy that fetches 3000 Namespaces. The policy doesn't do anything with this data, it always accepts the incoming request:
          /\      |‾‾| /‾‾/   /‾‾/
     /\  /  \     |  |/  /   /  /
    /  \/    \    |     (   /   ‾‾\
   /          \   |  |\  \ |  (‾)  |
  / __________ \  |__| \__\ \_____/ .io

  execution: local
     script: main.js
     output: -

  scenarios: (100.00%) 1 scenario, 20 max VUs, 1m35s max duration (incl. graceful stop):
           * policy_server: Up to 20 looping VUs for 1m5s over 3 stages (gracefulRampDown: 30s, gracefulStop: 30s)

     █ gatekeeper-always-happy

       ✓ response code was 200
       ✓ response uid matches request
       ✓ admission request accepted

     checks.........................: 100.00% ✓ 5754      ✗ 0
     data_received..................: 543 kB  8.3 kB/s
     data_sent......................: 4.3 MB  66 kB/s
     group_duration.................: avg=602.31ms min=77.17ms med=640.52ms max=1.14s    p(90)=782.23ms p(95)=827.58ms
     http_req_blocked...............: avg=9.22µs   min=1.47µs  med=3.69µs   max=5.42ms   p(90)=4.69µs   p(95)=5.43µs
     http_req_connecting............: avg=1.6µs    min=0s      med=0s       max=369.76µs p(90)=0s       p(95)=0s
   ✓ http_req_duration..............: avg=601.69ms min=76.82ms med=639.84ms max=1.14s    p(90)=781.67ms p(95)=827.03ms
       { expected_response:true }...: avg=601.69ms min=76.82ms med=639.84ms max=1.14s    p(90)=781.67ms p(95)=827.03ms
   ✓ http_req_failed................: 0.00%   ✓ 0         ✗ 1918
     http_req_receiving.............: avg=77.43µs  min=21.72µs med=66.78µs  max=7.86ms   p(90)=83.22µs  p(95)=94.83µs
     http_req_sending...............: avg=35.55µs  min=12.13µs med=22.27µs  max=12.99ms  p(90)=28.19µs  p(95)=31.95µs
     http_req_tls_handshaking.......: avg=0s       min=0s      med=0s       max=0s       p(90)=0s       p(95)=0s
     http_req_waiting...............: avg=601.58ms min=76.75ms med=639.76ms max=1.14s    p(90)=780.93ms p(95)=826.93ms
     http_reqs......................: 1918    29.481948/s
     iteration_duration.............: avg=602.34ms min=77.19ms med=640.55ms max=1.14s    p(90)=782.26ms p(95)=827.61ms
     iterations.....................: 1918    29.481948/s
     vus............................: 1       min=1       max=20
     vus_max........................: 20      min=20      max=20

running (1m05.1s), 00/20 VUs, 1918 complete and 0 interrupted iterations
policy_server ✓ [======================================] 00/20 VUs  1m5s

These are the stats from a TinyGo policy that fetches all the available namespaces and then accepts the request. The policy makes no use of k8s-objects, it also doesn't do anything with the list of namespaces obtained (it immediately drops the variable containing the []byte):
          /\      |‾‾| /‾‾/   /‾‾/
     /\  /  \     |  |/  /   /  /
    /  \/    \    |     (   /   ‾‾\
   /          \   |  |\  \ |  (‾)  |
  / __________ \  |__| \__\ \_____/ .io

  execution: local
     script: main.js
     output: -

  scenarios: (100.00%) 1 scenario, 20 max VUs, 1m35s max duration (incl. graceful stop):
           * policy_server: Up to 20 looping VUs for 1m5s over 3 stages (gracefulRampDown: 30s, gracefulStop: 30s)

     █ tingo-always-happy

       ✓ response code was 200
       ✓ response uid matches request
       ✓ admission request accepted

     checks.........................: 100.00% ✓ 6192      ✗ 0
     data_received..................: 584 kB  9.0 kB/s
     data_sent......................: 4.6 MB  71 kB/s
     group_duration.................: avg=560.5ms  min=16.56ms med=621.17ms max=1.31s   p(90)=799.06ms p(95)=892.83ms
     http_req_blocked...............: avg=7.22µs   min=1.46µs  med=3.43µs   max=4.3ms   p(90)=4.3µs    p(95)=4.81µs
     http_req_connecting............: avg=3.19µs   min=0s      med=0s       max=4.24ms  p(90)=0s       p(95)=0s
   ✗ http_req_duration..............: avg=559.93ms min=16.3ms  med=620.54ms max=1.31s   p(90)=798.26ms p(95)=892.27ms
       { expected_response:true }...: avg=559.93ms min=16.3ms  med=620.54ms max=1.31s   p(90)=798.26ms p(95)=892.27ms
   ✓ http_req_failed................: 0.00%   ✓ 0         ✗ 2064
     http_req_receiving.............: avg=67.89µs  min=21.73µs med=58.28µs  max=8.09ms  p(90)=71.53µs  p(95)=77.35µs
     http_req_sending...............: avg=48.71µs  min=10.49µs med=20.56µs  max=17.08ms p(90)=25µs     p(95)=27.75µs
     http_req_tls_handshaking.......: avg=0s       min=0s      med=0s       max=0s      p(90)=0s       p(95)=0s
     http_req_waiting...............: avg=559.81ms min=16.25ms med=620.46ms max=1.31s   p(90)=798.16ms p(95)=892.2ms
     http_reqs......................: 2064    31.747843/s
     iteration_duration.............: avg=560.52ms min=16.58ms med=621.2ms  max=1.31s   p(90)=799.09ms p(95)=892.86ms
     iterations.....................: 2064    31.747843/s
     vus............................: 1       min=1       max=20
     vus_max........................: 20      min=20      max=20

running (1m05.0s), 00/20 VUs, 2064 complete and 0 interrupted iterations
policy_server ✓ [======================================] 00/20 VUs  1m5s
ERRO[0065] thresholds on metrics 'http_req_duration' have been crossed

We've made a couple of fixes that have made into 1.11-RC3.
The testing environment is the same:

A cluster with 3000 namespaces
k6 to generate load against a policy-server process running uncontainerized

At the bottom of the blog post you can find a table comparing the numbers
TinyGo
This is the same policy described above. These are the new numbers:
          /\      |‾‾| /‾‾/   /‾‾/
     /\  /  \     |  |/  /   /  /
    /  \/    \    |     (   /   ‾‾\
   /          \   |  |\  \ |  (‾)  |
  / __________ \  |__| \__\ \_____/ .io

  execution: local
     script: main.js
     output: -

  scenarios: (100.00%) 1 scenario, 20 max VUs, 1m35s max duration (incl. graceful stop):
           * policy_server: Up to 20 looping VUs for 1m5s over 3 stages (gracefulRampDown: 30s, gracefulStop: 30s)

     █ tinygo

       ✓ response code was 200
       ✓ response uid matches request
       ✓ admission request accepted

     checks.........................: 100.00% ✓ 32457      ✗ 0
     data_received..................: 3.1 MB  47 kB/s
     data_sent......................: 24 MB   374 kB/s
     group_duration.................: avg=106.54ms min=19.92ms med=114.17ms max=173.45ms p(90)=130.7ms  p(95)=135.64ms
     http_req_blocked...............: avg=4.62µs   min=1.35µs  med=3.4µs    max=7.07ms   p(90)=4.58µs   p(95)=5.16µs
     http_req_connecting............: avg=906ns    min=0s      med=0s       max=7ms      p(90)=0s       p(95)=0s
   ✓ http_req_duration..............: avg=105.95ms min=19.39ms med=113.55ms max=172.9ms  p(90)=130.09ms p(95)=135.02ms
       { expected_response:true }...: avg=105.95ms min=19.39ms med=113.55ms max=172.9ms  p(90)=130.09ms p(95)=135.02ms
   ✓ http_req_failed................: 0.00%   ✓ 0          ✗ 10819
     http_req_receiving.............: avg=64.09µs  min=16.02µs med=59.87µs  max=5.75ms   p(90)=86.06µs  p(95)=98.14µs
     http_req_sending...............: avg=37.38µs  min=8.8µs   med=21.62µs  max=17.43ms  p(90)=28.49µs  p(95)=31.96µs
     http_req_tls_handshaking.......: avg=0s       min=0s      med=0s       max=0s       p(90)=0s       p(95)=0s
     http_req_waiting...............: avg=105.85ms min=19.31ms med=113.44ms max=172.82ms p(90)=129.99ms p(95)=134.91ms
     http_reqs......................: 10819   166.416107/s
     iteration_duration.............: avg=106.56ms min=19.97ms med=114.2ms  max=173.48ms p(90)=130.74ms p(95)=135.66ms
     iterations.....................: 10819   166.416107/s
     vus............................: 1       min=1        max=20
     vus_max........................: 20      min=20       max=20

running (1m05.0s), 00/20 VUs, 10819 complete and 0 interrupted iterations
policy_server ✓ [======================================] 00/20 VUs  1m5s

Rego
These are the new numbers of the Rego policy:
          /\      |‾‾| /‾‾/   /‾‾/
     /\  /  \     |  |/  /   /  /
    /  \/    \    |     (   /   ‾‾\
   /          \   |  |\  \ |  (‾)  |
  / __________ \  |__| \__\ \_____/ .io

  execution: local
     script: main.js
     output: -

  scenarios: (100.00%) 1 scenario, 20 max VUs, 1m35s max duration (incl. graceful stop):
           * policy_server: Up to 20 looping VUs for 1m5s over 3 stages (gracefulRampDown: 30s, gracefulStop: 30s)

     █ rego-always-happy

       ✓ response code was 200
       ✓ response uid matches request
       ✓ admission request accepted

     checks.........................: 100.00% ✓ 7875      ✗ 0
     data_received..................: 743 kB  11 kB/s
     data_sent......................: 5.9 MB  91 kB/s
     group_duration.................: avg=439.94ms min=76.42ms med=476.31ms max=600.95ms p(90)=524.66ms p(95)=538.25ms
     http_req_blocked...............: avg=5.75µs   min=1.69µs  med=3.93µs   max=325.13µs p(90)=4.96µs   p(95)=5.62µs
     http_req_connecting............: avg=1.22µs   min=0s      med=0s       max=239.99µs p(90)=0s       p(95)=0s
   ✓ http_req_duration..............: avg=439.3ms  min=75.82ms med=475.62ms max=600.31ms p(90)=524.02ms p(95)=537.42ms
       { expected_response:true }...: avg=439.3ms  min=75.82ms med=475.62ms max=600.31ms p(90)=524.02ms p(95)=537.42ms
   ✓ http_req_failed................: 0.00%   ✓ 0         ✗ 2625
     http_req_receiving.............: avg=72.3µs   min=24.53µs med=70.16µs  max=1.12ms   p(90)=86.06µs  p(95)=93.98µs
     http_req_sending...............: avg=37.77µs  min=10.98µs med=23.89µs  max=14.42ms  p(90)=30.2µs   p(95)=33.51µs
     http_req_tls_handshaking.......: avg=0s       min=0s      med=0s       max=0s       p(90)=0s       p(95)=0s
     http_req_waiting...............: avg=439.19ms min=75.72ms med=475.52ms max=600.21ms p(90)=523.92ms p(95)=537.33ms
     http_reqs......................: 2625    40.335426/s
     iteration_duration.............: avg=439.98ms min=76.48ms med=476.34ms max=600.98ms p(90)=524.69ms p(95)=538.28ms
     iterations.....................: 2625    40.335426/s
     vus............................: 1       min=1       max=20
     vus_max........................: 20      min=20      max=20

running (1m05.1s), 00/20 VUs, 2625 complete and 0 interrupted iterations
policy_server ✓ [======================================] 00/20 VUs  1m5s

Future optimization for Rego
We also believe there's one more optimization that can be made when running Gatekeeper policies (not OPA ones). We have a hacked working prototype that needs further cleanups. It's numbers are promising:
          /\      |‾‾| /‾‾/   /‾‾/
     /\  /  \     |  |/  /   /  /
    /  \/    \    |     (   /   ‾‾\
   /          \   |  |\  \ |  (‾)  |
  / __________ \  |__| \__\ \_____/ .io

  execution: local
     script: main.js
     output: -

  scenarios: (100.00%) 1 scenario, 20 max VUs, 1m35s max duration (incl. graceful stop):
           * policy_server: Up to 20 looping VUs for 1m5s over 3 stages (gracefulRampDown: 30s, gracefulStop: 30s)

     █ rego-serialization-cache

       ✓ response code was 200
       ✓ response uid matches request
       ✓ admission request accepted

     checks.........................: 100.00% ✓ 22947      ✗ 0
     data_received..................: 2.2 MB  33 kB/s
     data_sent......................: 17 MB   264 kB/s
     group_duration.................: avg=150.72ms min=21.56ms med=164.16ms max=230.69ms p(90)=181.18ms p(95)=186.05ms
     http_req_blocked...............: avg=4.15µs   min=1.38µs  med=3.44µs   max=679.96µs p(90)=4.15µs   p(95)=4.5µs
     http_req_connecting............: avg=455ns    min=0s      med=0s       max=624.1µs  p(90)=0s       p(95)=0s
   ✓ http_req_duration..............: avg=150.14ms min=21.25ms med=163.59ms max=230.03ms p(90)=180.62ms p(95)=185.46ms
       { expected_response:true }...: avg=150.14ms min=21.25ms med=163.59ms max=230.03ms p(90)=180.62ms p(95)=185.46ms
   ✓ http_req_failed................: 0.00%   ✓ 0          ✗ 7649
     http_req_receiving.............: avg=60.74µs  min=22.57µs med=58.91µs  max=7.94ms   p(90)=73.83µs  p(95)=78.59µs
     http_req_sending...............: avg=31.27µs  min=10.5µs  med=21.52µs  max=12.79ms  p(90)=27.42µs  p(95)=29.18µs
     http_req_tls_handshaking.......: avg=0s       min=0s      med=0s       max=0s       p(90)=0s       p(95)=0s
     http_req_waiting...............: avg=150.05ms min=21.19ms med=163.5ms  max=229.94ms p(90)=180.54ms p(95)=185.38ms
     http_reqs......................: 7649    117.656386/s
     iteration_duration.............: avg=150.74ms min=21.57ms med=164.2ms  max=230.72ms p(90)=181.2ms  p(95)=186.08ms
     iterations.....................: 7649    117.656386/s
     vus............................: 1       min=1        max=20
     vus_max........................: 20      min=20       max=20

running (1m05.0s), 00/20 VUs, 7649 complete and 0 interrupted iterations
policy_server ✓ [======================================] 00/20 VUs  1m5s

Recap
The new numbers look so much better. The future work we could do on Rego looks particularly promising, this is something we can deliver as part of 1.12 (or even earlier, as a patch to 1.11)

avg (ms)

min (ms)

med (ms)

max (ms)

P(90) (ms)

P(95) (ms)

before
after
delta (%)
before
after
delta (%)
before
after
delta (%)
before
after
delta (%)
before
after
delta (%)
before
after
delta (%)

tinygo
559.93
105.95
-81.08
16.3
19.39
18.96
620.54
113.55
-81.70
1310
172.9
-86.80
798.26
130.09
-83.70
892.27
135.02
-84.87

rego
601.69
439.3
-26.99
76.82
75.82
-1.30
639.84
475.62
-25.67
1140
600.31
-47.34
781.67
524.02
-32.96
827.03
537.42
-35.02

rego future work
601.69
105.95
-82.39
76.82
19.39
-74.76
639.84
113.55
-82.25
1140
172.9
-84.83
781.67
130.09
-83.36
827.03
135.02
-83.67

A final point, it's not unusual to have Rego policies looking for a specific object inside of the inventory of the Kubernetes resources defined inside of the cluster.
For example, a policy validating the creation of (Cluster)RoleBinding objects could look at the .subjects defined by the binding, and then ensure all the ServiceAccount mentioned are defined inside of an existing Namespace. This policy needs to know if a specific Namespace (or more than one, depending on the number of ServiceAccount defined inside of the binding) exists. The way Gatekeeper policies work, all the Namespace objects defined into the cluster have to be handed over to the policy.
That means the following steps have to be done on each policy invocation:

Get all the Namespace objects defined inside of the cluster. This is cheap, since we have an informer keeping track of that
Build the Gatekeeper inventory. This is cheap
Serialize the Gatekeeper inventory to JSON. Not so cheap according to our pprof findings. A lot depends on the number of Namespaces found
Push the serialized inventory into the Rego WebAssembly module instance. This involves copying the data into the Wasm memory and then have the Wasm code parse the serialized JSON back into its own internal representation. This operations take more time, depending on the size of the inventory.

A better approach would be to rewrite the policy in this way:

Iterate over the binding.subjects items:

Every time a ServiceAccount is found add the name of the referenced Namespace to a set

Iterate over the items inside of the set, for each one:
Make a context aware get_resource request, looking for the Namespace
Populate a list with the names of the namespaces that have not been found
If the list is empty, accept the request. Otherwise reject and provide the names of the namespaces that have not been found

I've written a policy with TinyGo which makes use of gjson to extract the relevant data. I tested it with k6, making sure each request had a RoleBinding with a ServiceAccount located inside of a namespace with a random name. I did that to ensure no cache would be used. The results of this policy are really good:
          /\      |‾‾| /‾‾/   /‾‾/
     /\  /  \     |  |/  /   /  /
    /  \/    \    |     (   /   ‾‾\
   /          \   |  |\  \ |  (‾)  |
  / __________ \  |__| \__\ \_____/ .io

  execution: local
     script: main.js
     output: -

  scenarios: (100.00%) 1 scenario, 20 max VUs, 1m35s max duration (incl. graceful stop):
           * policy_server: Up to 20 looping VUs for 1m5s over 3 stages (gracefulRampDown: 30s, gracefulStop: 30s)

     █ tinygo

       ✓ response code was 200
       ✓ response uid matches request
       ✓ admission request rejected

     checks.........................: 100.00% ✓ 122703     ✗ 0
     data_received..................: 15 MB   227 kB/s
     data_sent......................: 92 MB   1.4 MB/s
     group_duration.................: avg=28.15ms min=2.02ms  med=28.68ms max=116.74ms p(90)=33.8ms  p(95)=38ms
     http_req_blocked...............: avg=2.56µs  min=1.05µs  med=2.33µs  max=178.71µs p(90)=3.16µs  p(95)=3.61µs
     http_req_connecting............: avg=44ns    min=0s      med=0s      max=130.87µs p(90)=0s      p(95)=0s
   ✓ http_req_duration..............: avg=27.78ms min=1.76ms  med=28.33ms max=115.81ms p(90)=33.4ms  p(95)=37.62ms
       { expected_response:true }...: avg=27.78ms min=1.76ms  med=28.33ms max=115.81ms p(90)=33.4ms  p(95)=37.62ms
   ✓ http_req_failed................: 0.00%   ✓ 0          ✗ 40901
     http_req_receiving.............: avg=39.82µs min=18.55µs med=36.64µs max=759.83µs p(90)=49.27µs p(95)=56.67µs
     http_req_sending...............: avg=16.85µs min=7.14µs  med=15.83µs max=3.85ms   p(90)=19.68µs p(95)=22.26µs
     http_req_tls_handshaking.......: avg=0s      min=0s      med=0s      max=0s       p(90)=0s      p(95)=0s
     http_req_waiting...............: avg=27.72ms min=1.72ms  med=28.28ms max=115.65ms p(90)=33.34ms p(95)=37.54ms
     http_reqs......................: 40901   629.229464/s
     iteration_duration.............: avg=28.17ms min=2.03ms  med=28.69ms max=116.79ms p(90)=33.82ms p(95)=38.02ms
     iterations.....................: 40901   629.229464/s
     vus............................: 1       min=1        max=20
     vus_max........................: 20      min=20       max=20

running (1m05.0s), 00/20 VUs, 40901 complete and 0 interrupted iterations
policy_server ✓ [======================================] 00/20 VUs  1m5s

Opportunities
We should definitely make Rego context aware policies faster, see the results we got with some optimizations we haven't pushed yet. However, better performances can be achieved rewriting the policy using Go/Rust and making use of the get_resource API we expose.
Another approach could be to extend the Rego language by defining a get_resource function as a builtin. This would allow to write more performant Rego policies.

We can close it. The performance gains are part of the 1.11.0 release. The 1.11.1 release (scheduled during the next weeks) will include also the final Rego optimizations


Update data-collection-rule-sample-custom-logs.md

Sample file

#Sign-Off

@guywi-ms

Can you review this PR?
IMPORTANT: When this content is ready to merge, you must add #sign-off in a comment or the approval may get overlooked.

#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

Replacing this PR with https://github.com/MicrosoftDocs/azure-docs-pr/pull/237600.
#please-close


In TestSelfHostedKubeletLabels test also delete kubelet pod

Delete the kubelet pod apart from deleting the node object. I think sometimes when we just delete the node object the register sequence never starts. And that's why we are seeing flaky tests.
I am not, sure if it is upto the kubelet to identify if it is deregistered and register again. So solving the problem who has the responsibility to fix the kubelet is out of scope of this issue.

I'll take care of that as it makes CI flaky.


pin pydantic version to match fastapi requirement to fix Docker build error

Code Pull Requests
Please provide the following:

revise requirements.txt to pin pydantic to 0.30.0
Fix #437

good catch: https://github.com/uber/ludwig/pull/436 also fixes this

@gogasca   OK...since #436 covers the issue, I'll close this PR.


Fix the Put and Patch parameter order mismatching existing .Net SDK after documentation update

In previous documentation polish, the order of parameters for PUT and PATCH were changed. This PR is trying to fix it to make the new version backward compatible.

          "$ref": "#/definitions/PaginatedWebServicesList"

you will need to use x-ms-pagable extension to indicate that your List operation may return several pages of results.

Refers to: arm-machinelearning/2016-05-01-preview/swagger/webservices.json:255 in 1c67a74. [](commit_id = 1c67a74b6846c9b454b77cc6fac7d44b6cdb1e40, deletion_comment = False)

 https://github.com/Azure/azure-sdk-for-python/pull/898

 https://github.com/Azure/azure-sdk-for-ruby/pull/606

No modification for NodeJS


Is this repo still supported/active?

I'm noticing the warnings like seen below. Is this repo still being actively maintained / supported?
Warning: Accessing PropTypes via the main React package is deprecated. Use the prop-types package from npm instead.
Warning: You are manually calling a React.PropTypes validation function for the formControlFeedback prop on Glyphicon. This is deprecated and will throw in the standalone prop-types package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.

@bhellman1  is it working for you? what other solution you tried for authentication?

yeah it is for quite some time, it is a great library btw, but it needs a rewrite, or at least a great code review

Any news?

@thesubr00t nope, actually I did my own redux-auth (client-side only using redux-form) and it took me only a week to build. It's not that hard.

@betoharres thank you for your reply!
Would you mind to share a gist? It would be helpful.
Thanks,


C3 intermittently unable to connect to wifi networks

Describe the bug
From time to time, my C3 refuses to connect to any wifi networks. This is only the third time this has happened, otherwise, it connects just fine. C3 can see wifi networks just fine as well with full strength in UI. Attached are the dmesg logs I pulled off serial, but should also be visible as boot logs in my useradmin as I still have my SIM in (albeit super, super slow). I should also note that I have been unable to connect to the wifi hotspot created when tethering, which normally works as well.
dmesg-wlan.txt
dmesg.txt
dmesg when attempting to join weedle (unsuccessful)
NetworkManager logs
Provide a route where the issue occurs
d015f0d097b9e23a
openpilot version
0.9.2
Additional info
No response

I see this device is decommissioned. Still having issues with the new one?

I see this device is decommissioned. Still having issues with the new one?

No issues after SOM was replaced.


[ElasticSan] Add support for ElasticSan auto scale policy

Contributing to the Azure SDK
Please see our CONTRIBUTING.md if you are not familiar with contributing to this repository or have questions.
For specific information about pull request etiquette and best practices, see this section.

API change check
APIView has identified API level changes in this PR and created following API reviews.
Azure.ResourceManager.ElasticSan


fix: resolve alignment issues (#649)

Brief Information
This pull request is in the type of (more info about types):

[ ] build
[ ] ci
[ ] docs
[ ] feat
[x] fix
[ ] perf
[ ] refactor
[ ] test

Related issues (all available keywords):

keyword #xxx

Details

Merge the changes #650 to v1.9.0 branch
Checklist

[x] I have read the CONTRIBUTING doc
[x] I have signed the CLA

Others

N.A.

Hi @stealth-bombeer, you are encouraged to push other commits to fix problems or forced push the PR branch if you have rebased in your local git repository. Rather simply close the PR and open a new one :)

ly close the PR an

Sorry for inconvenience,i was a bit confused but now i've made changes and created a new pr :<


Bump production release for 1.28

Issue #, if available:
Description of changes:
Bump prod release
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/lgtm

/approve

/unhold


[2.2.x] Refs #32856 -- Clarified that psycopg2 < 2.9 is required.

See https://github.com/django/django/commit/837ffcfa681d0f65f444d881ee3d69aec23770be#commitcomment-59186889.
Follow up to 837ffcfa681d0f65f444d881ee3d69aec23770be.

Thanks for reviews :+1:


Automated cherry pick of #2736

Cherry pick of #2736 on release-5.4.
/cc  @devinbinnie
NONE

The files scripts/generate_release_post.sh, scripts/generate_release_post.sh are in the blocklist for external contributors. Hence, these changes are not tested by the CI pipeline active until the build is re-triggered by a core committer or the PR is merged. Please be careful when reviewing it.
/cc @mattermost/core-security @mattermost/core-build-engineers


[HOLD for payment 2023-04-03] WEB  - Chat - Draft text is not cleared but the compose box is still focused

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Issue found when executing PR https://github.com/Expensify/App/pull/15650
Action Performed:

Go to URL https://staging.new.expensify.com/
Login with any account
Go to any chat
Write some text in the compose box
Press Esc
Verify that the draft text is cleared but the compose box is still focused
Repeat Steps 3,4,5

Expected Result:
Draft text is cleared but the compose box is still focused
Actual Result:
If you repeat the steps 3,4,5 several times, then the comment does not disappear.
Workaround:
Unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[ ] Android / native
[ ] Android / Chrome
[ ] iOS / native
[ ] iOS / Safari
[x] Web / Chrome
[ ] MacOS / Desktop

Version Number: <IP_ADDRESS>
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
https://user-images.githubusercontent.com/93399543/223552389-d4132f72-7bbe-4e78-9bce-c6099b3bc23e.mp4
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~012df6b447b406c99c
Upwork Job ID:<PHONE_NUMBER>615494144
Last Price Increase: 2023-03-08

Bug0 Triage Checklist (Main S/O)

[ ] This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
[ ] This bug is not a duplicate report (check E/App issues and #expensify-bugs)

If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead

[ ] This bug is reproducible using the reproduction steps in the OP. S/O

If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
If the reproduction steps aren't clear and you determine the correct steps, please update the OP.

[ ] This issue is filled out as thoroughly and clearly as possible

Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.

[ ] I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@luacmartins this issue appears like it could be the same as https://github.com/Expensify/App/issues/15597. What do you think?
I was able to reproduce the issue:
https://user-images.githubusercontent.com/8292562/223789947-4e79cc3a-397f-4962-aa71-18b27f99704b.mov

I see. This is related to the PR linked in the OP. Seems like the debounce we have on the composer box is putting the text back in it. I can take a look at this.

Job added to Upwork: https://www.upwork.com/jobs/~012df6b447b406c99c

Triggered auto assignment to Contributor Plus for review of internal employee PR - @Santhosh-Sellavel (Internal)

Whoops, got a little trigger happy with Internal label

@tjferriss @luacmartins
I got unassigned accidentally or is no C+ help needed here?

I don't think it's needed, my mistake.

@tjferriss, @luacmartins Whoops! This issue is 2 days overdue. Let's get this updated quick!

No updates yet because of ECX

PR in review

Reviewing label has been removed, please complete the "BugZero Checklist".

The solution for this issue has been :rocket: deployed to production :rocket: in version 1.2.89-0 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

https://github.com/Expensify/App/pull/16317

If no regressions arise, payment will be issued on 2023-04-03. :confetti_ball:
After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

[ ] External issue reporter
[ ] Contributor that fixed the issue
[ ] Contributor+ that helped on the issue and/or PR

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

Merged PR within 3 business days of assignment - 50% bonus
Merged PR more than 9 business days after assignment - 50% penalty

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

[ ] [@luacmartins] The PR that introduced the bug has been identified. Link to the PR:
[ ] [@luacmartins] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
[ ] [@luacmartins] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
[ ] [@tjferriss] Determine if we should create a regression test for this bug.
[ ] [@luacmartins] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
[ ] [@tjferriss] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

We should add the test steps in this PR to the compose box tests.

Test step from the PR.

On Web/Desktop only:

Open a chat with a user
Type quickly in the compose box and immediately press Esc
Verify that the compose box is cleared and the old text doesn't show up again
Repeat 2-3 several times

Not applicable to mobile devices.

@luacmartins @tjferriss Could you assign me to the issue? Thank you!

@mollfpr sorry for the delay, I just invited you to the Upworks job to process payment for the PR review: https://www.upwork.com/jobs/~01b2c83c7fb1bd9dd7

@tjferriss Applied!

@tjferriss bump for the payment

Done


AWS SNS email - message too long

2018-09-24 19:17:09,789 luigi-interface[13067] INFO: Sending email to ['<aws sns arn redacted>']
2018-09-24 19:17:10,262 tornado.application[13067] ERROR: Exception in callback <bound method Scheduler.prune of <luigi.scheduler.Scheduler object at 0x7fbe240d42d0>>
Traceback (most recent call last):
  File "/home/dfeldman/.virtualenvs/dp/local/lib/python2.7/site-packages/tornado/ioloop.py", line 1026, in _run
    return self.callback()
  File "/home/dfeldman/.virtualenvs/dp/local/lib/python2.7/site-packages/luigi/scheduler.py", line 716, in prune
    self._prune_emails()
  File "/home/dfeldman/.virtualenvs/dp/local/lib/python2.7/site-packages/luigi/scheduler.py", line 743, in _prune_emails
    self._email_batcher.update()
  File "/home/dfeldman/.virtualenvs/dp/local/lib/python2.7/site-packages/luigi/batch_notifier.py", line 208, in update
    self.send_email()
  File "/home/dfeldman/.virtualenvs/dp/local/lib/python2.7/site-packages/luigi/batch_notifier.py", line 197, in send_email
    owner=owner,
  File "/home/dfeldman/.virtualenvs/dp/local/lib/python2.7/site-packages/luigi/batch_notifier.py", line 187, in _send_email
    send_email(subject, email_body, email().sender, (owner,))
  File "/home/dfeldman/.virtualenvs/dp/local/lib/python2.7/site-packages/luigi/notifications.py", line 327, in send_email
    email_sender(sender, subject, message, recipients, image_png)
  File "/home/dfeldman/.virtualenvs/dp/local/lib/python2.7/site-packages/luigi/notifications.py", line 283, in send_email_sns
    response = topic.publish(Subject=subject, Message=message)
  File "/home/dfeldman/.virtualenvs/dp/local/lib/python2.7/site-packages/boto3/resources/factory.py", line 520, in do_action
    response = action(self, *args, **kwargs)
  File "/home/dfeldman/.virtualenvs/dp/local/lib/python2.7/site-packages/boto3/resources/action.py", line 83, in __call__
    response = getattr(parent.meta.client, operation_name)(**params)
  File "/home/dfeldman/.virtualenvs/dp/local/lib/python2.7/site-packages/botocore/client.py", line 314, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/home/dfeldman/.virtualenvs/dp/local/lib/python2.7/site-packages/botocore/client.py", line 612, in _make_api_call
    raise error_class(parsed_response, operation_name)
InvalidParameterException: An error occurred (InvalidParameter) when calling the Publish operation: Invalid parameter: Message too long

Possibly the traceback got too large? We might need to add a max len for the message and truncate?
Not sure how to reproduce.

Was able to get an email that was unreasonably large, but not enough to break the email:
- VideoExtractor(<param>) (1 failure)

      Traceback (most recent call last):
        File "/home/bags/.virtualenvs/dp/local/lib/python2.7/site-packages/luigi/worker.py", line 199, in run
          new_deps = self._run_get_new_deps()
        File "/home/bags/.virtualenvs/dp/local/lib/python2.7/site-packages/luigi/worker.py", line 139, in _run_get_new_deps
          task_gen = self.task.run()
        File "/home/bags/.virtualenvs/dp/local/lib/python2.7/site-packages/luigi/contrib/docker_runner.py", line 225, in run
          raise ContainerError(container, exit_status, self.command, self._image, error)
      ContainerError: Command '/video_extractor/run.sh' in image '<image>-luigi:latest' returned non-zero exit status 1:
0it [00:00, ?it/s]
32it [00:00, 299.39it/s]
63it [00:00, 298.67it/s]
95it [00:00, 300.45it/s]
<these continue for the entire email>

So definitely my fault :). Possibly worth wrapping a try/catch in the email send?


add conflux espace mainnet and testnet

@Pana sorry I messed up the in browser merge conflict and can't commit manually because this was opened from main


Alpha of ARM packages

This pull request adds the alpha version of the Azure Resource Manager packages. The README.md within the included examples folder provides usage detail.
Signed-off-by: Brendan Dixon<EMAIL_ADDRESS>

Hi @brendandixon, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!
The agreement was validated by Microsoft and real humans are currently evaluating your PR.
TTYL, MSBOT;

@ahmetalpbalkan I'd like to merge this today. The contained README.md gives pretty good detail. Much more to come!

@brendandixon  Looks reasonable, feel free to merge. One thing I can see right away is maybe we should move README from arm/examples to arm so that from github, whoever clicks on arm folder can see it directly.

oh actually can you also update .travis.yml to compile and check-gofmt of arm/... as well? Right now I'm not sure if the CI is conclusive.

@ahmetalpbalkan Agreed. I'll move the README.md up one. CI may be failing because I'm merging a branch vs. a PR from master. I'll take a look.

@ahmetalpbalkan I'm going to close and issue a new PR directly from / to master.

@brendandixon Please do not open and close PRs all the time, it's being hard for me to keep record. consider reopening this.

It's failing because in the code we probably have references such as import "github.com/azure/repo/not-yet-merged-directory". I don't know how we solved this initially but the command failing is go get -t ./... which is supposed to fetch all the dependencies.
It might be a first-time bootstrapping problem, in that case we can just merge and next PRs wont have this problem.

@ahmetalpbalkan Sorry to confuse you. I'm used to having single issue PRs.
I agree this is likely a bootstrapping. I'll do something...

@ahmetalpbalkan Re-opening.


[Improvement] Use multi-staged build to shrink Docker image size

What would you like to be improved?
Currently, we didn't use multi-stage build to build images like gravitino, trino, doris, hive, so the image size is very large (e.g. gravitino has almost 1G).
Reference: gravitino image in docker hub
How should we improve?
Use multi-stage build to shrink image size.

[ ] [Improvement] Use multi-staged build to shrink Doris image size
[ ] [Improvement] Use multi-staged build to shrink Gravitino image size
[ ] [Improvement] Use multi-staged build to shrink Hive image size
[ ] [Improvement] Use multi-staged build to shrink Trino image size
[ ] [Improvement] Use multi-staged build to shrink kerberized Hive image size

c.c. @xunliu, @mchades

For Doris image, we've already use ADD to extract tar file and use softlink to link it to the correct location, so I think for now, it's not possible to shrink the size of it.


Update installation procedure

Fixes #53
First iteration.
You can check the updated doc here: http://axondeepseg.readthedocs.io/en/dev_issue53/

@alzaia please do not refer to issues in the title of the PR (no cross link possible)-- put it in the description of the PR instead (i edited your message).

It's ok for me, I would just change the format of the change log to something like:
Release 0.2 (01 Feb 18)

Added blabla;
Fixed bla bla;

PS: you don't need to update the /docs folder anymore, given that now ReadTheDocs is rendering the docs for us, so you can remove this folder if you're not using the old link anymore.

@jcohenadad Can we merge this PR?

Yes the plan is to add the link to the manual labelling SOP in that section of the doc. But I wanted to do it on another PR because it's related to issue #68.

this PR can also fix https://github.com/neuropoly/axondeepseg/issues/68 since it is related to the doc (i.e. strong overlap, same files edited)

Please don't consider the Travis fails, I'm still setting it up. It's not ready and I accidentally triggered a build.

@jcohenadad Can we merge this PR?

@jcohenadad Ok, updated with the GIMP SOP link. Travis fails because there's no travis.yml file in this branch (it was created before the Travis PR got merged into master).


[DO NOT MERGE] Auto PR to update dependencies of pilot

This PR will be merged automatically once checks are successful.
none

@istio-testing: The following test failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/pilot-presubmit.sh
c839bf54ed2da515c1c32ff991784c450ceffeab
link
/test pilot-presubmit

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.


feat: prefers-color-scheme: dark feature implement. Issue #645

If media property matches of prefers-color-scheme: dark is true and CSS variables are set to defaults, dark background colour and white text colour will be applied. If the CSS variables are not default (customized by user), dark background or/and white text will not be applied (relatively to what was customized).

super, I'll look at this after lunch

It looks like this sets some default dark colours for the background and text inside the observable that watches the display options and sets the corresponding CSS properties.
 If the student was looking to override their OS's preference, that would be impossible.
It also doesn't deal with prefers-color-scheme changing, which some devices do based on the time of day.
I think that when the display options modal is shown, the defaults should be set based on the current value of prefers-color-scheme. If the user selects the default values, then we are in a "default behaviour" mode and the colours should be handled entirely by CSS. The JS code should only set the CSS properties if the user selected something other than the default.
The default values can be given in CSS by something like this:
:root {
    --background-colour: #ffffff;
    --text-colour: #000000;
}
@media (prefers-color-scheme: dark) {
    --background-color: #000000;
    --text-colour: #ffffff;
}

When the JS code sets properties on the body element, they will take precedence over these.

It now should change default values which can be seen in a modal and only uses default if default is chosen accordingly.

Thanks, I've tried it and it now seems to work how I intended.
It turns out the defaults are set in bootstrap.css, so I've moved the dark-mode defaults there too. I changed the default dark-mode background to pure black: #515151 is far too light, and will make ensuring AAA constrast difficult.
There are lots of other colours that need to change in dark mode, including but not limited to:

links
buttons
input boxes with feedback styling (e.g. unsubmitted, incorrect, correct)

If you have any more time, please try to fix some of these. Use the accessibility inspector to aim for AAA contrast ratios, and ensure it's at least AA.

I am trying to reinstall the editor, it's still doesn't work but I will try as soon as I do


Move API token into the separate file.

Fix of #3748. BTW, it's not clear what to do with old config.
Should I add a check for old config and try to remove [repository.token] field from it every time user add a new token?
Or should I just prefer to use a token field from a new config over the old one?

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon.
If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.
Please see the contribution instructions for more information.

Thanks for the PR! Looking good to me! Some thoughts:

Could you add some tests for this? Both that the old and the new file works
I think we may want to not print out the token to the console?
Could the crates.io documentation get updated?

cc @matklad (just to make you aware)

@alexcrichton
What are your thoughts on

Should I add a check for old config and try to remove [repository.token] field from it every time user add a new token?
Or should I just prefer to use a token field from a new config over the old one?

I think we definitely should remove support for old token location some time in the future, because leaving security-related backwards comparability code paths is not the right thing.

Oh right sorry forgot to mention that. Yeah let's issue a warning if .cargo/config contains a token on cargo publish, and then we'll advertise this change and eventually remove that configuration.

Got it. I'll update the PR by the end of the week

:umbrella: The latest upstream changes (presumably #3991) made this pull request unmergeable. Please resolve the merge conflicts.

After diving into the code I found that it's a bit tricky to operate both tokens (from ~/.cargo/config and from ~/.cargo/credentials) due to ConfigValue::merge() implementation. It just skips duplicated values. For example, if we have 'token' key in the both old and new config files the second one will be ignored during the Config::load_values() invocation.
So I propose the next options:

Ignore the value from ~/.cargo/config during the merge. Read ~/.cargo/config during the publish in order to check if old configuration exists.
Tune ConfigValue::merge() somehow in order to keep both values during the loading.

Perhaps the token could be handled specially? We don't necessarily want to load it from all possible config files, right? Just the home dir?

@alexcrichton thank you for advice and sorry for a long delay. I've updated the code according to your recommendations. I'll introduce tests on the next week.

Thanks @dethoter! One thing I just remembered (sorry for the runaround here) is that let's actually hold off on the warning for now. Users which use Cargo across multiple channels (stable/beta/nightly) would otherwise have no way to not get warnings, so let's wait for this support to hit stable and then we can enable warnings.

I am now reading https://github.com/rust-lang/rfcs/pull/2006 which proposes to add alternative registers to crates.io, which can be super useful in corporate scenarios.
One of the issues there is that when there are multiple registers, you probably want to use different access tokens for them.
I wonder if we can future proof this pull request for that sort of requirements changes. What if we use TOML for credentials, and store them like
[crates.io]
token = "DEADBEEF"

?
That way, we'll be able to add additional keys in the future easily.

cc https://github.com/rust-lang/cargo/issues/3365

Seems reasonable to me!

@alexcrichton no problem. I'll remove the code that warns.
@matklad good proposal! It should be easy to switch file to TOML one. But there are some questions about compatibility.
The old config supports just one registry, so users ask for token like
cfg.get_string("registry.token").
A new one consists from different tokens for different registries. For example I'll store them like:
registry.<host1>.token
registry.<host2>.token

How can I handle a backward compatibility?  Should a user now ask for a concrete token like:
cfg.get_string("registry.host1.token")? Or maybe we should have some default token?

How can I handle a backward compatibility?

Cargo as a library is not 1.0, so we can, and do, break backwards compatibility. However I think in this PR we can keep the API exactly the same by returning the first token from the table.
Then, in the PR implementing #3365 we can switch API to cfg.get_string("registry.host1.token").
Or do you think than it'd be easier to add multiple hosts from the start here? I am not super familiar with implementation here :)

However I think in this PR we can keep the API exactly the same by returning the first token from the table.

I believe it's the best option for now. I'll submit an update in a few days.

:umbrella: The latest upstream changes (presumably #4090) made this pull request unmergeable. Please resolve the merge conflicts.

During the implementation, I decided that it'd be better to return the old token if cargo couldn't find a token for a host. Returning the first from the map is actually a bad idea because it's associated with another host. If you have any better idea I'll be happy to discuss it.

@alexcrichton anything else to do here?

This looks pretty good to me! My only hesitation here is the handling of the key in registry.$key.token. There's a transformation that's applied here but I'm not sure it's one we'd want to stabilize on? Elsewhere what we've done is either registry.crates-io.token or registry.$url.token, perhaps we could do that here as well?

We can use registry.crates-io.token approach as good as registry.$url.token. But in the case of using the second one, the actual key will look like registry."$url".token because TOML treats dots as separator and URL contains the dots.
Please choose how we should store the host key.

I'm personally still ok with
token = "..."

without actually specifying the registry at all. I think there's a reasonable interpretation even in a multi-registry world of that TOML file, it's just a token for the "default registry" (e.g. crates.io) and you can specify others in the file as well eventually.
If we want to have a [registry] table then yes, I would expect quoted urls so it would look like:
[registry.crates-io]
token = "..."

# or ...

[registry.'https://github.com/rust-lang/crates.io-index']
token = "..."

I would personally just go for a bare token = "..." for simplicity, but @matklad do you think we need to handle the multi registry case now?

I would personally just go for a bare token = "..." for simplicity, but @matklad do you think we need to handle the multi registry case now?

Hm, I think that for multiple registries registry."$url".token scheme is actually simpler to implement than the default registry one. Like, if user executes cargo login --host default registry, you'll need to write code to save the token under bare token and not registry.$url.
And looks like current PR already closes  #3365, that is, it already implements all the support for several hosts.

you'll need to write code to save the token under bare token and not registry.$url.

Oh not necessarily, I figured that once we implement this then token is just a fallback just as registry.token is today (in .cargo/config)

I agree with @matklad, it would be simpler to store all the tokens like registry."$url".token. Let's stop on this approach?
Yes, this PR already closes #3365.

Let's stop on this approach?

:+1:

Ok but to be clear we don't even know what the "url of a registry" is today. The url we currently use in lots of places, the index, seems clearly inferior to the actual url like "https://crates.io".
What I'm worried about is that trying to preemptively support multiple registries when we don't actually know what it will look like will drive us into a corner which is very difficult to support in the future. Let's say we encode the index url today, but we'd rather "https://crates.io" tomorrow? We now have to support both urls! What if we decide to use bare identifiers for all registries instead of urls?
I find token = "..." to be the least invasive in terms of forwards compatibility. Issues like #3365 are good for the long run but there's not really much use in fixing it one-off in a PR like this? If we fix it we're not really any closer to supporting custom registries...

Ok but to be clear we don't even know what the "url of a registry" is today. The url we currently use in lots of places, the index, seems clearly inferior to the actual url like "https://crates.io".

Hm, an excellent point! So yeah, it makes sense to support a single token only in this PR, and implement multiple registers support later. Fixing #3365 is not really important now, because it affects only crates.io maintainers.
Aslo, credentials file is not really meant to be edited/viewed by humans, so we can use whatever format we like, as long as it is extensible.
Unrelated, but we might want to change token location in the docs over here: https://github.com/rust-lang/cargo/blob/master/src/doc/crates-io.md#before-your-first-publish.

@alexcrichton you're right, I'll remove support for multiple hosts from this PR.

@alexcrichton @matklad seems like appveyor build is failed due to nmake issue. Could you please restart the build or point me how can I fix it?

Ah no worries that should hopefully be fixed by the time this reaches the head of the queue. Thanks again @dethoter!
@bors: r+

:pushpin: Commit 1ccdc8b has been approved by alexcrichton

:hourglass: Testing commit 1ccdc8b with merge 1716d0f...

:sunny: Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing 1716d0fc5baa8ca21fa9b5339fb4b68ade66523d to master...

@alexcrichton @matklad  thank you for supporting.

@dethoter, the cargo::util::config::Config::load_config method looks for .cargo/config in current working directory and all its parents. Why does the load_credentials method not do the same except looking for .cargo/credentials?

Because .cargo/credentials is global, but .cargo/config could be both global and local.

@dethoter, but why can't credentials be local too? If the local .cargo/config overrides registry index/host, the corresponding credentials need to be stored somewhere. And local .cargo/credentials is the most logical (and without named registries only) place for it.

AFAIK cargo will not support unnamed registries. So there is no reason to handle credentials per project. $CARGO_HOME/credentials is the only place to store tokens/passwords for all the registries. Am I right, @alexcrichton?

The precise design for multiple registries is still up in the air, but I think it's reasonable to consider loading any .cargo/credentials a possibility. The format will probably get tweaked (extended) slightly to support custom registries as well.


Freeze on calls

Everytime I run a call, I cant hear anything or send audio, and the program freezes, I cant hang up or close connection or send a ctrl+c. Also, the clock of the call doesn't even start to count, but I remark the call is running in the other end. Im on gentoo linux and using current release.
This is my config file:
https://bpaste.net/show/55d670fa105a

Solved by changing some parameters and emerging missed packages

Hi @ccokee,
I'm faceing the same issue while making a call, what parameteres and packages you have changed to solve the issue ?

@ccokee exact same issue here.  What did you change to fix it?  Saying "I fixed it" with no explanation is a cardinal sin of the internet.


No baseline_15.0.995.28.zip in repository

Hi,
I'm trying to run the CompareExchangeHashes.ps1 on my clients exchange server but I am getting the below error.
LoadFromGitHub : C:\temp\baseline_15.0.995.28.zip not found... please open issue on
https://github.com/microsoft/CSS-Exchange/issues, we will work on it
I manually checked the assets in https://github.com/microsoft/CSS-Exchange/releases/tag/v<IP_ADDRESS>4 but there is no baseline_15.0.995.28.zip only baseline_15.0.995.29.zip. Can you please look at adding this baseline.
Kind Regards,

We will work on getting these baselines.

Created a single task for tracking all missing baselines, please follow: https://github.com/microsoft/CSS-Exchange/issues/313


Latest dockerized version is not picked up if there is a newer non-dockerized version

Thanks @badrfoot!


The "locale" field in settings needs to be converted to lowercase

Github issues should be used for bugs and feature requests. Use Stack Overflow for general "how-to" questions.
Version
v4
Describe the bug
The current default value of Locale in Emulator Settings is en-US. However, it does not match the default value of adaptive dialog SDK, which is en-us.
To Reproduce
Steps to reproduce the behavior:

Create a bot using new ChoiceInput(){                              Property = "dialog.FindCalendarEntry_Choice",                              Prompt = new ActivityTemplate("[EnterYourChoice]"),                              Choices = new List<Choice>()                              {                                  new Choice("First One"),                                  new Choice("Second One"),                                  new Choice("Third One")                              }                          },
Run the bot with Bot Framework Emulator.
See the error.

Expected behavior
Hopefully, the default value is en-us, instead of en-US.
Screenshots

[bug]

Assigned @cwhitten to discuss with the SDK team.

@ZhaoqingCui could you please share the contents and name of the LG file you used to get this repro? So we can get an exact repro and be 100% sure we fixed this. Thanks


chore(release): v0.9.2 🎉

:robot: I have created a release beep boop
0.9.2 (2023-07-18)
Bug Fixes

cicd: remove old publish-on-tag workflow (89b5dd0)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/whodisio/simple-jwt-auth/releases/tag/v0.9.2 :sunflower:


feat: Dockerize demo projects

Checklist:

[x] I have read freeCodeCamp's contribution guidelines.
[x] My pull request has a descriptive title (not a vague title like Update index.md)

Sorry all, this is a big one.
This PR Dockerizes all the projects in this repo, and uses Docker Compose to make building and starting multiple projects locally a bit easier.
I tried to keep a light touch with the individual projects. Most updates to projects are to fix issues with Rollup that I ran into, or to fix a bug after recent package version bumps from Renovate.
If it's easier, I can create new PRs for those project fixes. I think there were just one or two, one being the update to server.js for the Build a Pinterest Clone project.
Another big change was tweaking the method to refresh the access token for the Twitch Proxy project and moving those scripts into that project's directory. That project's container will also need to be set up to restart when it fails so that it can fetch a new access token every month, but that will probably depend on how the project is deployed.
Finally, the tests were simplified, and there's a new test to check the status code for every project.
Edit: These commits are all over the place, and I'd be happy to squash them if that makes things easier :)

Note: The last commit bumps the Node version for all containers to v18, and requires Node v18 and npm v9 in the main package.json file.

Once you are done, do not forget to clean up with the following:
docker compose down
docker system prune --volumes --all --force


Add glop support

Add a glop host for CEPL.
Should be simple enough

And here we are :) https://github.com/cbaggers/cepl.glop
the event pumping is stubbed though so we need to hook up skitter next


Docs.MS CI Updates for Azure.Data.AppConfiguration

CI Update for release of Azure.Data.AppConfiguration

Docs Build status updates of commit b3d1254:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

bundlepackages/azure-dotnet.csv
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel


AIO-H3 doesn't support work mode, etc

no change to H3-AIO was made
error: >-
Error reading registers. Type: RegisterType.INPUT; start: 41000; count: 1;
slave: 247 from tcp://<IP_ADDRESS>:502: Modbus Error: [Input/Output] Modbus
Error: [Invalid Message] No response received, expected at least 8 bytes (0
received)
error: >-
Error reading registers. Type: RegisterType.HOLDING; start: 41000; count: 1;
slave: 247 from tcp://<IP_ADDRESS>:502: Exception Response(131, 3,
IllegalAddress)
Originally posted by @PaRez280 in https://github.com/nathanmarlor/foxess_modbus/discussions/566#discussioncomment-8820144

Looks like the 41000 set of registers, and presumably force remote control, don't work on the AIO-H3.


Compatibility for unity 2020.3?

@Moolt  - I've just stumbled upon this tool and it would be a lifesaver for me, but sadly it isn't compatible with Unity 2020.3 (the External References part is causing the problems). Is it possible to update this wonderful plugin in any way?

@nehvaleem I've just updated the package to Unity 2020.3. It works fine in the example scene so I hope your issue is also resolved. If not, I need some more details.

Awesome, much appreciated! I'll check it right away. Previously I've had issues with the external references throwing an exception. Also - does your plugin handles timelines and their bindings when external references are being checked?

I have narrowed it down to one project-specific component of mine, but for now, I am unable to isolate it.
On the other hand, I have found out that this plugin:

Does not handle playable bindings at all.
Does not handle lists with serializable classes that hold a reference to the replaced objects. Imagine a List and CustomType has a field for the component or GameObject that we are trying to replace.

Do you even consider extending SmartReplace to support such cases? I probably don't have to say it, but it would be totally awesome if you do:)


Update readme

Adding usage instructions including:
-installation
-injection
-licensing link on readme

thanks for the pull request!


Clear the pending transaction object if there are IAC errors in operations/queries while constructing a transaction

Subsumed by (and already done by) the plugin infra


[Unicode rethink] Prototype for TranscodedView.

Introduces TranscodedView, which is a bidirectional collection of
transcoded unicode scalars from a provided encoding and collection of
code units.

@dabrahams this is the TranscodedView code. The test is not yet working correctly, as I don't think I have the right run-line (I get a linker error). I'll try fixing that next.

Alright, test case now passes

@swift-ci please test

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - 0bc93193d3ffbc8737c3218d27fa4792787a572d
Test requested by - @milseman

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - 0bc93193d3ffbc8737c3218d27fa4792787a572d
Test requested by - @milseman

Nice, thanks!


Use case for res.arrayBuffer

I'm currently working on a .docx file parser that should work on both browsers and NodeJS environments.
https://github.com/MrOrz/hacktabl-parser/blob/fcfc7626c533b0434d11215e4c3c1d305990db26/src/fetchDoc.js
.docx files are a bunch of XML files archived in a zip format, thus I am using JSZip to extract XML files from .docx. Since node-fetch does not support res.arrayBuffer(), I cannot use isomorphic-fetch to grab .docx files on NodeJS.
If node-fetch were to support res.arrayBuffer(), the large if-statement that differentiates server & browser behavior could be gone. http and https library don't have to be required in the code anymore, leading us to a smaller bundle when the code is compiled using webpack for use in browsers.

Does this help? res.body would be a stream of buffers. http://stackoverflow.com/questions/8609289/convert-a-binary-nodejs-buffer-to-javascript-arraybuffer

@bitinn Thanks for the timely reply, it is very informative!
I refactored my code using res.body, which eliminates the large if-statement and the dependency on http / https library.
https://github.com/MrOrz/hacktabl-parser/blob/b7dfd402f30b6ff96515993b52ce2a38fa99a29f/src/fetchDoc.js#L53
However, I found a good resemblance between my code and the Response.prototype._decode's implementation. Maybe I can come up with a little pull request to support res.arrayBuffer by just tweaking a few lines of code?

PR welcomed, though maybe you have other options? Does JSZip support stream (basically buffers) on node.js? if so you can problem just pipe res.body to JSZip.
ref: https://github.com/Stuk/jszip/pull/195

res.arrayBuffer would also be helpful to me, in this case:
var fs = require('fs')
var fetch = require('node-fetch')

function getZip (url, outfile) {
  return new Promise(function (resolve, reject) {
    fetch(url)
      .then(function (res) {
        return res.arrayBuffer()
      })
      .then(function (buffer) {
        fs.writeFile(outfile, buffer, function (err) {
          if (err) return reject(err)
          return resolve(outfile)
        })
      })
      .catch(reject)
  })
}

or should I be downloading binary data some other way?

@konsumer it would be better to use stream (res.body is a transform stream), and pipe it to fs.createWriteStream.
ref: https://nodejs.org/api/fs.html#fs_fs_createwritestream_path_options

@bitinn: cool. thanks!

continuing from #11, my use case for body as a buffer (which I'm not sure if thats the same as arrayBuffer) would be crypto:
var p = fetch('http://some/' + image.location)
    .then(function(res){
        var hash = crypto.createHash('sha1').update(res.body).digest('hex')
        fs.createWriteStream(hash).write(res.body)
    })

@bitinn I don't follow the SO links. Additionally, it seems like a lot of code would be needed in each instance, vs adding a res.buffer() method as @MrOrz has done. Is that something that can be added?

@mbrevda

It's no more code than what you wrote, and once you understand what pipe do, it's not difficult at all.

http://stackoverflow.com/questions/18658612/obtaining-the-hash-of-a-file-using-the-stream-capabilities-of-crypto-module-ie
var hash = crypto.createHash('sha1');
res.body.pipe(hash);

arrayBuffer is not the same as Buffer. and node.js Buffer is not in the fetch spec, so we don't intend to add it.

Now I understand, thanks! This approach still requires a callback on res.body end, so having a res.buffer() helper might still be nice.

FYI, if you need to buffer a small response on Node.js, you can now use res.buffer() since v1.6.0; for anything we still strongly recommend using res.body as stream. That's the proper and performant way on Node.js.

The main issue is that as long as node-fetch doesn't support this, it breaks isomorphic-fetch (since we no longer can assume that the implementation is conform to the standard). Cf https://github.com/matthew-andrews/isomorphic-fetch/issues/96.

hmm, maybe think arrayBuffer should exist there as well, even if it means it's a degression from Buffer or stream. The point is that is should be easy to make unit-test and have it work just the same on the browser as well on the server. Should be just as easily to browserify the hole package and have it work in the browser as is without the need for Nodes Buffer

I've implemented arrayBuffer() for the upcoming v2 in #183.

@TimothyGu just saying, I tend to close cases on release instead of on merge :)

This is awesome!

Just chiming in here, had a case today where arrayBuffer() would be really useful. Looking forward to 2.0 and hoping that isomorphic-fetch will then also update to 2.0.