Safe Access Operator Produces Invalid Output Compared to contains()

Bicep version
Bicep CLI version 0.29.47 (132ade51bc)
Describe the bug
When using <object>.?<property> ?? <other_value> instead of  contains(<object>, '<property>') ? <object>.<property> : <other_value> the resulting ARM template produced from az bicep build is invalid.
To Reproduce
var object1 = [{
  name: 'the name'
  location: 'the location'
  id: 'the id'
  accounts: []
}
{
  url: 'the url'
   location: 'the location'
   id: 'the id'
   accounts: []
}]

var object2 = [{
  name: 'the name'
  location: 'the location'
  id: 'the id'
  accounts: []
}]

var combined = concat(object1, object2)

var test = [
  for obj in combined:{
     // attempt to use safe access operator vs contains()
     prop: obj.?url ?? obj.name
     //prop: contains(obj, 'url') ? object.url : obj.name
  }
]

The resulting ARM will look something like:
prop when using safe access:
"input": "[createObject('prop', coalesce(tryGet(variables('...')[copyIndex('value')] ... )))]"

prop when using contains:
"input": "[createObject('prop', if(contains(variables('...')[copyIndex('value')] ... ))'"

I don't see tryGet referenced in the ARM function reference and the resulting template, when trying to deploy it in the real use case, makes it seem like 'name' as a property is created instead of 'prop'

Is the deployment returning an error or exhibiting unexpected behavior? The tryGet function is implemented in the ARM engine, though you're right that it still needs to be documented.

@jeskew I did get an error when trying to deploy the template. For me the template error is resolve by converting from the safe access operator back to using contains in a ternary statement.
Can you elaborate a bit on what you mean by "?? is not a short-circuiting operator" and why it would be needed on the property accessor after the "??" in this example?
I would have expected the ?? operator to take the left side if the property exists (similar to contains) else take the right side

Can you elaborate a bit on what you mean by "?? is not a short-circuiting operator" and why it would be needed on the property accessor after the "??" in this example?

ARM functions evaluate all their arguments as a first step. The only exceptions to this are and() (which maps to Bicep's && operator), or() (which maps to Bicep's || operator), and if() (which maps to Bicep's ternary operator). These functions "short-circuit" evaluation of their arguments if they already know what value to return:

and will stop evaluating arguments and return false as soon as any argument evaluates to false
or will stop evaluating arguments and return true as soon as any argument evaluates to true
if will only evaluate the second argument if the predicate evaluates to true and will only evaluate the third argument if the predicate evaluates to false

coalesce doesn't have short-circuiting behavior, but it would make sense for it to only evaluate arguments until a non-null value is encountered. I'll tag this issue for a team discussion. That would be a backend change that would take a little while to implement and deploy, but using .? on both sides of the ?? operator would be my recommended approach in the meantime

There were no objections to making coalesce a short-circuiting function. That change will need to be made in the ARM deployments engine and won't require any updates to Bicep.


Extension doesn't seem to support VT100 Line Drawing Character Set

I tried this extension in the hopes that it would allow me to render tables generated using the VT100 Alt character set for line drawing. I have developed a handy library which generates these tables, but I would like to view them in vscode. Unfortunately the rendering is unusable. Yes, the ANSI color sequences do seem to be parsed correctly, but the line draw characters are just rendered using the default character set.
I am talking about the alt set which should be used when the ESC(0 sequence is sent, and the default restored when the ESC(B sequence is sent.
I am using the latest version of vscode :
Version: 1.64.2
Commit: f80445acd5a3dadef24aa209168452a3d97cc326
Date: 2022-02-09T22:02:29.527Z
Electron: 13.5.2
Chromium: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Linux x64 5.13.0-28-generic

Here is how the table looks on the console:

This sounds like a rather obscure feature to me. How about using Unicode characters / utf8 instead?

Have a look at this article for the respective codes: https://en.wikipedia.org/wiki/Box-drawing_character


Fixed forgotten mentions to application structure viewpoint in export html functionality

I did not open an issue because the fix and problem is so minor and clear. If needed I can obviously do that as well.

Thanks for that!


7.5.0 crash on iOS 7 iPhone 4

Hello!
App crashing  on iOS 7 with 7.5.0 library version.
-[__NSCFString containsString:]: unrecognized selector sent to instance 0x1887da10
NSString method -containsString: available on iOS 8 and later.
I identify that app crashed after invoking Flurry class method +startSession:withOptions:

Same error..

Same...

Hey folks, thanks for the head's up.  We're looking into it.  Seems to be that the SDK is not playing nicely with iOS 7 like @Agarunov called out.  I think I have an iOS 7 device laying around, gathering dust. ;)  (Just kidding, I do, in a huge pile of devices that occasionally beg to be used)
Let me set an expectation, though.  I'll talk to the SDK team and see how they'd like to move forward.  iOS 7 is used on so few devices at this point (and recall, we have the data to back this up ;) so the priority might not be super high.
Of course, you don't want to break things, so we'll come up with something soon.  In the meantime, if you need to back down a version, let me know (or just grab it from the cocoapod).

Alright, we are in business. It was an unintentional inclusion, as I thought. The fix is slated and is relatively minor. No ETA yet, but I will update when we have one. Thank you all for your patience.

This issue is resolved in 7.5.1 and the pod has been published.


Valid glft file - results curious - would be grateful for any help

Having success moving my animation assets from FBX to USDZ for use in iOS apps. Thanks for all your bright posts on the subject.
Pipeline: C4D > gltf2  > gltf2usd > Xcode > USDZ
This one little dino animation has me stumped. Seems to be a valid gltf2 asset. After conversion, it is not previewing correctly in finder OSX or iOS.
Source Files are here  - https://bit.ly/2WTIC2y
Shown with 100, 10, and 1cm Cubes on 200cm surface

Successful previews when viewed from SketchFab's AR Viewer:

Hi @BinaryChunk.  glTF defaults to units of meters.  With initial testing, I found that usdz on iOS assumed centimeters.  By default, the a scale of 100 is applied to convert from meters to centimeters, but this can be overwritten by setting the --scale (or -s) command line flag.
Btw, previewing the glTF file in the Babylon.js sandbox (https://sandbox.babylonjs.com/) looks like this:

Is this what you are expecting visually?

Btw, you can also directly export to usdz from gltf2usd if that helps your workflow :)

Thanks Kacey
Yes gltf file is fine - it the conversion I am referring to - would be grateful if you would try and convert it using gltf2usd and see if you get similar results. - thanks
Source Files are here - https://bit.ly/2WTIC2y

@BinaryChunk I just tried this, and looks like it may be a bug in iOS.  It displays properly within XCode and Preview on Mac OS:

I believe @wave-electron came up with a workaround for this scenario: https://github.com/kcoley/gltf2usd/issues/49#issuecomment-422679613
Does this help?

@kcoley Thanks! I will rework animation per @wave-electron comments - grateful for your help!

@BinaryChunk no problem!


Frontend tests initialize with vitest

[ ] Landing Page: This component will display the organizations that users can donate to and provide options to create an account or login.
[ ] Registration/Login Form: This component will allow users to register for a new account or login to their existing account.
[ ] Organization List: This component will display the list of organizations that users can choose to donate to, with relevant information such as organization name, logo, and donation options.
[ ] Donation Form: This component will allow users to select an organization, choose the donation amount, and set up automated repeat donations or one-time donations. It should also provide options for anonymous donations and reminders for monthly donations.
[ ] Beneficiary Stories: This component will display stories of beneficiaries who have been helped by the donations, with relevant images and information.
[ ] Donor Dashboard: This component will provide donors with a dashboard to view their donation history, set up and manage automated donations, and update their profile information.
[ ] Organization Dashboard: This component will provide the approved organizations with a dashboard to view the donations received, manage beneficiary stories, and update their organization details.
[ ] Administrator Dashboard: This component will provide the administrator with a dashboard to review and approve/reject organization applications, and manage organizations.
[ ] Navigation Bar: This component will provide a navigation bar with links to different pages of the platform for easy navigation.
[ ] Footer: This component will display relevant information such as contact details, social media links, and copyright information
[ ] Modals/Dialogs: There might be need for modal or dialog components for displaying pop-up messages, confirmation dialogs, and other interactive elements.


chunking schema for analysis-ready?

Hey guys! Love to see this effort.
Quick question about the chunking schema you're planning for an analysis-ready corpus. Will you keep the native ERA5 chunking, i.e. {'time':1}? Are you chunking variables together?
With h2ox we've chunked hourly ERA5-land in blocks of 4-years with some moderate spatial aggregation, e.g. 5 degrees. Our main use case is for quick/easy retrieval of timeseries. Would be good to know what you guys are thinking for the chunking schema here!

We did do an internal chunking experiment where we prioritized querying by time. This revealed the inherent Zarr-specific tradeoffs where you have to prioritize between space and time (or, between dimensions A vs dimensions B). Given the other use cases we want to support for this dataset, our plan is to prefer the existing chunking scheme (the whole globe at every hour) and to support timeseries like analysis with BigQuery.

Thanks for the update. Glad to see this project going somewhere!


Failed to build wheel on pypi package

Thank you for this amazing project. I'm starting to port my previous setup of pip + conda to Pixi and it was all doing well until a certain point. Here is my minimal pyproject.toml:
[project]
name = "X"
requires-python = ">= 3.12"

[build-system]
build-backend = "hatchling.build"
requires = ["hatchling"]

[tool.pixi.project]
channels = ["conda-forge"]
platforms = ["win-64", "linux-64", "osx-64"]

[tool.pixi.dependencies]
loguru = ">=0.7.2,<0.8"

[tool.pixi.pypi-dependencies]
geojsoncontour = ">=0.4.0, <0.5"

When I do pixi install I get the following:
pixi install
  x failed to solve the pypi requirements of 'default' 'linux-64'
  `-> Build backend failed to build wheel through `build_wheel` (exit code: 1)

      [stdout]
      + meson setup C:\Users\X\AppData\Local\rattler\cache\uv-cache\sdists-v5\pypi\contourpy\1.3.1\4Y4gtR_O1PVnb0chEkUYJ\contourpy-1.3.1.tar.gz C:\Users\X\AppData\Local\rattler\cache\uv-cache\sdists-v5\pypi\contourpy\1.3.1\4Y4gtR_O1PVnb0chEkUYJ\contourpy-1.3.1.tar.gz\.mesonpy-em9d44k7
      -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --vsenv --native-file=C:\Users\X\AppData\Local\rattler\cache\uv-cache\sdists-v5\pypi\contourpy\1.3.1\4Y4gtR_O1PVnb0chEkUYJ\contourpy-1.3.1.tar.gz\.mesonpy-em9d44k7\meson-python-native-file.ini
      The Meson build system
      Version: 1.6.0
      Source dir: C:\Users\X\AppData\Local\rattler\cache\uv-cache\sdists-v5\pypi\contourpy\1.3.1\4Y4gtR_O1PVnb0chEkUYJ\contourpy-1.3.1.tar.gz
      Build dir: C:\Users\X\AppData\Local\rattler\cache\uv-cache\sdists-v5\pypi\contourpy\1.3.1\4Y4gtR_O1PVnb0chEkUYJ\contourpy-1.3.1.tar.gz\.mesonpy-em9d44k7
      Build type: native build
      Project name: contourpy
      Project version: 1.3.1

      ..\meson.build:1:0: ERROR: Could not find C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe

      A full log can be found at C:\Users\X\AppData\Local\rattler\cache\uv-cache\sdists-v5\pypi\contourpy\1.3.1\4Y4gtR_O1PVnb0chEkUYJ\contourpy-1.3.1.tar.gz\.mesonpy-em9d44k7\meson-logs\meson-log.txt

The weird thing is that if I keep either one of the packages loguru or geojsoncontour the install succeeds. Keeping both packages produces the error shown above.

Seems like it's trying to build contourpy from source, which is probably unwanted this can be caused by a constraint introduced by the conda version of loguru.
Would need to dive in to know more :)

Scratch that, I think it's a pixi bug, should be fixed in the next release :)


Add 3 cells to prod-lon

What
The memory usage in prod-lon has been climbing, and we're now below our
threshold again.
Judging from this graph:
https://prometheus-1.london.cloud.service.gov.uk/graph?g0.range_input=2w&g0.expr=rep_memory_capacity_pct%3Aavg5m&g0.tab=0
Last time we increased our scale by 3 instances we got an extra 23%
rep_memory_capacity_pct. We're now running at 23%, which is below our
threshold of 33%. Increasing the cell instances by 3 should give us
another 20% or so, which should take us above the threshold again.
I'll raise a separate PR to scale back Ireland, which seems to be
swimming in free memory now.
How to review

Code review should be fine

Who can review
Not @richardtowers

Be careful with the calculations as the graph is misleading. The last time we've got an alert at 32.8%, but the capacity dropped to ~20% temporarily. Shortly before the extra instances were added it went back to ~33% and after the scaling capacity was at 45%. (So the diff is only 12)
Here is the correct calculation for the previous time:
15 * (100-32.8) / 100 = 10.08 "units" used previously

(18 - 10.08) / 18 * 100 = 44% will be free after scaling.

Currently the capacity is at 23%:
18 * (100-23) / 100 = 13.86 "units" used

(21 - 13.86) / 21 * 100 = 34% will be free after scaling.

We're barely going to be over the alert limit with this increase.

Okay, I hadn't spotted that in the graph. I guess we'll have to scale again once this is out - we'll be able to observe how much capacity this gives us more directly.


pull request for e2e test at 11/07/2016 11:45:10

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

optest/docs/updated_at.md
:white_check_mark:Succeeded

Details

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Fix rolling_exp type for alpha values

[x] Passes pre-commit run --all-files
[ ] User visible changes (including notable bug fixes) are documented in whats-new.rst

Should we merge this or wait to fix mainline?


v2 crashes on run with missing dependency JetBrains.Annotations

Describe the bug
When referencing the latest v2 Terminal.Gui nuget package, starting up crashes:
System.IO.FileNotFoundException: 'Could not load file or assembly 'JetBrains.Annotations, Version=4<IP_ADDRESS>, Culture=neutral, PublicKeyToken=1010a0d8d6380325'. The system cannot find the file specified.'

To Reproduce
Create a new project:
dotnet new console -n "repro"
dotnet add package Terminal.Gui --prerelease

Set Program.cs to:
using Terminal.Gui;

Application.Init();

Application.Run(new Window());

Application.Shutdown();

Expected behavior
Program should start up, instead you get the above exception
As a workaround you can manually add the JetBrains.Annotations dependency into your project.

Multiple simple ways to handle that from our end. Most ideal is probably a little bit of a couple of them.
Just got home, but I'll take a look at it once I'm all settled.

Finally got in. Sheesh. Ok, taking a look.
@tznind
Was that the actual version it threw at you, verbatim, or was that just silliness?

Nevermind on that. Seems that's the actual version in the assembly. 😆
Red Herring anyway.
As with any analysis package, dev dependencies like that are dev-time only for the consumer and don't become part of their application.
All that needs to happen is having the dependency listed in the nuspec, which is just minor project file modification, since the nuspec is auto-generated from that.
I see a few minor issues with the project file aside from that, some of which are just legacy stuff or redundant, and a couple places we can make the builds a bit better/cleaner.
There's one element in the Terminal.Gui.csproj that I'm pretty sure can go but which I wanted to ask you about first, @tig 👍
What's that upstream element in the nuget packaging PropertyGroup at the bottom all about? I don't see anything in the build that would require that and all it really does anyway is makes local builds throw warnings that are just noise.
If it is needed by something, for some reason, there are a couple of available options to handle it cleanly. But, if it's not needed, I'll just take it out. Naming git remotes isn't a particularly common step of build pipelines, since it's only really relevant when you have more than one remote defined.
If there's a desire for the github workflow runners to be able to target multiple different remotes for test builds or whatever, that's something better handled in the workflow itself, through stuff like:

An environment/deployment on github (which is mostly just a group of variables passed to jobs as a set;
Inputs on workflows, such as:

workflow_dispatch, which can have manual inputs specified, with fallback defaults.
workflow_run, workflow_call, etc., which are triggered by invocation of or called from other workflows and take inputs from them.

I actually prefer to do a little of all of the above, since they're not remotely exclusive approaches and complement each other quite nicely.[^AllTheThings]
In fact, there's a lot of that sort of thing in the various workflows I'm putting together, at least one of which I'm going to be publishing on the github actions "marketplace" for general public use, soon, once I finish polishing it up.[^Oooo-Shiny]
[^Oooo-Shiny]: That one does a whole bunch of things that make workflows a whole lot easier to work with, especially for multi-platform jobs. I've got most of the org-specific stuff in that one removed, now, but there's still a little left, plus documentation and whatnot.
[^AllTheThings]: For example, environments can be handy to provide known baselines for certain sets of variables, and then a workflow can optionally override them, if desired.

......
Visual Studio really frustrates me sometimes....
I wasted so much time today fighting it, because it was randomly refusing to load random projects in random solutions. And just recently? Out of nowhere, it worked perfectly for like 20 minutes. Then it went back to being weird again... While I was reviewing an internal PR, so not even changing things!
le sigh 😞

GitRepositoryRemoteName is related to SourceLink.
 Go ahead and take it out for now.

Visual Studio really frustrates me sometimes....
I wasted so much time today fighting it, because it was randomly refusing to load random projects in random solutions. And just recently? Out of nowhere, it worked perfectly for like 20 minutes. Then it went back to being weird again... While I was reviewing an internal PR, so not even changing things!

This actually happens to me often. Sometimes I try to pull from upstream but I only have origin available and all other remotes are disabled. I am forced to close VS2022 and open it again for it to work, sometimes more than once. When this happens I try to do this operation with VSCode and the same strange behavior doesn't happen. I think that VS2022 is unable to unblock some processes that are preventing solutions and projects from initializing, as well as blocking git in some situations.

GitRepositoryRemoteName is related to SourceLink.
 Go ahead and take it out for now.

Currently (at least since .net 7), all you typically have to do is Have the package reference and the <EnableSourceLink>true</EnableSourceLink> element, which we have both of.
But, rather than taking out the GitRepositoryRemoteName element, I had a better thought that I've already done in my working copy: Just make the nuget-related stuff conditional and only active when told to be.
I did that and created a configuration for CI builds that does a few other things local builds don't need to do or that can make local builds harder to debug. I could have made it just do it automatically based on finding the GITHUB_WORKSPACE environment variable or something, but a configuration is easier, clearer, and also allows you to run the CI config locally, if you want/need to.
While doing that, I collected all of the stuff related to nuget down in the same part of the Terminal.Gui.csproj file, so it's all nice and clear.

Visual Studio really frustrates me sometimes....
I wasted so much time today fighting it, because it was randomly refusing to load random projects in random solutions. And just recently? Out of nowhere, it worked perfectly for like 20 minutes. Then it went back to being weird again... While I was reviewing an internal PR, so not even changing things!

This actually happens to me often. Sometimes I try to pull from upstream but I only have origin available and all other remotes are disabled. I am forced to close VS2022 and open it again for it to work, sometimes more than once. When this happens I try to do this operation with VSCode and the same strange behavior doesn't happen. I think that VS2022 is unable to unblock some processes that are preventing solutions and projects from initializing, as well as blocking git in some situations.

Haha yep.
And I even deleted caches at every level I am aware of.
It's a wonderful and powerful piece of software. But man, when it wants to throw a tantrum, it goes all out.

And yep, I do the same as you with Code @BDisp. It's usually my backup environment, since it's pretty much the best text editor on my windows partition. 😅  It's also pretty great for other languages, too, so it's usually running anyway.
But MAN I sure do miss all the goodies I've got just the way I like them in VS, when I can't use it.

I plan to at least partially (but probably completely) address this as part of #3572.

I'm also facing this same problem when trying to run a self-container (trimmed and single file) even adding the JetBrains.Annotations dependency to the project.
This situation should be corrected as quickly as possible because it is making it difficult to speed up development.

Self-Contained is going to require additional testing, anyway, but this specific problem, at least, will be resolved by #3572

Self-Contained is going to require additional testing, anyway, but this specific problem, at least, will be resolved by #3572

I think I've already managed to somewhat overcome the fact that Self-Contained is not functional in v2. But I'm really running into the JetBrains.Annotations problem. I'm glad you're already trying to resolve this and I just hope it's more or less brief so I can confirm that Self-Contained will work. Thanks.

You can make it go away for yourself by not defining the JETBRAINS_ANNOTATIONS constant in the project configuration.
The attributes are conditionally compiled, and only included in compiled output if that symbol is defined. If it isn't they exist only in the project and are not emitted into the assembly on build.
One of the alternate configurations I've made that will be in the PR for #3572 uses exactly that method to exclude them.

@tig, if you wanna just take out the JETBRAINS_ANNOTATIONS constant in the base project config, that won't hurt anything and will make that issue go away for now.
I'm currently planning to drop the PackageReference in most configurations and use the actual code for them, anyway, which is fully condoned behavior from JetBrains. The only reason they have that suggestion in that settings page to use the nuget package is so that you'll get new stuff whenever it's added. But we don't need that and if something useful were to come up, we can just copy that attribute class, too.
I said "most" configurations, above, because I'm making it conditional, so that in most builds it is just compiled in, but with the ability to reference instead if the consuming project already has a reference to that library, so that there aren't ambiguous type warnings when they compile their stuff.
Basically, the functionality remains, but the dependency disappears.

After I removed the JETBRAINS_ANNOTATIONS constant in the base project config, I'm getting the following exception with win-x64, but at least it tried to run.
Unhandled exception. System.TypeLoadException
   at Terminal.Gui.WindowsConsole.WriteConsole(IntPtr, String, UInt32, UInt32& , Object)
   at Terminal.Gui.WindowsConsole.WriteToConsole(Size, ExtendedCharInfo[], Coord, SmallRect, Boolean)
   at Terminal.Gui.WindowsDriver.UpdateScreen()
   at Terminal.Gui.Application.Begin(Toplevel)
   at Terminal.Gui.Application.Run(Toplevel, Func`2 )
   at Terminal.Gui.Application.Run[T](Func`2 , ConsoleDriver )
   at Program.<Main>$(String[]) in E:\Repos\CSharp\gui-cs\Terminal.Gui\SelfContained\Program.cs:line 9

With linux-x64 it can run but the Configuration Manager isn't working, not loading with the right color and quit key. I need to find a way to JsonSerializer generate the source code for self-contained.

That isn't related to that.
But sometimes it doesn't update the dependency files, which seems to have broken/changed in a recent .net SDK update, because the behavior started recently across a lot of projects I'm working on that have no relation to each other, and some of which don't use the JetBrains.Annotations attributes at all.
Try this:
dotnet clean
dotnet restore --force-evaluate --no-cache
# and then do the build as you normally would

Let me know if that changes anything.

It's almost like lock mode is now default or something for nuget. That's how it's behaving, anyway.

It's not related. It's due the limitations of not be allowed reflection. In the win -x64 it's some type not found.

Ah. Yeah there's still some of that here and there. We'll get it eventually!
.net 7 can break people by default anyway, including for V1, because all assemblies that don't opt out now default to having the trim options turned all the way on. It was in a breaking change doc for .net 7.
Here's something you could try, though, to see if it is a viable workaround for anyone who absolutely needs to be able to run it and doesn't care that the self-contained will be MASSIVE as a result:
Add this to your publish command: -p:PublishTrimmed=false

I've managed to get win-x64 to behave like linux-x64. The WriteConsole method has a parameter with the incorrect type. I will submit a PR to fix this.
Unfortunately, the ConfigurationManager is not deserializing item values because reflection is no longer allowed in self-container. I will have to try to find a solution by manipulating the TypeInfoResolver of the JsonSerializerOptions. If anyone reads this and already knows how to resolve this situation inherent to System.Text.Json.Serialization, I would greatly appreciate sharing it, thank you.

ConfigurationManager is likely to be the main casualty of that, or at least need the most work to adapt.
The Microsoft.Extensions.Configuration binder is all compile-time code generation, so it is trim-friendly (explicitly - that was a goal of it), and supports the standard DI pipeline/service host infrastructure as well.
It's already something I had planned to do once other more important stuff is done, but is still not at the top of my priorities at the moment, so it's certainly up for grabs if someone wants to tackle it before I get to it.
It came up in an issue or three many months ago, but it was very understandably not a priority back then, and is still kind of a low priority now - at least in my opinion - since it's not a development blocker for other functionality that isn't directly related to trim-compatibility.
Although that time is certainly approaching, as we are now starting to think more about the trim issues.

ConfigurationManager is likely to be the main casualty of that, or at least need the most work to adapt.

I am not convinced MEC can replace CM without losing some key functionality.
Regardless, I'm also not convinced CM can't be tweaked to work with trim.
A big part of the reflection it uses is due to limitations that existed in System.Text.Json when I wrote it ... that are now fixed. I don't remember all the details.
I've said it before though: If someone wants to replace CM with something based on MEC please have it... as long as it functions effectively the same.

Here's the issue: https://github.com/dotnet/runtime/issues/29538
Resolved here: https://github.com/dotnet/runtime/issues/78556

I've already managed to attach Self-contained to the debugger using win-x64. However, I cannot attach using linux-x64 and osx-x64 to the debugger, as it gives the following error. If anyone knows how to solve it, I'd be grateful in advance.

I've said it before though: If someone wants to replace CM with something based on MEC please have it... as long as it functions effectively the same.

Yep, that's what I referred to earlier (I think I submitted that comment anyway). It's just been not a big deal, with more pressing work to be done elsewhere, so far.
What you wrote largely works the same as the MEC binder, already, so my hope is that, when I sit down to address it, it'll mostly just be replacing the CM class itself, with the other code needing minimal tweaks, where any are needed at all.
Dropping a [JsonSerializable] on serialized types, with the generation mode set to the appropriate value makes it not emit both the source gen and reflection implementations, at compile time, which is the default if you don't specify the mode explicitly. That would probably help things, too, but seems like a waste of time to bother with since it's not like TG V2 is non-functional without that, so long as folks don't try to use it in a known incompatible way, especially for a pre-beta library.

In other words, I think it's totally fair to simply tell people what I've said in the issues that have been posted so far, which is basically "We're aware. It's not s supported use at the moment. It is planned to be a supported use before release."

I'm already fed up with doing the procedure below millions of times, even though I'm always using the same v2 branch just because I'm publishing with a different platform (win-x64, linux-x64 or osx-x64). It's very frustrating because it greatly reduces productivity.

cd Scripts\

import-Module ./Terminal.Gui.PowerShell.psd1

build-Analyzers -AutoClose -AutoLaunch -NoClean -Force

remove-Module Terminal.Gui.Powershell

exit

The value the analyzers provide right now is pretty minimal. I suggest if @dodexahedron can't commit to a fix that fixes these qol things in the next week, we back the analyzers out until the issues can be addressed.

But it wasn't, so I didn't, and I certainly have no regrets outside of empathy for @tig in particular, about any work done that ultimately goes poof. But that's how this game goes. 😅 If we somehow could get everything perfect with each keystroke, we'd be gods.

No angst here about stuff I've built going byebye. Heh, I built IE, Media Center, WHS, and WP7 and got over their deadness a long time ago.
I just care about the requirements.

I'm actually working on it right now, to give a temporary fix that can be delivered quicker.
Just putting them into a nuget package in a local feed, so they can act like any other.
I'm almost done with that. There are just a couple of small differences in analyzer packages, and I want to test in a few different environments to be sure I haven't missed anything major while splitting it off from the solution.
You'll still be able to build them yourself if you want to, for some reason. But I don't intend to make code changes to them before I publish the general-use package on nuget.org, so there's not really any point in doing that.
Terminal.Gui dev experience then goes back to before, but with the analyzers still working.
The Analyzers projects get removed from the build order in the solution so there's no project dependency for build any more. Or if you use the filters I added in one of the recent PRs, you also won't even be loading those projects anyway.

But it wasn't, so I didn't, and I certainly have no regrets outside of empathy for @tig in particular, about any work done that ultimately goes poof. But that's how this game goes. 😅 If we somehow could get everything perfect with each keystroke, we'd be gods.

No angst here about stuff I've built going byebye. Heh, I built IE, Media Center, WHS, and WP7 and got over their deadness a long time ago.
I just care about the requirements.

I'm not over Windows Phone getting brutally murdered the way it did. My Lumias are still my favorite phones I ever owned.
Maybe now with Windows on ARM and some other stuff going on, MS might take another stab at it at some point? One can dream, anyway.


Move to suitcss org?

Hey,
We've been (and currently still are) making various improvements and changes to the suitcss-preprocessor. Would you be open to moving this to the suitcss org (and adding me to npm) so that we can keep it up to date?

Hi ,
that's ok. since I already move to postcss.
I will transfer all the permission to you.

Thanks! Appreciate it


show PIPs in variant view

Currently the CS variants per pheno are stored in separate files. Need to check the CS table if this variant is within a region of CSs and check from those files if the variant is in CS and whats the PIP. If variant not in range for a pheno then NA.
Alternatively CS variants could be stored in DB.
https://results.finngen.fi/variant/2:102476622-C-T

Probably easiest to maintain if keeping the data as it is if not too slow!

Ah no worries this is alredy there but not working

Not missing feature but broken


Workaround for zk language server

zk language server cannot accept an empty publishDiagnostics field. I have no single idea how this change would affect other language servers, nor whether textadept actually supports textDocument/publishDiagnostics capability's relatedInformation field.

Hey, sorry for the delay. I was going to look into this when I have some time. If you are closing it because the zk language server can now handle an empty field, then please let me know.

No I didn’t close it, apparently deleting a branch automatically closes a PR.
Thinking about it again, it’s zk to blame here, not Textadept. So it’s maybe better if this remains closed, it seems its place is zk language server documentation.


Use Symfony Serializer

I think the Symfony Serializer might be better than php's serialize().
Or in addition to, I guess.

Is it okay if try to implement this? I also will provide the performance tests.
@rvanlaak

Yes sure, feel free to. Always great to hear willingness to contribute 💪


g:airline_symbols not defined

The help page states that special display symbols used by Airline can be set with g:airline_symbols.
But, with the latest code from Github, these symbols seem to be not defined at all. Setting these in vimrc and then opening vim throws the following error
E121: Undefined variable: g:airline_symbols

Check here https://github.com/bling/vim-airline/blob/master/doc/airline.txt#L150
Reopen if you still get an error

themes are automatically selected based on the matching colorscheme. this
can be overridden by defining a value. >
let g:airline_theme='dark'

Sorry, I don't understand it, How to define?
Can you pleasemake it more clear， better with complete code lines.
Thank you

How to define what?

Am 31.05.2020 um 19:26 schrieb homlex<EMAIL_ADDRESS>
Check here https://github.com/bling/vim-airline/blob/master/doc/airline.txt#L150
Reopen if you still get an error
themes are automatically selected based on the matching colorscheme. this
can be overridden by defining a value. >
let g:airline_theme='dark'
Sorry, I don't understand it, How to define?
Can you pleasemake it more clear， better with complete code lines.
Thank you
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

How to define what?
…
Am 31.05.2020 um 19:26 schrieb homlex @.***>:  Check here https://github.com/bling/vim-airline/blob/master/doc/airline.txt#L150 Reopen if you still get an error themes are automatically selected based on the matching colorscheme. this can be overridden by defining a value. > let g:airline_theme='dark' Sorry, I don't understand it, How to define? Can you pleasemake it more clear， better with complete code lines. Thank you — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

I'm getting this error
E121: Undefined variable: g:airline_symbols
and @hashken  says the #L150  may be the solve(i not so sure)
so i'm asking what to define and how...

That error message is about symbols not themes. Please show the exact error message and the source file to which the error refers.

Am 31.05.2020 um 19:40 schrieb homlex<EMAIL_ADDRESS>
How to define what?
…
Am 31.05.2020 um 19:26 schrieb homlex @.***>:  Check here https://github.com/bling/vim-airline/blob/master/doc/airline.txt#L150 Reopen if you still get an error themes are automatically selected based on the matching colorscheme. this can be overridden by defining a value. > let g:airline_theme='dark' Sorry, I don't understand it, How to define? Can you pleasemake it more clear， better with complete code lines. Thank you — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
I'm getting this error
E121: Undefined variable: g:airline_symbols
and @hashken says the #L150 may be the solve(i not so sure)
so i'm asking what to define and how...
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

I finally solved it by comment out those  error lines
and i'm going to sleep now  Thank u and good night


your config.guess is too old

What steps will reproduce the problem?
1. ./config.guess
2.
3.

What is the expected output? What do you see instead?

expect output: x86_64-apple-darwin11.3.0

your output:
i686-apple-darwin11.3.0

What version of the product are you using? On what operating system?

Please provide any additional information below.

please use the newest config.guess shipped with automake or libtool

Original issue reported on code.google.com by<EMAIL_ADDRESS>on 1 May 2012 at 2:10

fixed


[read_causal] Trigger certificate causal completion in read_causal lookups

Description
We added the backend read_causal graph walk in #214 and exposed it through its endpoint in #258.
However, the DAG natively does not have any cross-network functionality: when we request a particular certificate digest as the start of the DAG walk, we immediately fail if this vertex is not in the DAG.
By contrast, since #128 / #183  a get_collections call will trigger a network request to fetch a missing collection.
Moreover, we have functionality in the synchronizer since #214 / #240 to fetch missing certificates as well as missing collections.
This issue is to wire up the read_causal endpoint so that we try to synchronize a missing DAG walk starting point (and therefore its parents), using the client request as a trigger mechanism.

@huitseeker if I understood the bug correctly, your are saying that we don't trigger the causal completion for the starting point of the DAG walk on the read_causal endpoint, right? The thing is that we actually do, this is the call here: https://github.com/MystenLabs/narwhal/blob/2e33d54a78e6e14138a86bb301a36ec578381c3c/primary/src/grpc_server/validator.rs#L74 . Behind the scenes the handler will trigger - if needed - the causal completion of the providing ids and wait until it's done , so we can proceed further.
Now, this is something we discussed with @arun-koshy and I believe with you as well, since the synchronization of when a certificate has been delivered is happening based on the certificate_store, its possible that the certificate has appeared in the storage (hence the "handler" has seen this as causally completed) , but the certificate hasn't reached the DAG yet since its delivered via a different channel/mechanism - so we progress on the DAG walk but the certificate hasn't been delivered yet to the DAG it self. Basically by addressing the #230 #232 #233 we'll be able to tackle this problem.
Please let me know if I got this completely wrong.

Ah, no, it seems you got it completely right. My bad, the trigger slipped my mind. And indeed, #230, #232, #233 cover the concurrency issue between the point of arrival of the certificate (the store) and the point of retrieval (the dag).
So in the end, we pretty much want to scrap that issue and make it an umbrella for those 3 sub-issues.

Closing in favor of #232 which this now duplicates.


[Enhancement]: Add one node replica set support

Problem
There is no one-node replica set support for testcontainers-dotnet but the java version seems to have something. However, by looking at the java code I have some doubts whether that's properly initializing the replica set.
Solution
Add a WithReplicaSet(string replicaSetName = "rs0") or similar builder method.
Add another method to initialize the replica set.
Add another method to obtain the ReplicaSet connection string which should be something similar to mongodb://{hostname}:{mapped_port}/?replicaSet=rs0
Benefit
It would allow testing mongoDb replica set and things such as change streams, only available on replica sets. Also, it would get closer to the Java version in functionality.
Alternatives
Currently, mongoDb containers with one node replica set are possible to be created with Ductus.FluentDocker.
Also with testcontainers, but the random port is a challenge.
Would you like to help contributing this enhancement?
Yes

I have tried to add this functionality on this branch https://github.com/testcontainers/testcontainers-dotnet/tree/57bf8adf56e3ae701b8b488113a1e8db01d41a4a
but I wasn't successful.
Please view https://github.com/testcontainers/testcontainers-dotnet/blob/57bf8adf56e3ae701b8b488113a1e8db01d41a4a/tests/Testcontainers.MongoDb.Tests/MongoDbReplicaSetContainerTest.cs as it's the closest I got.
The biggest challenge I am finding is due to the random port. Not really a problem with testcontainers but with a lack of knowledge about mongodb and docker networking.
The mentioned test works well, and it demonstrates how a replica set can be created and initiated and available through a connection string such as mongodb://<IP_ADDRESS>:27017/?replicaSet=rs0
But it works because I am disabling the random port, which is not Ok.
If I specify a random port I could get the port number being used but, when initiating the replica set, I would get an error
MongoServerError[InvalidReplicaSetConfig]: No host described in new configuration with {version: 1, term: 0} for replica set rs0 maps to this node

I have manually tried to start the container without executing the rs.initiate(); part, but I wasn't successful. This is the process.

I execute the mongodb container in debug mode and set a breakpoint to leave it running and to explore the port being used
I check the mongodb container Id with

$ docker ps
CONTAINER ID   IMAGE                       COMMAND                  CREATED         STATUS         PORTS
NAMES
4149a2252b5c   mongo:7.0.7-jammy           "docker-entrypoint.s…"   5 seconds ago   Up 4 seconds   <IP_ADDRESS>:27017->27017/tcp   inspiring_hopper
49c9c66dab55   testcontainers/ryuk:0.6.0   "/bin/ryuk"              6 seconds ago   Up 5 seconds   <IP_ADDRESS>:51409->8080/tcp    testcontainers-ryuk-9647d181-f95c-480c-8903-ade881c200d3
3. I access the container's mongosh

$ docker exec -it 4149a2252b5c mongosh
Current Mongosh Log ID: 661aa220025bffaaf5db83af
Connecting to:          mongodb://<IP_ADDRESS>:27017/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+2.2.0
Using MongoDB:          7.0.7
Using Mongosh:          2.2.0
For mongosh info see: https://docs.mongodb.com/mongodb-shell/
To help improve our products, anonymous usage data is collected and sent to MongoDB periodically (https://www.mongodb.com/legal/privacy-policy).
You can opt-out by running the disableTelemetry() command.

The server generated these startup warnings when booting
2024-04-13T15:16:38.108+00:00: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine. See http://dochub.mongodb.org/core/prodnotes-filesystem
2024-04-13T15:16:38.697+00:00: Access control is not enabled for the database. Read and write access to data and configuration is unrestricted
2024-04-13T15:16:38.697+00:00: /sys/kernel/mm/transparent_hugepage/enabled is 'always'. We suggest setting it to 'never' in this binary version
2024-04-13T15:16:38.698+00:00: vm.max_map_count is too low
test>
4. I try to initiate the replica set

test> rs.initiate({_id: 'rs0', members: [{_id: 0, host: 'mongo:27017'}]});
{ ok: 1 }
and this works well for the port 27017, but if I am using a random port and I try to initiate it with that other port (e.g: 51523)

test> rs.initiate({_id: 'rs0', members: [{_id: 0, host: 'mongo:51523'}]});
MongoServerError[InvalidReplicaSetConfig]: No host described in new configuration with {version: 1, term: 0} for replica set rs0 maps to this node

Useful links:
- https://dev.to/asimmon/the-only-local-mongodb-replica-set-with-docker-compose-guide-youll-ever-need-dao
- https://stackoverflow.com/questions/78056302/mongo-as-replica-set-in-testcontainers-in-net/78277081#78277081
- Discussion https://github.com/testcontainers/testcontainers-dotnet/discussions/1150

Hi @diegosasw, just cross-posting my question here

Hi @diegosasw, just cross-posting my question here

I've had a look at your Go PR.
I can see you're also using custom object with members when initializing (Java mongo replica set does not have that). Did you make it work with random ports and with connection string with mongodb://host:port/?replica set=rs?
I'm wondering whether you know why this is not working for me.

I've been trying to do this as well, the closest I've gotten is this:
public static IContainer CreateMongoDBWithReplicaSet(Action<ContainerBuilder>? config = null)
{
	var builder = new ContainerBuilder()
		.WithImage("mongo:7.0")
		.WithCommand("--replSet rs0 --bind_ip_all")
		.WithPortBinding(MongoDbBuilder.MongoDbPort, true)
		.WithEnvironment("MONGO_INITDB_ROOT_USERNAME", MongoDbBuilder.DefaultUsername)
		.WithEnvironment("MONGO_INITDB_ROOT_PASSWORD", MongoDbBuilder.DefaultPassword)
		.WithWaitStrategy(Wait.ForUnixContainer().UntilPortIsAvailable(MongoDbBuilder.MongoDbPort))
		.WithStartupCallback(async (container, cancellationToken) =>
		{
			await container.ExecAsync(["bash", "-c", $"echo 'disableTelemetry()' | mongosh -u $MONGO_INITDB_ROOT_USERNAME -p $MONGO_INITDB_ROOT_PASSWORD"], isSuccess: result =>
			{
				result.Stderr.Should().BeNullOrEmpty();

				if (!string.IsNullOrEmpty(result.Stdout))
				{
					Console.WriteLine("stdout:" + result.Stdout);
				}

				return true;

			}, cancellationToken: cancellationToken);

			await container.ExecAsync(["bash", "-c", $"echo 'try {{ rs.status() }} catch (err) {{ rs.initiate({{_id: \"rs0\", members: [{{ _id: 0, host: \"localhost:{MongoDbBuilder.MongoDbPort}\" }}]}}) }};' | mongosh -u $MONGO_INITDB_ROOT_USERNAME -p $MONGO_INITDB_ROOT_PASSWORD"], e =>
			{
				return false;
			}, cancellationToken: cancellationToken);

			return;

			//  /data/keys/
			await container.ExecAsync(["ls /data/"], e =>
			{
				return false;
			}, cancellationToken: cancellationToken);

			await container.ExecAsync(["chmod 400 /data/keys/repl.key"], e =>
			{
				return false;
			}, cancellationToken: cancellationToken);

			await container.ExecAsync(["bash", "-c", $"echo 'disableTelemetry(); rs.initiate({{_id: \"rs0\", members: [{{ _id: 0, host: \"localhost:{MongoDbBuilder.MongoDbPort}\" }}]}});' | mongosh --keyFile /data/keys/repl.key -u $MONGO_INITDB_ROOT_USERNAME -p $MONGO_INITDB_ROOT_PASSWORD"], e =>
			{
				return false;
			}, cancellationToken: cancellationToken);
		});

	config?.Invoke(builder);

	return builder.Build();
}

static async Task<bool> ExecAsync(this IContainer container, List<string> commands, Func<ExecResult, bool>? isSuccess = null, bool throwOnFailure = true, int attempts = 10, int delayInMS = 100, CancellationToken cancellationToken = default)
{
	var attemptCount = 0;
	while (attemptCount < attempts)
	{
		try
		{
			var result = await container.ExecAsync(commands, cancellationToken);
			if (result.ExitCode == 0)
			{
				return isSuccess is not null && !isSuccess(result)
					? throw new Exception($"Command failed. Stdout: {result.Stdout}, Stderr: {result.Stderr}")
					: true;
			}

			result.ExitCode.Should().Be(0,
				because: $"MongoDB replica set initialization failed. Attempt {attemptCount + 1} of 10. Stdout: {result.Stdout}, Stderr: {result.Stderr}");
		}
		catch
		{
			await Task.Delay(delayInMS, cancellationToken);
			attemptCount++;
		}
	}

	return throwOnFailure
		? throw new Exception("Failed to execute command.")
		: false;
}

I've been trying to do this as well, the closest I've gotten is this:
public static IContainer CreateMongoDBWithReplicaSet(Action<ContainerBuilder>? config = null)
{
	var builder = new ContainerBuilder()
		.WithImage("mongo:7.0")
		.WithCommand("--replSet rs0 --bind_ip_all")
		.WithPortBinding(MongoDbBuilder.MongoDbPort, true)
		//.WithBindMount(mntPath, "/data-keys/")
		.WithEnvironment("MONGO_INITDB_ROOT_USERNAME", MongoDbBuilder.DefaultUsername)
		.WithEnvironment("MONGO_INITDB_ROOT_PASSWORD", MongoDbBuilder.DefaultPassword)
		.WithWaitStrategy(Wait.ForUnixContainer().UntilPortIsAvailable(MongoDbBuilder.MongoDbPort))
		.WithStartupCallback(async (container, cancellationToken) =>
		{
			await container.ExecAsync(["bash", "-c", $"echo 'disableTelemetry()' | mongosh -u $MONGO_INITDB_ROOT_USERNAME -p $MONGO_INITDB_ROOT_PASSWORD"], isSuccess: result =>
			{
				result.Stderr.Should().BeNullOrEmpty();

				if (!string.IsNullOrEmpty(result.Stdout))
				{
					Console.WriteLine("stdout:" + result.Stdout);
				}

				return true;

			}, cancellationToken: cancellationToken);

			await container.ExecAsync(["bash", "-c", $"echo 'try {{ rs.status() }} catch (err) {{ rs.initiate({{_id: \"rs0\", members: [{{ _id: 0, host: \"localhost:{MongoDbBuilder.MongoDbPort}\" }}]}}) }};' | mongosh -u $MONGO_INITDB_ROOT_USERNAME -p $MONGO_INITDB_ROOT_PASSWORD"], e =>
			{
				return false;
			}, cancellationToken: cancellationToken);

			return;

			await container.ExecAsync(["bash", "-c", $"echo 'disableTelemetry(); rs.initiate({{_id: \"rs0\", members: [{{ _id: 0, host: \"localhost:{MongoDbBuilder.MongoDbPort}\" }}]}});' | mongosh -u $MONGO_INITDB_ROOT_USERNAME -p $MONGO_INITDB_ROOT_PASSWORD"], e =>
			{
				return false;
			}, cancellationToken: cancellationToken);
		});

	config?.Invoke(builder);

	return builder.Build();
}

static async Task<bool> ExecAsync(this IContainer container, List<string> commands, Func<ExecResult, bool>? isSuccess = null, bool throwOnFailure = true, int attempts = 10, int delayInMS = 100, CancellationToken cancellationToken = default)
{
	var attemptCount = 0;
	while (attemptCount < attempts)
	{
		try
		{
			var result = await container.ExecAsync(commands, cancellationToken);
			if (result.ExitCode == 0)
			{
				return isSuccess is not null && !isSuccess(result)
					? throw new Exception($"Command failed. Stdout: {result.Stdout}, Stderr: {result.Stderr}")
					: true;
			}

			result.ExitCode.Should().Be(0,
				because: $"MongoDB replica set initialization failed. Attempt {attemptCount + 1} of 10. Stdout: {result.Stdout}, Stderr: {result.Stderr}");
		}
		catch
		{
			await Task.Delay(delayInMS, cancellationToken);
			attemptCount++;
		}
	}

	return throwOnFailure
		? throw new Exception("Failed to execute command.")
		: false;
}

It's failing as it requires a key, which I've been trying to use mount paths to generate and executing commands but so far failing.

Hey all, I've been looking for the same functionality myself and have implemented it locally before I saw this issue. I've just created a PR that provides a working configuration for a single node replica set - I've tested it locally on our integration tests, and it's been working perfectly so far
Let me know what you think


Xiaomi Cube Automation broke

Automations for Xiaomi Cube broke after 0.67.1. update.
Example of configured automation:
- id: -Cube- Toggle svetlo dnevne sobe
  alias: -Cube- Toggle svetlo dnevne sobe
  hide_entity: False
  trigger:
    platform: event
    event_type: cube_action
    event_data:
      entity_id: binary_sensor.cube_158d00011814a0
      action_type: shake_air
  action:
    service: switch.toggle
    entity_id: switch.dnevna_soba

In the log, the event could be caught as:
2018-04-19 11:37:05 INFO (MainThread) [homeassistant.core] Bus:Handling <Event cube_action[L]: action_type=shake_air, entity_id=binary_sensor.cube_158d00011814a0>
2018-04-19 11:37:07 INFO (MainThread) [homeassistant.core] Bus:Handling <Event cube_action[L]: action_type=shake_air, entity_id=binary_sensor.cube_158d00011814a0>
2018-04-19 11:37:11 INFO (MainThread) [homeassistant.core] Bus:Handling <Event cube_action[L]: action_type=shake_air, entity_id=binary_sensor.cube_158d00011814a0>

Automation is not triggered even if the event is caught. Documentation did not indicate any configuration change. Question is how to catch that event now?
Last working Home Assistant release (if known):
0.67.0

I just shaked my cube. It's still working fine on HA 0.68.0b2. :-)


Add icon explorations to master

This adds the icon explorations to master so that users on insiders can start using it. We can disable/remove this before we ship 1.35 since it's an exploration. Also assigning this to @aeschli since I'm using the file icon themes to change the workbench icons (this will be opt-in only).
To change the icons go to Preferences > File Icon Theme and select either VS Code Icon Explorations: Outline or VS Code Icon Explorations: Solid.

@aeschli please review, if we merge this into Insiders we can avoid needing people to install the exploration build (and not merge this big diff into the electron branch).

Main modifications are here:
https://github.com/microsoft/vscode/blob/0b2f7d22d77586ee5c7f54bc6b5397e9f59e18fd/src/vs/base/browser/ui/actionbar/actionbar.ts#L264
https://github.com/microsoft/vscode/blob/0b2f7d22d77586ee5c7f54bc6b5397e9f59e18fd/src/vs/workbench/services/themes/browser/workbenchThemeService.ts#L510

After talking to @bpasero about this, if this is going to live in master we should enable it via a (hidden?) setting. That probably won’t happen until after endgame is over so I’ll add that to my TODO.

Tried to update this PR with master and did something wrong. Will ditch this PR and create another.


Auto Import Duplicates

The auto complete for importing anything will duplicate the import 2-3 times but only in Svelte files.

So if I start typing, the suggestion for a type pops up and if I hit tab it completes and auto imports, the issue is that it imports it 2-3 times.

Note at some point it worked perfectly and then on an update it started doing this.

I can confirm this behaviour

It's an issue with the editor, not the extension. https://github.com/zed-industries/zed/issues/9248


Add youtube video for Json data module

This issue is created for adding a youtube cideo for JSON data module, that describe its usage and examples

The draft video script can be found in here
https://docs.google.com/document/d/1OLji4mEBM2ShpEp0B1NthUhtsuidRTnljI1u4TVQdn4/edit?usp=sharing


Adds e2e tests

TODO items:

[x] the test runner needs to be elevated or run as admin (this could no longer be an issue since github self-hosted runners do run as admin)
[ ] add all supported resource records other than A records

@mook-as the test need to run in an elevated shell as an admin by running go test -v .\test\e2e\dnslookup_test.go


Remove OPENSSL_memcmp.

After avoiding OPENSSL_memcmp for EC curve comparison, there are no remaining
uses in the source code.  The function is only defined in an internal header
and thus should be safe to remove for 3.0.0.

LGTM.

Merged to master.  Thanks guys.

So who's willing to complete the cleanup?  :wink:
Hint: git grep CRYPTO_memcmp
(if no one else will, I will)

Never mind that remark...  CRYPTO_memcmp is a public function.  But I do wonder if it serves a real purpose any more, or if we should alias it to memcmp...

Never mind that remark... CRYPTO_memcmp is a public function. But I do wonder if it serves a real purpose any more, or if we should alias it to memcmp...

At least some calls of it provide a constant-time comparison.

Ah!  I keep forgetting about constant time, thanks for the reminder.

Would spelling out the constant time make sense?
I.e. ossl_constant_time_memcmp and leave CRYPTO_memcmp as a stub?


FRAME API doc

Is there an existing issue?

[ ] I have searched the existing issues

Experiencing problems? Have you tried our Stack Exchange first?

[ ] This is not a support question.

Content request
I wish to first commend the substrate team for the revamp of the substrate doc.
However the documentation for APIs are not the easiest to use. Short code example to demonstrate how to use these API could ease onboarding developers.
Are you willing to help with this request?
Maybe (please elaborate above)

Thanks 😁 - Lisa championed most of the thought behind the revamp
Can you be more explicit? What APIs specifically, and please point to examples in the live pages of things you are suggesting?


Auto generate bungee.yml and plugin.yml

Use annotations to generate bungee.yml (Bungeecord) and plugin.yml (Spigot).  I'll see if I can find it again.

Some options on the Spigot wiki here: https://www.spigotmc.org/wiki/spigot-gradle/#generators

Unfortunately the ones listed there are just reading the values from the gradle.build file and generating an xxx.yml file from it.
It doesn't solve the problem because the values have to be written twice (once in code and again in gradle.build).
I was thinking of using annotations and an annotation processor to generate the file, because all these values are already available in code.
For example...
@Command
class TPCommand {

    @CommandLabel
    private var label = "tp"

    ...
}

I believe something already exists like this for Spigot, but I've never managed to find an equivalent for Bungeecord


Fix wiki

org.springframework.beans.NotWritablePropertyException: Invalid property 'changelogsBasePackage' of bean class [com.github.mongobee.Mongobee]: Bean property 'changelogsBasePackage' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?

i guess example in wiki not correct

wiki fixed. thanks!


Set kubelet eviction-hard based on total memory

The kubelet will default to memory.available<100Mi as the hard eviction
threshold. This makes that figure 5% of the total memory or 100Mi.
Whichever is greater.
Read from the default memory facts to set the kubelet eviction-hard
parameter.
Default facts:
https://puppet.com/docs/facter/3.10/core_facts.html#memory
Implements https://github.com/jetstack/tarmak/issues/149

What this PR does / why we need it:
Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #
Special notes for your reviewer:
Release note:

Sets a kubelet hard eviction target to 5% of the node's total memory.

/test puppet-tarmak-acceptance-ubuntu v1.9

I have a feeling that the ubuntu acceptance tests are also failing because of the changes to the puppet repo config.
I0410 10:55:34.503] Call:  /workspace/./test-infra/jenkins/../scenarios/execute.py --env FIXTURES_YML=.fixtures.yml.local -- make -C puppet/modules/tarmak acceptance-1-9-ubuntu

This looks like maybe the submodule isn't there for some reason. Either way, I'm not sure how it could be caused by the changes in this PR...

/test verify quick

/test puppet-tarmak-acceptance-ubuntu v1.9

/lgtm


[AutoRelease] t2-qumulo-2023-04-07-12832(can only be merged by SDK owner)

https://github.com/Azure/sdk-release-request/issues/4021
Live test success

issue link:https://github.com/Azure/sdk-release-request/issues/4021

@lmazuel , @msyyc , @Wzb123456789 Can you please review this PR. We want to merge it this week as next week is ur GA and before that we want to have beta release of python sdk. Our earlier PR was also closed and we didn't have python sdk release currently. https://github.com/Azure/azure-sdk-for-python/pull/27833

After discussion, we will release the package on 04/15

After discussion, we will release the package on 04/15

Hi @msyyc are we on track for release on 15th. Please let me know if anything needed from our side.

/check-enforcer override


Dead kernel when fitting UMAP

Hi,
I have installed UMAP, when I try and run it in my notebook I do not get any errors, but rather a dead kernel.
The terminal in which I have started the notebook has the following error:
Assertion failed: (PassInf && "Expected all immutable passes to be initialized"), function addImmutablePass, file /Users/buildbot/miniconda3/conda-bld/llvmdev_1556270736866/work/lib/IR/LegacyPassManager.cpp, line 849.

Any ideas?
EDIT:
So I managed to get it to work by executing each of the following lines separately:
import umap
reducer = umap.UMAP()
embedding = reducer.fit_transform(X)

However when they are in a single notebook block they kill the kernel... how odd!!!

I have done this multiple times and have never encountered this problem. Maybe you could try with a fresh environment.

That is very odd -- I've never seen anything quite like this. Unfortunately given that the code executed separately works this means it likely relates to interesting interactions between jupyter, numba, and llvm that go beyond the scope of anything I can address without a consistent reproducer on my end. Hopefully you can work with the workaround you found for now.

Yeah all good for me.
Feel free to close this if you wish.

I am still getting this issue. This is is fixed already?

Not that I'm aware of -- it is not reproducible for me, so I can't really track it down. If it is consistently reproducible on your setup I would welcome any finer detailed triage you can provide.

@NimmiW, try reinstalling or update to umap-learn version 0.4.2. That fixed it for me.


Change N/A to "No local license could be found for the dependency" on HTML report

details here: https://github.com/bucharest-gold/license-reporter/issues/193#issuecomment-338269581

https://github.com/bucharest-gold/license-reporter/commit/786aed77846fe8663003d6073addb18d8a632d37


Create a support-archive that contains logfiles and other relevant information for troubleshooting

The CLI should create a support archive using the following steps:

Collect information about local OS and Keptn CLI version
API URL
Check if API is reachable
Check if kubectl context is set to the correct Keptn installation // https://keptn.sh/docs/0.6.0/reference/troubleshooting/#verify-kubernetes-context-with-keptn-installation
kubectl version
Log and status of installer (if available) // see https://keptn.sh/docs/0.6.0/reference/troubleshooting/#troubleshooting-the-installer
List of namespaces
List of configmaps and secrets (though not their content!) within the keptn namespace
Keptn Domain
List of all deployments and the deployed image name/tag in namespaces keptn (e.g., kubectl -n keptn get deployments -owide) as well as keptn-datastore
Check if all pods are up and running // see https://keptn.sh/docs/0.6.0/reference/troubleshooting/#verifying-a-keptn-installation
Log output of all services in the namespaces keptn and keptn-datastore
If possible, list of all projects, services and stages
Maybe some Kubernetes events? kubectl get events  --sort-by='.metadata.creationTimestamp' -n keptn and kubectl get events  --sort-by='.metadata.creationTimestamp' -n keptn-datastore
Maybe some Kubernetes metadata? kubectl get nodes and kubectl describe nodes

All of this should be packed into a support-archive (e.g., a zip file). We need to alert the user that this support archive might contain personal or secret information, and that they should review the archive before sending it to anyone.
Definition of Done

User gets a warning if the kubectl context does not match the configured keptn api
User can use keptn CLI to create a support archive of the Kubernetes cluster that they are currently connected to.
User can manually inspect the support archive

This is great. The most important thing are the outputs we are always asking - but I think you have all of them covered, e.g: deployed pods & status, logs of pods
The CLI should capture all this and zip it up into a single file so that it is easy to send for the user


Installation issue with SMF 2.1.

While installing this mod under 2.1.4, initial message is that all is fine to install but once you press the final install button one ends up with a white screen only.
I have tested this on a vanilla install of SMF 2.1.4, same results.
Running SMF on ubuntu 22.04.4 with Mariadb 10.6.16 using php 7.4.33
Any clue what the fix is here?

Issue resolved, was still running PHP7.4
After upgrade to 8.2 all solved


IDE quick fixes using spread and if

Here are a couple more patterns I see in code that could be automatically fixed to use the upcoming spread and control flow collection syntax:
// From:
[<stuff>]..addAll(condition ? things : const [])
[<stuff>]..addAll(condition ? things : [])
// To:
[<stuff>, if (condition) ...things]

// ---

// From:
[<stuff>]..addAll(things ?? const [])
[<stuff>]..addAll(things ?? [])
// To:
[<stuff>, ...?things]

https://dart-review.googlesource.com/c/sdk/+/92165


Fix erroneous masks for Coreg classes

Fixes #195 .
Changes:

warp_dem() now has mask dilation by default.
get_array_and_mask() takes and properly respects Rasters now (it was used with rasters before, but the mask was not respected).
-9999 values in warp_dem() were replaced by np.nan
Added a warning catcher in apply_matrix() (due to skimage + numpy deprecation warning)
Improved test to validate that the above changes fixes the problem.

Something that is not tested automatically but was tested manually was the example by @adehecq in #195 in examples/plot_blockwise_coreg.py. As seen in the screenshot in #195, these fixes solve that problem.

@adehecq, I've honestly forgot why these lines need to exist, but they do right now:
https://github.com/GlacioHack/xdem/blob/dd91748ac9ee64122521348c3752789730aa52e8/xdem/coreg.py#L1442
If I remove them, the test_nuth_kaab() fails since an edge effect becomes predominant.

Thanks for fixing the bugs!


Feature Request (missing/incomplete docs): Deployment Options (Guide)

Type(/-s) of missing documentation

[ ] Explanation of a concept
[ ] Tutorial for achieving a task with the Telestion ecosystem
[X] Guide that explains how to use a specific tool in more detail
[ ] Reference to quickly look something up

Description of missing documentation
A guide that explains various options and best practices around Application deployment.
Additional comments
Our template's concrete implemented deployment structure should be documented within the template's README.md. This guide should give an overview of some options ("raw" Java, Docker, docker-compose, binaries with portable Java instance, etc.) and best practices around them.

Removing from milestone as we now have a tutorial through #194 => no longer of critical priority


feat(build): add chart-readme Makefile target

Description:
This change adds a new chart-readme Makefile target to generate
charts/osm/README.md using helm-docs.

Affected area:

New Functionality      [ ]
Documentation          [ ]
Install                [ ]
Control Plane          [ ]
CLI Tool               [ ]
Certificate Management [ ]
Networking             [ ]
Metrics                [ ]
SMI Policy             [ ]
Security               [ ]
Tests                  [ ]
CI System              [ ]
Performance            [ ]
Other                  [X]

Please answer the following questions with yes/no.

Does this change contain code from or inspired by another project? If so, did you notify the maintainers and provide attribution?
No

Codecov Report

Merging #2053 (7a1d235) into main (9f7c8ce) will increase coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #2053      +/-   ##
==========================================
+ Coverage   57.62%   57.64%   +0.01%
==========================================
  Files         140      140
  Lines        5728     5728
==========================================
+ Hits         3301     3302       +1
+ Misses       2425     2424       -1
  Partials        2        2

Impacted Files
Coverage Δ

pkg/envoy/route/config.go
96.03% <0.00%> (+0.79%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9f7c8ce...7a1d235. Read the comment docs.


How to get help (for dummies :)?

Problem is I can't cope with getting array items to check if (click)event.target is ANY of those.
Details:  'My Contacts' block (all inside UL > LI) each (LI) item reveals on hover. But I need js to add some flavour for touchscreens, that is click or tap on block, yet outside of span text & outside of icons reveals all items (by adding class) for a while.
https://jsfiddle.net/jetcompass/j5z9Lkjb/#&togetherjs=CoguwRQ72v
Would be much thankful for any help

I am not sure if this helps, but you are trying to use some() against u(); u() doesn't return an array, it returns an Umbrella object. The array itself is in u().nodes, so you could do:
txtnodes.nodes.some(...)

However, I recommend using event delegation for this situation. It works in a similar way (hopefully same) to jQuery:
function hreveal(evt) {
  evt.currentTarget  // Should be <span>
  evt.target // Should be <span> or a child of it
};
u('#reveal_contacts').on('click', 'div.link_title span', hreveal);

JSFiddle

Thanx franciscop, the point is it shouldn't be one of spans (anything outside of spans yet within #reveal_contacts), but it seems I've got easier one:
function hreveal(evt) { 		if (evt.target === evt.currentTarget) { // which is UL tag 			rcitems.toggleClass("width100pc"); 			setTimeout(function(){ 				rcitems.toggleClass("width100pc"); 			}, 3000);     }   };
http://uzlander.site50.net/
Nice small library, essential for devs (at least those of my level :))


When 2 USB devices remove each USB hub, it can no longer be redirected.

usbdk was successfully deleted PDO from list when only one of USB Device removed,
but case of two devices, it was not deleted.
I also attempt to once again redirect the USB devices, it will not be able to redirect because the PDO remains in the list.
Is it possible to fix this issue?
Regards,
yoshiki-k

I unplug the redirected device with USB hub.
I tried to once again redirect the device, but it was an error.
[Operating procedure]

connect USBHUB(VID_05E3&PID_0608) & USBMemory(VID_04BB&PID_0CCB)
redirect USBMemory
disconnect USBHUB(with USBMemory)
press return key (exit UsbDkController.exe)
connect USBHUB(VID_05E3&PID_0608) & USBMemory(VID_04BB&PID_0CCB)
redirect USBMemory
Redirect of USB device failed

When I unplugged only device from the USB hub, the following log was written.
[UsbDk]CUsbDkRedirection::NotifyRedirectionRemovalStarted Redirector removal started for USB\VID_04BB&PID_0CCB
[UsbDk]CUsbDkControlDevice::GetPDOByDeviceID PDO was not found
When I unplug the device in conjunction with a USB hub, the following log was written.
[UsbDk]CUsbDkRedirection::NotifyRedirectionRemovalStarted Redirector removal started for USB\VID_04BB&PID_0CCB
[UsbDk]CWdmUsbDeviceAccess::Reset Send IOCTL IRP Error 0xc000000e(STATUS_NO_SUCH_DEVICE)
Removed the device seem to remain in the list.
I've modified the source in order to delete the list of the redirected device.
Although the next redirect worked fine, it seems like this modification is not appropriate.
[ControlDevice.cpp]
NTSTATUS CUsbDkControlDevice::RemoveRedirect(const USB_DK_DEVICE_ID &DeviceId)
{
...
//    return res;	// line 947 commented
...
}
Thank you for your advice.
usbdkcontroller.txt
traceview.txt
Regards,
yoshiki-k

Hello and thank you for this report. I will investigate this.

Hi @yoshiki-k,
I made a fix and pushed it to branch d-fix-hub-removal (https://github.com/daynix/UsbDk/tree/d-fix-hub-removal). Could you please verify it on your system.
Thanks,
Dmitry

UsbDk has been improved by this version!
I think that need to be fixed for spicy.
I expect the official release!
Thanks,
yoshiki-k

Fixed by bf79d6e9425b1587aaa542c31912f5f6a574cd64.

Fix will be included into v v1.00-15


chore: pull changes from master and v0.22-dev

Issue being fixed or feature implemented

Pull changes from master and v0.22-dev
What was done?

Pull up instant-lock fixes and other work committed after the branch was created
How Has This Been Tested?

Locally
Breaking Changes

Fixes annoying instantlock issues
Checklist:

[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have added or updated relevant unit/integration/functional/e2e tests
[x] I have made corresponding changes to the documentation

For repository code-owners and collaborators only

[x] I have assigned this pull request to a milestone

I've updated v0.23-dev for you

Thanks


WIP [camera] Define clang modules in for iOS

Description

Limit the supported podspec platform to iOS so tests don't run (and fail) for macOS.
Define the module by setting DEFINES_MODULE in the podspec.  See CocoaPod modular headers docs.
Explicitly set VALID_ARCHS to architectures included in the Flutter universal binary.  This is the CocoaPods-suggested workaround to prevent tests from running on the i386 simulator.  See https://github.com/CocoaPods/CocoaPods/pull/8159.

Related Issues
Fixes https://github.com/flutter/flutter/issues/41439.
See also https://github.com/flutter/flutter/issues/41007.
Tests

Add a test_spec to the podspec so the CocoaPods linter will test them.  These tests fail before the s.platform and s.pod_target_xcconfig changes.
Add Cirrus script to lint and test plugins with iOS platform code. This uses CocoaPods's built-in test_specs and lints and tests via pod lib lint.
Exclude every iOS plugin except for camera from this script until they can be migrated.  Linter errors/warnings for all plugins:

find . -name "*\.podspec" -exec pod lib lint {} --analyze --verbose  \;

Checklist

[x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
[x] My PR includes unit or integration tests for all changed/updated/fixed behaviors (See [Contributor Guide]).
[x] All existing and new tests are passing.
[x] I updated/added relevant documentation (doc comments with ///).
[x] The analyzer (flutter analyze) does not report any problems on my PR.
[x] I read and followed the [Flutter Style Guide].
[x] The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
[x] I updated pubspec.yaml with an appropriate new version according to the [pub versioning philosophy].
[x] I updated CHANGELOG.md to add a description of the change.
[x] I signed the [CLA].
[x] I am willing to follow-up on review comments in a timely manner.

Breaking Change

[ ] Yes, this is a breaking change (please indicate a breaking change in CHANGELOG.md and increment major revision).
[x] No, this is not a breaking change.

Add Cirrus script to lint and test plugins with iOS platform code. This uses CocoaPods's built-in test_specs and lints and tests via pod lib lint.

Here's the first run:
https://cirrus-ci.com/task/5308706226438144?command=main#L5


[move] Expose Clock to Move code

Expose a shared object to read time from -- Clock -- that is created during genesis, and an accessor for move.  This commit does not introduce the system transaction that updates the timestamp held in this object, so its timestamp will remain at 0, except in tests which are free to increment it.
Also introduces a sui-specific verification rule that entry functions may only accept a Clock by immutable reference (not by value or mutable reference).  This is to complement RWLock work:

RWLock eases contention on shared objects that are read much more often than they are written, but it does not prevent people from taking a mutable reference to the shared object even if they only need to read it.

Only the system transaction legitimately needs to take the Clock by mutable reference, so the new verification rule prevents the creation of entry functions that could cause unnecessary contention on the Clock, intentionally or otherwise.

Validators will also prevent the signing of transactions that accept the Clock by mutable reference (excluding the system transaction to update it), as a further precaution -- not part of this commit.

Breaking Changes

New Sui Framework Module sui::clock,
New genesis object 0x6: sui::clock::Clock (requires re-genesis).

Test Plan
New verifier and genesis snapshot tests:
sui$ cargo nextest run

RWLock eases contention on shared objects that are read much more often than they are written, but it does not prevent people from taking a mutable reference to the shared object even if they only need to read it.

I haven't followed the discussion around RWLock, but I find i'm having trouble wrapping my head around how such a concept would even work with Sui. Even if you take an object with an immutable reference that object still needs to have its version updated, effectively "mutating" and leading to txns that all access the clock having the requirement that they are serially executed. Of course perhaps this has been relaxed a bit with the discussions around RWLock?

I will need @andll's help to explain how RWLocks get implemented!

Even if you take an object with an immutable reference that object still needs to have its version updated, effectively "mutating" and leading to txns that all access the clock having the requirement that they are serially executed.

This was the case previously, where all consensus references were effectively write references (regardless of move argument type).
However, with RWLocks we do not increment object version when transaction specifies that object reference is immutable(via mutable flag) - no new object version is created and transactions referencing same versions can truly execute in parallel. To implement this we leverage MVCC approach where transaction references specific version of an object which resolves concurrent access problem. There are more details in the notion doc (apologies to public who can do not have access to mysten notion).

The PR looks good in terms of rust changes(which aren't too many), but I'll leave to someone on move team to accept


Hi Everyone when i am trying to customize 2 pages for example login and loginOtp then i am getting issue only one page can be just modified else i am getting import errors

Hello @RoshanMobiliseDev,
Please join the Discord server to receive support.


Fixed: Typo in codebase best practices md #48835

Checklist:

[ ] I have read freeCodeCamp's contribution guidelines.
[ ] My pull request has a descriptive title (not a vague title like Update index.md)
[ ] My pull request targets the main branch of freeCodeCamp.
[ ] I have tested these changes either locally on my machine, or GitPod.

Closes #48835

Hey @pratikbhangire123
This PR seems to make similar changes as the existing PR #48843. As such, we are going to close this as duplicate.
If you feel you have additional changes to expand upon this PR, please feel free to push your commits and request this PR be reopened.
Thanks again! 😊

If you have any questions, feel free to ask questions on the 'Contributors' category on our forum or the contributors chat room.


Runtime Error: This profiler is not currently running

This is my first time using a profiler, how do i make the profiler run? This is how i add the middleware
if app_config.PROFILE_MODE:
    print("__________________profile mode__________________")

    from fastapi_profiler import PyInstrumentProfilerMiddleware

    app.add_middleware(
        PyInstrumentProfilerMiddleware,
        server_app=app,  # Required to output the profile on server shutdown
        profiler_output_type="html",
        is_print_each_request=False,  # Set to True to show request profile on
        # stdout on each request
        open_in_browser=True,  # Set to true to open your web-browser automatically
        # when the server shuts down
        html_file_name="example_profile.html",  # Filename for output)
    )

+1 similar issue, although in my case fastapi_profiler was working earlier in the development cycle with the project.  Certainly seems like something has been added to the project that is now making fastapi_profiler unhappy, but I can't yet find the root-cause by stripping everything back etc

fastapi==0.92.0
fastapi-profiler==1.1.0
starlette==0.25.0
uvicorn==0.20.0

ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/home/user/.local/venvs/awesome-api/lib/python3.10/site-packages/uvicorn/protocols/http/h11_impl.py", line 407, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
  File "/home/user/.local/venvs/awesome-api/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in __call__
    return await self.app(scope, receive, send)
  File "/home/user/.local/venvs/awesome-api/lib/python3.10/site-packages/fastapi/applications.py", line 271, in __call__
    await super().__call__(scope, receive, send)
  File "/home/user/.local/venvs/awesome-api/lib/python3.10/site-packages/starlette/applications.py", line 118, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/home/user/.local/venvs/awesome-api/lib/python3.10/site-packages/starlette/middleware/errors.py", line 184, in __call__
    raise exc
  File "/home/user/.local/venvs/awesome-api/lib/python3.10/site-packages/starlette/middleware/errors.py", line 162, in __call__
    await self.app(scope, receive, _send)
  File "/home/user/.local/venvs/awesome-api/lib/python3.10/site-packages/fastapi_profiler/profiler.py", line 77, in __call__
    self._profiler.stop()
  File "/home/user/.local/venvs/awesome-api/lib/python3.10/site-packages/pyinstrument/profiler.py", line 144, in stop
    raise RuntimeError("This profiler is not currently running.")
RuntimeError: This profiler is not currently running.

I have the same error

same hear

same

也遇到了这个错误
@sunhailin-Leo 可以修复下吗

set async_mode="strict" https://pyinstrument.readthedocs.io/en/latest/reference.html#pyinstrument.Profiler.async_mode
app.add_middleware(
    PyInstrumentProfilerMiddleware,
    server_app=app,  # Required to output the profile on server shutdown
    profiler_output_type="html",
    is_print_each_request=False,  # Set to True to show request profile on
                                  # stdout on each request
    open_in_browser=False,  # Set to true to open your web-browser automatically
                            # when the server shuts down
    async_mode="strict",
    html_file_name="example_profile.html"  # Filename for output
)

What OS did you use?

fastapi, pyinstructment, fastapi-profiler are latest version
I tested it on Windows 11(with WSL2) and MacOS, with Python 3.7 and Python 3.10. it doesn`t meet this error.

@sunhailin-Leo su
I have the same issue when profiling with high-concurrent users (using locust), it works fine if I call requests sequentially (CCU = 1).
Can this problem be fixed? or any suggestions if I want to profile my FastAPI Server with accumulative metrics from multiple requests in high-concurrent users context?

@nhhviet98

Did you try this async_mode="strict" ?

@nhhviet98

Did you try this async_mode="strict" ?

Yes, I tried. I also try with fastapi_profiler 1.4.1 and 1.2.0 but it also has the same error log.

@nhhviet98

Did you try this async_mode="strict" ?

Yes, I tried. I also try with fastapi_profiler 1.4.1 and 1.2.0 but it also has the same error log.

I'm not quite sure how you're using the profiler middleware, but I'm not reproducing the issue in my local environment. Can you provide me with your environment and deployment information?

@sunhailin-Leo
After some debugging steps, I rewrote a simple FastAPI app from my scenarios. The difference with this example is my function has some asynchronous function, so 1 worker can handle multiple requests at the same time. And profiler Failed to stop profiling.
I also realized that the error rate increases as concurrent users increase. (using locust to increase CCU)
This is my simple FastAPI application:
import asyncio
import uvicorn

from fastapi import FastAPI
from fastapi_profiler import PyInstrumentProfilerMiddleware

app = FastAPI()

app.add_middleware(
    PyInstrumentProfilerMiddleware,
    server_app=app,  # Required to output the profile on server shutdown
    profiler_output_type="html",
    is_print_each_request=True,  # Set to True to show request profile on
    # stdout on each request
    open_in_browser=True,  # Set to true to open your web-browser automatically
    # when the server shuts down
    async_mode="strict",
    html_file_name="example_profile.html"  # Filename for outputFilename for output
)

@app.get("/items")
async def read_item():
    await asyncio.sleep(1)  # Simulating an async task
    return {"message": "This is an async response"}

if __name__ == "__main__":
    uvicorn.run(
        "app.main:app",
        host="<IP_ADDRESS>",
        port=3014,
        log_level="info",
        workers=1
    )

Dependencies:

fastapi_profiler==1.4.1
pyinstrument==4.6.0

Thank you so much for your enthusiastic support. 💯

@ndejong

This problem does occur when you are using asyncio.sleep. However, I don't think you should use the asyncio.sleep function to reproduce this problem. Because the implementation logic of asyncio.sleep is not comparable to asynchronous tasks used in real scenarios.
You can check asyncio.sleep source code

@ndejong

Personally, I think it's because events.TimerHandle used within asyncio.sleep causes the currently running coroutine to hang, which allows the Profiler to catch the coroutine as not being an active session which ultimately leads to an error in the middleware call.

@sunhailin-Leo
As I mentioned above, asyncio.sleep() that I've used only for simplicity. In my reality scenario, async def is for downloading an image from a public URL asynchronously.
I think that (may not be accurate) because when a FastAPI worker handles 2 requests simultaneously (because I use async in my router), after request 1 calls self._stop_profiler, request 2 also calls self._stop_profiler after that (when the profiler is stopped) => It's raise this error in middleware.

I'm not too sure about my opinion so please give me your opinion (if you have a solution, that would be even better 😍)

@sunhailin-Leo
As I mentioned above, asyncio.sleep() that I've used only for simplicity. In my reality scenario, async def is for downloading an image from a public URL asynchronously.
I think that (may not be accurate) because when a FastAPI worker handles 2 requests simultaneously (because I use async in my router), after request 1 calls self._stop_profiler, request 2 also calls self._stop_profiler after that (when the profiler is stopped) => It's raise this error in middleware.
I'm not too sure about my opinion so please give me your opinion (if you have a solution, that would be even better 😍)

Does this issue occur if you add a Profiler test when accessing an external URL using async def?

@nhhviet98

My opinion is that there is no need to use asyncio.sleep as a test, but use real code logic to find the part that takes the longest.
This is the scenario where Profiler should really be used.

@sunhailin-Leo
As I mentioned above, asyncio.sleep() that I've used only for simplicity. In my reality scenario, async def is for downloading an image from a public URL asynchronously.
I think that (may not be accurate) because when a FastAPI worker handles 2 requests simultaneously (because I use async in my router), after request 1 calls self._stop_profiler, request 2 also calls self._stop_profiler after that (when the profiler is stopped) => It's raise this error in middleware.
I'm not too sure about my opinion so please give me your opinion (if you have a solution, that would be even better 😍)

Does this issue occur if you add a Profiler test when accessing an external URL using async def?

Yes, this issue also occurs.

@nhhviet98

My opinion is that there is no need to use asyncio.sleep as a test, but use real code logic to find the part that takes the longest.
This is the scenario where Profiler should really be used.

I see what you mean, my scenario is profiling my FastAPI server with high CCU and finding what bottleneck in my code, with the latest version of fastapi_profiler, it can work if I don't use async def in my code.
Any suggestion for me :(

@nhhviet98

I found the problem. The main reason is that pyinstrument is thread-unsafe in getting stack information in concurrent scenarios, so sequential calls don't cause problems, concurrent calls do.
Next I tried to see how to fix the problem.

@sunhailin-Leo
Any update on this issue?

@sunhailin-Leo
Any update on this issue?

If the Profiler is created on a per-request basis, you won't have this problem. But how about putting it at global initialisation when that problem occurs in concurrent scenarios.

@sunhailin-Leo I am encountering the same error. You said that if profiler is created on a per-request basis, this won't be a problem. Any idea how to do that? Also, wouldn't the overhead be a little bit more if we're doing that?


WIP: 2-cockpit-11: [no-test] Update translations from Fedora Zanata

Update translations from Fedora Zanata

[ ] po-refresh

po-refresh in progress on 1-cockpit-9.
Log: https://<IP_ADDRESS>:8493/logs/po-refresh-863-20200102-030707/

po-refresh in progress on 2-cockpit-11.
Log: https://<IP_ADDRESS>:8493/logs/po-refresh-863-20200102-030707/


Implement value witness table for @differentiable functions

@differentiable function is actually a triple (function, jvp, vjp). Previously normal thick function value witness table was used. As a result, for example,  only function was copied, but none of differential components.
This was the cause of uninitialized memory accesses and subsequent segfaults.
Should fix (now unavailable) TF-1122

@swift-ci Please test

Tagging @BradLarson

@swift-ci Please test macOS platform

@dan-zheng @rxwei I checked locally and for me all disabled parts with #if REQUIRES_SR14042 work now. Do you happen to remember where they failed? On Windows?

Checking the blame: https://github.com/apple/swift/pull/35384

These tests fail on Windows due to an invalid parameter during the reabstraction of the generic differentiable parameters.

Since Windows tests pass, removing #if REQUIRES_SR14042 seems good.

Checking the blame: #35384

These tests fail on Windows due to an invalid parameter during the reabstraction of the generic differentiable parameters.

Since Windows tests pass, removing #if REQUIRES_SR14042 seems good.

Right. I need to include the last disabled test then. And likely re-run everything on CI.
I was a bit surprised to see that value witness table was missed :)

@swift-ci Please test

@AnthonyLatsis I believe some tests still fail. But I reenabled ones that were fixed


redux/store/index.js is not found

Following your YouTube video, I found the video jumped without actually telling the process for redux/store/index.js, now i have empty file as redux/store/index.js. also no redux/store/index.js, is found in the git repo.

Hi !
Just remove your node-modules and reinstall it with this command: "yarn install" ;)
Blessings !!!


Refactoring Notification preferences

Follow up to #1653 and comments around refactoring _check_cascading_vars to lift watch.get('notification_muted') out into send_content_changed_notification instead.
I renamed the function and put some time into cleaning up the function itself to be more concise, if you don't mind. It's been awhile since I've written anything in Python!

@kenmaca nice rename there of the function, makes more sense (although see my OO related comment)
You got a test failure :-) in tests/test_add_replace_remove_filter.py::test_check_add_line_contains_trigger  not sure what the exception is, the logging is not amazing.. but the notification was never fired anyway

The other thing that would be amazing to add is a test case that covers atleast part of the notification preferences chain, at the moment the tests only cover doing it exactly with globals, or exactly per-watch etc, never a mixed case... if you wanted to add some test here I would be very grateful

Another reason why tests are amazing, they caught my mistake. When there aren't any settings resolved by any layer, next throws StopIterator. I assumed it returned None, so I added the default param to fix the failed tests.
It's been awhile since I've written pytests, so I'll find some time this week to relearn it and update the PR. Thanks!


LSP support on visual studio 2019

Hello,
I’m reporting a problem in Microsoft.VisualStudio.LanguageServer.Client.
i'm working on a Language Extension. I'd like to plug a Language Server.
I try to use the MS.VisualStudio.LanguageServer.Protocol but i have a problem because it does not respect the entire Protocol Specification 3.15 (https://microsoft.github.io/language-server-protocol/specifications/specification-current/).
The enum Microsoft.VisualStudio.LanguageServer.Protocol.CodeActionKind does not have the value "empty". This produce an exception when i initialize my server.
Could you fix this by adding the value Empty on the CodeActionKind enum?
regards, François

@fbredy You should take this up through Visual Studio's official support channels. This repository is for discussing the protocol's specification and not really for raising bugs with implementations of clients and servers.

@fbredy You should take this up through Visual Studio's official support channels. This repository is for discussing the protocol's specification and not really for raising bugs with implementations of clients and servers.

@rcjsuen is correct.
@tinaschrepfer FYI.

@rcjsuen is correct.
@tinaschrepfer FYI.

This produce an exception when i initialize my server.

Note that a client advertises exactly which code action kinds it supports, or even if it supports code actions in the first place. You should design your server implementation around these "client capabilities" so that your server will work for any client.

This produce an exception when i initialize my server.

Note that a client advertises exactly which code action kinds it supports, or even if it supports code actions in the first place. You should design your server implementation around these "client capabilities" so that your server will work for any client.


[FLINK-10260] Change log level to debug in ResourceManager in case of TaskExecutor reconnect

What is the purpose of the change
Change log level to debug for messages about TaskExecutor re-registration in ResourceManager and SlotManager in case of multiple attempts of the TaskExecutor to connect to the ResourceManager.
Brief change log
Change log level from info to debug for confusing messages.
Verifying this change
Trivial change
Does this pull request potentially affect one of the following parts:

Dependencies (does it add or upgrade a dependency): (no)
The public API, i.e., is any changed class annotated with @Public(Evolving): (no)
The serializers: (no)
The runtime per-record code paths (performance sensitive): (no)
Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (yes)
The S3 file system connector: (no)

Documentation

Does this pull request introduce a new feature? (no)
If yes, how is the feature documented? (not applicable)

cc @tillrohrmann


Dark mode implementation for your cool website

HEY @07sumit1002  it will be so cool to make your website in dark theme too with these cool switch

Sir, I would like to work on this feature and would appreciate it if you could assign it to me for Hacktoberfest and GGSOC '24. I believe this is a level 2 task / level 3 task, as it requires a complete overhaul of the page styles. Thank you!

Hey @STDYGIT ,
Quick question on implementation, would you be just changing the color of the theme toggle switch or would also be adding dark theme styles of different pages, components and fonts ?

For info I have completed this feature on the website and the owner had merged too and I had changed the whole website theme style and colors

For info I have completed this feature on the website and the owner had merged too and I had changed the whole website theme style and colors

For future references,
Tag the related issues with the PR, use keyword closes in the PR description so it automatically closes the open issue related to it so it doesn't give an impression that it is yet to be worked upon.
Example:
Closes #147

Read more here: https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue


FileLocksmith shell icon

Description of the new feature / enhancement
Please add an icon for FileLocksmith in the shell flyout.
Scenario when this would be used?
easier to see which shell entry does what.
Supporting information
No response

/duplicate #21799


Organize model readable from document passing it to the tasks for evaluation

organize model
readable from model
evaluatable via tasks

Done.