Compile warnings in a_star.cpp

Godot version
master 6588a4a29af1621086feac0117d5d4d37af957fd
System information
Linux - GCC g++ 9.4.0 - Ubuntu 20.04 LTS
Issue description
I turned dev_mode = True, and this forces Godot to build with -Werror=yes
This gives various warnings such as the following:
/home/matias/SlowProjects/godot/core/math/a_star.cpp:76: error: 'p' may be used uninitialized in this function [-Werror=maybe-uninitialized]
core/math/a_star.cpp:76:12: error: 'p' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   76 |  return p->pos;
      |            ^~~
core/math/a_star.cpp: In member function 'void AStar3D::set_point_position(int64_t, const Vector3&)':
core/math/a_star.cpp:84:9: error: 'p' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   84 |  p->pos = p_pos;
      |  ~~~~~~~^~~~~~~
core/math/a_star.cpp: In member function 'real_t AStar3D::get_point_weight_scale(int64_t) const':
core/math/a_star.cpp:92:12: error: 'p' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   92 |  return p->weight_scale;
      |            ^~~~~~~~~~~~
core/math/a_star.cpp: In member function 'void AStar3D::set_point_disabled(int64_t, bool)':
core/math/a_star.cpp:520:13: error: 'p' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  520 |  p->enabled = !p_disabled;
      |  ~~~~~~~~~~~^~~~~~~~~~~~~
core/math/a_star.cpp: In member function 'bool AStar3D::is_point_disabled(int64_t) const':
core/math/a_star.cpp:528:13: error: 'p' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  528 |  return !p->enabled;
      |          ~~~^~~~~~~
core/math/a_star.cpp: In member function 'void AStar3D::remove_point(int64_t)':
core/math/a_star.cpp:109:111: error: 'p' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  109 |  for (OAHashMap<int64_t, Point *>::Iterator it = p->neighbors.iter(); it.valid; it = p->neighbors.next_iter(it)) {
      |                                                                                ^
core/math/a_star.cpp: In member function 'void AStar3D::set_point_weight_scale(int64_t, real_t)':
core/math/a_star.cpp:101:18: error: 'p' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  101 |  p->weight_scale = p_weight_scale;
      |  ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
core/math/a_star.cpp: In member function 'void AStar3D::connect_points(int64_t, int64_t, bool)':
core/math/a_star.cpp:160:37: error: 'a' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  160 |    b->unlinked_neighbours.remove(a->id);
      |                                  ~~~^~
core/math/a_star.cpp: In member function 'void AStar3D::disconnect_points(int64_t, int64_t, bool)':
core/math/a_star.cpp:191:38: error: 'a' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  191 |     b->unlinked_neighbours.remove(a->id);
      |                                   ~~~^~
core/math/a_star.cpp: In member function 'Vector<Vector3> AStar3D::get_point_path(int64_t, int64_t)':
core/math/a_star.cpp:435:27: error: 'b' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  435 |  bool found_route = _solve(begin_point, end_point);
      |                     ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~

The warning looks semi legit:

It is clear that the ERR_FAIL_COND_V_MSG expects points.lookup() not to fail.
However in practice if the lookup fails, p contains an uninitialized variable and behavior becomes undefined.

Possible solutions:

Silence the warning. Assume lookup() never fails.
Set p to nullptr. The app should always crash if the lookup() fails.
ERR_FAIL_COND_V_MSG() is promoted to always on.

Note that these solutions do not contradict each other.
Some users of Godot may need a robust "hardened" mode (i.e. system critical SW) where either solution 2 or 3 is pursued; while other users (e.g. most games) may want option 1 which is the most efficient.
Steps to reproduce
Compile with p=x11 optimize=debug debug_symbols=True dev_mode=True dev_build=True
Minimal reproduction project
None. This is a code issue.

You need to update your compiler, the ERR_FAIL_COND_V_MSG macro expands to a conditional return, so that the code in question is unreachable, if the variable is uninitialized, but the static analysis of GCC 9 cannot reliably check this and thus issues this warning.

Ahh I didn't see that ERR_FAIL_COND_V_MSG is always compiled. I misread the code as if the macro is only defined in certain cases.


[for 4.6.0] Fix concurrent problem in ProducerManager.getAvaliableCha…

Fix two problem:

If client channel is in writing and there is no more channel, the tx check message drops.
ProducerManager.getAvaliableChannel/findChannel is not thread safe.

Coverage increased (+0.2%) to 50.698% when pulling d12746455b08c84ba51956371515c58007277e65 on areyouok:pr_fix_ProducerManager into 44569e4df6620fff61e43d782815f93a97e748ea on apache:develop.


CLOUDP-97416: Returns all serverless instances in the specified project

Proposed changes

Jira ticket: CLOUDP-97416

Checklist

[ ] I have signed the MongoDB CLA
[x] I have added tests that prove my fix is effective or that my feature works
[ ] I have added any necessary documentation (if appropriate)
[ ] I have updated e2e/E2E-TESTS.md (if a new command or e2e test has been added)
[x] I have run make fmt and formatted my code

Further comments

./bin/mongocli atlas serverlessClusters list

@andreaangiolillo @threebee this should be ready for another look


Infinite loop on cloudflare check

Browser name and version: Firefox Developer Edition 118.0b5 (latest at the moment of writing the issue)
Device (mobile or desktop): desktop
Page where the issue happens: steamdb search

Describe the bug
How to reproduce:

Open a new temporary container (or clean private browsing)
Open steamdb.info website
never login (!)
search

I'm able to pass after cloudflare check on https://steamdb.info/login/ then I'm able to search... just once.
I'm able to pass after cloudflare check if I search anything. It seems, that steamdb script in some cases gets itself into an infinite loop and never finishes cloudflare check even if it succeeds. This loop is shown by increasing number of the same parameters in query string of the address. Below in spoilers is an example of such urls.
Important notes:

Ray ID 8025ab030ec834d3 if it's relevant for an issue
based on many forums (example) I'm not the only who encounter the issue.
I have no issues to get into all other websites I visit where cloudflare is used like GitLab

search url at the beginning of the loop
https://steamdb.info/search/?a=app&q=scarf&__cf_chl_f_tk=uvkay.BDbO0m5xuOAQf0bThyMIVNd59of2cWgXsPgs8-1693992265-0-gaNycGzNCvs

search url at some point
https://steamdb.info/search/?a=app&amp;amp;amp;amp;amp;amp;amp;q=scarf&amp;amp;amp;amp;amp;amp;amp;__cf_chl_f_tk=uvkay.BDbO0m5xuOAQf0bThyMIVNd59of2cWgXsPgs8-1693992265-0-gaNycGzNCvs&amp;amp;amp;amp;amp;amp;__cf_chl_f_tk=DsLVGFljIxZyJSd7_gRbZbIhAjv5I1Oh6SwzvH7AED8-1693992267-0-gaNycGzNGBA&amp;amp;amp;amp;amp;__cf_chl_f_tk=E1VPOMIkmBSvGTXBnPLsCri1iKzNMhBa8Nh9n3AxXZg-1693992268-0-gaNycGzNJhA&amp;amp;amp;amp;__cf_chl_f_tk=hKDDcpkafjbbgt6LF5bL7NkxisnbJ3tf1gAxw_Qw2Vw-1693992270-0-gaNycGzNNTs&amp;amp;amp;__cf_chl_f_tk=k0kQ4sdRGkJtl673ngGqcgAbRt5wQJr9fYLpLfunPtw-1693992276-0-gaNycGzNRXs&amp;amp;__cf_chl_f_tk=jm1_tG0vlzUYJDmi50OM1yWr6uhcF4wv6Vme4xOke7M-1693992284-0-gaNycGzNVxA&amp;__cf_chl_f_tk=v9_KuD9ZToghsUMFjUdVuwYI9hh.wgGnsRI83b0R3jA-1693992291-0-gaNycGzNadA&__cf_chl_f_tk=lJ3r9OfajMMcAp1xlYVz3zOMMnjWGq9hEm6lGjrZdIA-1693992292-0-gaNycGzNfdA

search url a little while later
https://steamdb.info/search/?a=app&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;q=scarf&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;__cf_chl_f_tk=uvkay.BDbO0m5xuOAQf0bThyMIVNd59of2cWgXsPgs8-1693992265-0-gaNycGzNCvs&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;__cf_chl_f_tk=DsLVGFljIxZyJSd7_gRbZbIhAjv5I1Oh6SwzvH7AED8-1693992267-0-gaNycGzNGBA&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;__cf_chl_f_tk=E1VPOMIkmBSvGTXBnPLsCri1iKzNMhBa8Nh9n3AxXZg-1693992268-0-gaNycGzNJhA&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;__cf_chl_f_tk=hKDDcpkafjbbgt6LF5bL7NkxisnbJ3tf1gAxw_Qw2Vw-1693992270-0-gaNycGzNNTs&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;__cf_chl_f_tk=k0kQ4sdRGkJtl673ngGqcgAbRt5wQJr9fYLpLfunPtw-1693992276-0-gaNycGzNRXs&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;__cf_chl_f_tk=jm1_tG0vlzUYJDmi50OM1yWr6uhcF4wv6Vme4xOke7M-1693992284-0-gaNycGzNVxA&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;__cf_chl_f_tk=v9_KuD9ZToghsUMFjUdVuwYI9hh.wgGnsRI83b0R3jA-1693992291-0-gaNycGzNadA&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;__cf_chl_f_tk=lJ3r9OfajMMcAp1xlYVz3zOMMnjWGq9hEm6lGjrZdIA-1693992292-0-gaNycGzNfdA&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;__cf_chl_f_tk=lLBLY14o06qEESgCmCqhRY31foOgka4Mf2CI1.PMGN4-1693992293-0-gaNycGzNkxA&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;__cf_chl_f_tk=CxRjiieqprmaDATznYMFcey4IeQ4qLjznlmSB.4HCoE-1693992295-0-gaNycGzNqdA&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;__cf_chl_f_tk=bHMiHeE3xPIHpd49G2UeridqLvljjOB.a.NbJDfClhk-1693992296-0-gaNycGzNweU&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;__cf_chl_f_tk=KDxjb4cn6ZStzrLXsynMmO3rvWPpIf2kW1qJZCvSF7k-1693992306-0-gaNycGzN25A&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;__cf_chl_f_tk=0aCfX5S36iHJUSv23VOBAQa14dUujkDJvUckv_rPwbk-1693992316-0-gaNycGzN9rs&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;__cf_chl_f_tk=gnOk_713wpicW0M0.kjQyO7ST3DBN8dK6Ouhwl5T7WA-1693992326-0-gaNycGzOAAETZQ&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;__cf_chl_f_tk=i4tYRvhvrN4PXqdDcvNryaRRYpiLDAg3Tx4zNxG2vDM-1693992331-0-gaNycGzOAAEx0A&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;__cf_chl_f_tk=TkC2xEwJRulYImG8xUC2M_3IpNr2nHNDtvsvQXnHmFM-1693992333-0-gaNycGzOAAFR0A&amp;amp;amp;amp;amp;amp;amp;amp;amp;__cf_chl_f_tk=1jgBDSV8o9nZySf9J2LFgUJvJJr6enO3PyD.F9rtew8-1693992341-0-gaNycGzOAAFzpQ&amp;amp;amp;amp;amp;amp;amp;amp;__cf_chl_f_tk=KXDPdA6rBqL42gh413v4jFYw1idw90Lc5N.Ia6i6AtI-1693992351-0-gaNycGzOAAGXJQ&amp;amp;amp;amp;amp;amp;amp;__cf_chl_f_tk=jp0YT_WAyfSjVZmeHfe05iXSkrH6j2Khd0.lJebAsa8-1693992359-0-gaNycGzOAAG8kA&amp;amp;amp;amp;amp;amp;__cf_chl_f_tk=heMaSmoBo9M.UTjFDrZWCafBKHo_GrkCmVI1_PCqflA-1693992361-0-gaNycGzOAAHj0A&amp;amp;amp;amp;amp;__cf_chl_f_tk=qtqC_hgAj4TreNrrEYnyzVfBykhcDQPNyDGi0Q79Wy4-1693992364-0-gaNycGzOAAINJQ&amp;amp;amp;amp;__cf_chl_f_tk=wNHcSFE5nBYHOG0BKFSk5AdVpChm58j3sPwtg6LK_1A-1693992370-0-gaNycGzOAAI4ZQ&amp;amp;amp;__cf_chl_f_tk=w7T5_L4AXxCZqnd621NxuSJRbKoxjxk7uNg8.OJM_OY-1693992378-0-gaNycGzOAAJlkA&amp;amp;__cf_chl_f_tk=S8js7_LbuEpfSqbTQAIhNBj8O6qK.bI4n1F4mkXnm6c-1693992388-0-gaNycGzOAAKU5Q&amp;__cf_chl_f_tk=JynAIei9Q_YdUUKacx.iJF4kwYwSBE0H6MBluPM_NJw-1693992400-0-gaNycGzOAALGZQ&__cf_chl_f_tk=bCVSCylj7gpTvwPkPhGVKstIP0yfJSmjIuLAIKJ37Pk-1693992409-0-gaNycGzOAAL6JQ

I cant reproduce this. Make sure to try without extensions and/or with a new fresh profile.

As I wrote above, I able to pass the check on login page, then search once (and only once for me). Additionally, I have no issues with the same plugin set and same browser profile on any other web sites (and many of them are using cloudflare).
Thus, I believe problem is not in cloudflare code, but in code of steamdb code.
Too many users has been reported on this, as you see some of ray ids on ycombinator thread. Most of them are unable to open even login page. There reported only a small portion of actual users.
I reported the issue for you to verify the code if there's no small logic issues which could lead to such loop. I know, that code audit is a tedious task.

But can you try it though? SteamDB doesn't have code that would cause extra encoding of urls (for & to appear), especially where it only affects you but not others.

So you believe, that If I transfer all my settings to a new profile, I'll have a new result?

I'm telling you to try a fresh profile without transferring any of the settings.

You can't reproduce, because you haven't enabled anti-fingerprinting settings in the browser. As other pages which require cloudflare like login page on steamdb can pass the cloudflare fingerprinting, I consider that search page should also pass similar check

You can try sending them an email like they suggest in the HN thread. Not saying you have restrict fingerprint enabled is an important omission that breaks a lot of non obvious things.

If any of addons would break it, 1) we won't see any YCombinator posts about specifically cloudflare and firefox 2) other websites and pages (like login page on steamdb website) would break as well.
BTW, I haven't found any support page for regular users, not for a website holders. Website holders has a report system for their website and specific pages they could refer to. Their RAY ID has been included for them to track the problem
PS: resistFingerprinting is not the only anti-fingerprinting and privacy measures Firefox has.


ChessChallenge.Chess.RepetitionTable crashes when game takes more then 256 plies

If the game takes longer than 256 plies, it crashes.
System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at ChessChallenge.Chess.RepetitionTable.Contains(UInt64 h)

int[] startindices und int[] hashes are only of size 256.
proposal for a fix:
hashes = new ulong[1024]; in ChessChallenge.Chess.RepetitionTable

We saw there is a bounds check in the Push method. count++; is not included inside the bounds check. if it where, it would not detect any repetitions after ply 256 has been reached.

I've increased the size as proposed, thanks!


Use site manager for site option list

User story: The site options in the edit dialog should be based on the site manager not only on the configured JCR nodes in the configuration workspace.
Acceptance criteria: List all configured sites in alphabetically order, except the fallback site should be always the first and the default one.

Is resolved with version 1.6.2.


Different ref_type support

Feature Request
Description of Problem:
ref_type is hardcoded as branch (https://github.com/saidsef/terraform-aws-gitlab-oidc/blob/main/current.tf#L21). It would be great if we can change ref_type based on some variable, or something like that. For example ref_type:tag
Potential Solutions:
Add variable ref_type.

Possible solution here: https://github.com/saidsef/terraform-aws-gitlab-oidc/pull/41

This is resolved in tag v2.2.0


prepare 2.26.0

Signed-off-by: Issif<EMAIL_ADDRESS>
What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind design

/kind documentation

/kind failing-test

/kind feature

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area build

/area config

/area outputs

/area tests

What this PR does / why we need it:
Prepare v2.26.0
Which issue(s) this PR fixes:

Fixes #
Special notes for your reviewer:

LGTM label has been added.  Git tree hash: b02efa3bd3ccdfe929b5b9aafdca106511400a19

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: fjogeleit, Issif
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS [Issif,fjogeleit]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment


Open editors DND is strange when sorting by name

If you configure explorer.openEditors.sortOrder, DND in open editors feels a bit strange, should we disable it then?

Yes, reordering does not make sense in this case, will disable it then


⚠ Bofrost.lu has degraded performance

In 1574a9f, Bofrost.lu (https://www.bofrost.lu) experienced degraded performance:

HTTP code: 200
Response time: 2523 ms

Resolved: Bofrost.lu performance has improved in ac63238.


Emission textures arent encrypted

I can see the emmissions clearly through the encrypted textures, revealing true shapes of texture.

If you can include emission maps to be encrypted too, it would be appreciated.

I'll support it, but I'm not sure when.
In the meantime, if only part of it glows, cut out just that part and use it as a texture.

What? Its an emmission map. It wont work as emmission if i use it as texture.
But looking forward to you supporting it.

Oh yea, that would be great—not only having the main texture encrypted. Emission is a great start for more!

Please make it so emissions are encrypted! The textures I'm specifically trying to protect use emissions for their patterns and allows them to be seen through the encryption and makes shellprotector almost useless for protecting my textures


This change fixes currently broken ReactContext listeners mechanism.

This mechanism is heavily abused inside of the react-native and inside of the various native modules.
The main problem is that people don't remove their listeners and as result, we have memory leaks.
Some modules like UIManager, NativeAnimatedModule have resources holding Activity context. Those modules are held through a pretty long chain of dependencies.
In order to allow GC to collect those listeners, I replaced the CopyOnWriteSet by WeakHashMap and synchronized access. It is not such a big deal in terms of performance as those listeners are not called/modified too frequently but this prevents hard to debug memory leaks.
Test Plan:
Make a module which reset the JS engine. Use this module to validate the count of activities you have on reset.
You could use LeakCannery to verify there is no memory leaks.
As an addition, you could you a small memory monitor:
watch adb shell dumpsys meminfo YOUR_PACKAGE_NAME
Changelog:
Help reviewers and the release process by writing your own changelog entry. When the change doesn't impact React Native developers, it may be ommitted from the changelog for brevity. See below for an example.
[Android] [Fixed] - ReactContext - lifecycle listeners don't cause the leaks even if not removed.

@hramos, there is a side effect of this change that I missed.
If anyone will modify the collection of listeners from the listener itself it will cause the crash with ConcurrentModificationException.
Some modules remove the listeners in the onHostDestroy method.
There is a workaround for that to change the onHostDestroy to return boolean and use the iterator.remove() inside but this is going to be a breaking change and not completely obvious.
Another way of fixing it is to make a modification detection and delay the operations on collection until the iteration is done.

The latest commit addresses removeListener scenario from the listener itself.
CopyOnWriteArraySet supports concurrent modification during iteration while WeakHashMap doesn't.
In order to fix the problem, I'm postponing the modifications till the iteration is complete.
There are some third party views removing the listener in the onHostDestroy callback.
An example is Airbnb Maps view.
Without this tweak, the change is breaking.
it is possible to work it around with ViewManager createViewInstance/onDropViewInstance but I think it is better to have a non-breaking change instead.

@hramos looks like the import failed? any feedback for the contributor?

The import went fine and it's already approved. I never heard back re: performance tests, I'll ping again.

@dryganets It seems this PR causes a crash in production for us at FB. Concretely we are getting
android_crash:java.util.ConcurrentModificationException:com.facebook.react.bridge.SynchronizedWeakHashSet.iterate when resuming an activity which blames back to this PR.
Is there any chance you could send a PR with a fix for this within the next few days? Otherwise unfortunately we'll have to revert this PR and wait for a proper fix later.

Could you share a stack trace?

This is roughly the top of the frames:
android.app.ActivityThread.performResumeActivity(ActivityThread.java:3139)
android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3170)
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1420)
android.os.Handler.dispatchMessage(Handler.java:102)
android.os.Looper.loop(Looper.java:150)
android.app.ActivityThread.main(ActivityThread.java:5621)
at java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:684)
Caused by: java.util.ConcurrentModificationException
java.util.WeakHashMap$HashIterator.next(WeakHashMap.java:165)
com.facebook.react.bridge.SynchronizedWeakHashSet.iterate(SynchronizedWeakHashSet.java:57)
com.facebook.react.bridge.ReactContext.onHostResume(ReactContext.java:215)
com.facebook.react.ReactInstanceManager.moveToResumedLifecycleState(ReactInstanceManager.java:660)
com.facebook.react.ReactInstanceManager.onHostResume(ReactInstanceManager.java:579)
com.facebook.react.ReactInstanceManager.onHostResume(ReactInstanceManager.java:535)

The offending code in SynchronizedWeakHashSet.java:57 was:
    synchronized (mMap) {
      // Protection from modification during iteration on the same thread
      mIterating = true;
      for (T listener: mMap.keySet()) { // <<<<<<<< here
        iterated.iterate(listener);
      }
      mIterating = false;

there is a side effect of this change that I missed.
If anyone will modify the collection of listeners from the listener itself it will cause the crash with ConcurrentModificationException.

@dryganets - perhaps the stack trace above was hitting this condition?

@fkgozali, the code you mentioned protects from the ConcurrentModificationException.
The add and remove methods are queued in case of iteration.
I missed that part for Skype and had ConcurrentModificationExceptions in production because of that (For us it was a minor crash with less than 0.01% impact)
The case was - removal of the listener from the listener itself. Despite everything is synchronized - there was a ConcurrentModificationException as the listener was removed on the same thread.
I'm reviewing the code now to find the root cause.
Just double checked that you have the latest version of the code with the problem we had fixed.

@fkgozali a possible offender is containsKey method.
While I don't see it touching the modCount, it is still modifying method.
ie it calls the getTable() which purges the stale weak references.
And depending on implementation it might cause the ConcurrentModificationException.
Also, the version of react-native we are using in production doesn't have that contains check so it explains why we never hit a similar problem after my fix.
I'll send a PR with a fix for this gap.

Sounds good, if we can have that fix by EOD today, we can try it out in our apps and hope for the best. Otherwise, I'd have to revert the original commit just for the de-risking purpose (given the volume of the crash is increasing, but not critically high yet). If that happens, we'll work with you to get it re-landed with the fix.

https://github.com/facebook/react-native/pull/24015


Translate Chinese version Chapter 11

Description

Related Issue: #166
Pre-commit steps

[ ] Tested on QEMU and real HW Rasperry Pi.

Not needed if it is just a README change or similar.

[x] Ran ./contributor_setup.sh followed by ./devtool ready_for_publish

You'll need Ruby with Bundler and NPM installed locally.
If no Rust-related files were changed, ./devtool ready_for_publish_no_rust can be used instead (faster).
This step is optional, but much appreciated if done.

Hi @eldruin Sorry to bother you, the current PR will be put on hold for now. I will submit all the task lists for #166 and then review them one by one. At that time, I will contact you again, which will take you a little time. Thank you again.


Bug? Colors change in ranger etc, but not urxvt

Hey, after having a wonderful time figuring out I am incompetent, I am now stuck. You see, the text color in ranger, rofi, and all my other nice things changes after runnign wal, but my foreground color in urxvt either won't budge, or at least is not the same color as the ps1 in ranger (also in urxvt). It may just be my colorblindness, but if it's not, do you have any ideas?
If you need any files/commands I'm running to make this work, just let me know and I'll include them ASAP. I absolutely love this tool and love experimenting with it, thank you for making it, and for your help!

Can I see a screenshot? I can't seem to reproduce this at all.

Actually, I'm just colorblind. I finally saw it changing when I picked a blue background. Sorry for the inconvenience!


[Question] 标签一定要str类型吗，可以拿来做情感分析吗

比如AI Challenger2018情感分析的多标签怎么处理喂进去

多标签分类的模型还没有增加，可以提供详细的数据集链接，我会看情况增加相关任务。

@BrikerMan 这是数据集链接 链接：https://pan.baidu.com/s/1spbM8QuyjRmgCSa9i-P7Mw
提取码：679y
只有7天有效哦

这个问题并不是单个维度的多标签，感觉需要专门建模处理才可以，我这里能支持的是 [(1, 2), (3,4),(5,)] 这种简单的多标签多分类。

这样的多分类能满足需求嘛，y 是由多个标签组成的~

A multi label classification problem could be solved by training a model with sigmoid as activation function and binary-crossentropy as loss function.  The output is an n-dim one-hot vector to predict n possible labels.
That's it.

@alexwwang check this #29 out, is this looks good to you? I am planning to add multi_label classification, but it seems we had to change all the classification models to support this feature.

Is it possible to wrap up a nn models in a multi-label task model? I mean just replace the last output layer to fit with different kind of classification tasks and allow users to determine which to choose.
Meanwhile I am considering allowing users setting hyper_parameters while initializing a model class in the model zoo.
I think these two aspects could be put together, so the flexibility and concision could both be kept.

I think your solution is better than mine, please make the changes and submit a pull request~ @alexwwang

Ok but I'm afraid it would take some time. Fighting the shape bug yet.

 By passing sigmoid and binary_crossentropy hyper_parameters to init function of a classification model, you could get one model support multi-label vector output.

@alexwwang I think multi-label is not finished yet, still need to change here https://github.com/BrikerMan/Kashgari/blob/692e2c23f8400a73bb851ac888606942bc94b070/kashgari/tasks/classification/base_model.py#L110 to process multi_label.

@BrikerMan Yeah, the data padding work. The nearest approach, I think, maybe with the help of sklearn.preprocessing.MultiLabelBinarizer. And this tool could also deal with multi-class classification as a specific type of multi-label classification. Or just add up another switch to approach multi-label y-vector, leaving current part unchanged.
Whatever, seems there's no shortcut here in data preprocessing and prediction processing, if we want to keep the predict confidence/probability of each label/class.
How do you think?

Please check out the #29, I have used sklearn.preprocessing.MultiLabelBinarizer and rewrite the data-process and predict function.

Kashgari supported multi-label classification now, change y from string to a string list, then set multi_label=True While init model class.


Hybrid OpentelemetryMetricsProtobufReader in Opencensus-extensions

Description

Based on the discussion with @xvrl , instead of using genetic ways of hybridding different formats based on different rules with headers regex matching, we decided to implement an easy and straight forward approach to hybrid the OpentelemetryMetricsProtobuf logic here. This PR created OpentelemetryMetricsProtobufReader within  OpenCensusProtobufInputFormat#createReader when header is v1.

This PR has:

[ ] been self-reviewed.

[ ] using the concurrency checklist (Remove this item if the PR doesn't have any relation to concurrency.)

[ ] added documentation for new or modified features or behaviors.
[ ] added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
[ ] added or updated version, license, or notice information in licenses.yaml
[ ] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
[ ] added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
[ ] added integration tests.
[ ] been tested in a test Druid cluster.

Key changed/added classes in this PR

OpenCensusProtobufInputFormat
OpenTelemetryMetricsProtobufReaderTest

Have tested this PR locally by ingesting telemetry.metrics.otel topic which has opentelemetry metrics data from sandbox. And ingestion, queries were all working well.

After getting rebased with this change to make attributes, and data type value more flexible, this has been te
![Screen Shot 2022-02-24 at 7 10 07 PM](https://user-images.githubuserconte

nt.com/1749814/155647086-3a58028d-0cdf-4ab0-97df-14ea38682c91.png)
sted locally and it shows that ingestion and queries are working well with opentelemtry input.

Also works well for opencensus input message local testing:


django-recaptcha in wizard forms

At the moment when used in form wizards, captcha becomes invalid on the last step. Any solution to this?

Can you expand a bit more - is the captcha in the last step, or is it in an earlier step and then counts as invalid later? I can see the problem in the latter case, as presumably validation runs again when the whole form wizard is done and the captcha value can only be validated once.

Isn't there something the field could do to work with wizards by caching the 'passed' state of the captcha after the first validation run?

Good suggestion. So it just locks to a validated state? Will look into it :)

I'm using django-formtools for a wizard and struggled with the same issue. I found the sys._getframe() hack in ReCaptchaField.get_remote_ip() method and could use it to let the ReCaptchaField know when it's a relvalidation.
First create a ReCaptchaField subclass:
import sys
from captcha.fields import ReCaptchaField

class ValidateOnceReCaptchaField(ReCaptchaField):

    def clean(self, values):
        # find the 'revalidating' value in stack
        frame = sys._getframe()
        max_depth = 25
        while frame and max_depth != 0:
            if 'revalid' in frame.f_locals:
                return values[0]
            max_depth -= 1
            frame = frame.f_back
        return super(ValidateOnceReCaptchaField, self).clean(values)

And in your WizardView subclass, override render_done:
class MyView(WizardView):

    def render_done(self, form, **kwargs):
        revalid = True
        return super(VenuesSignupView, self).render_done(form, **kwargs)

This way only the ReCaptcha revalidation is skipped. If someone knows a better way to pass values from a view to a form field please post it here.

we solved the problem in a different way that does not use sys._getframe()
https://github.com/uktrade/directory-ui-supplier/pull/337/files


Memory engine is not working?

I am experimenting with chDB and Memory engine - Memory Table Engine.
It looks like it's not working at all.
All experiments are made in Docker container.
# go version
go version go1.22.2 linux/amd64
# /root/go/bin/chdb-go 'SELECT version()'
"<IP_ADDRESS>"
# /root/go/bin/chdb-go
Enter your SQL commands; type 'exit' to quit.
:) CREATE DATABASE testdb;

:) USE testdb;

:) CREATE TABLE memory (i UInt32) ENGINE = Memory SETTINGS min_rows_to_keep = 100, max_rows_to_keep = 1000;

:) INSERT INTO memory SELECT * FROM numbers(0, 1600);

:) SELECT total_bytes, total_rows FROM system.tables WHERE name = 'memory' and database = currentDatabase();
0,0

Current chdb session implementation does not support Memory Engine. We are implementing the new one. See https://github.com/chdb-io/chdb/issues/197


Performs ignerr->gzerr

This PR just is a refactor on the long road down the ign->gz transition. In particular it handles all the cases of logging.
Signed-off-by: Arjo Chakravarty<EMAIL_ADDRESS>

Oh lmao #237 already exists. Closing.


Design Treesearch tree banner

[ ] Buttons/widgets for tree

[ ] Add buttons for ‘About Belief Map,’ ‘Donate’
[ ] Add sexy search bar

[x] Change logo to Belief-Map
[ ] Fix image size on Safari?

sorry buddy, won't be able to help you with this stuff for a while. closing all for now.


Use fallback for empty PHP_BINARY constant in cli-adapter

As already mentioned in PR 101  the PHP_BINARY is always defined, but sometimes(*) it is just an empty string. Therefore I propose to not just rely on its value, but use the hardcoded string “php” if the PHP_BINARY is empty. This PR adds the proposed behaviour, plus a corresponding unit-test method.
*) Only the CLI-SAPI can give a reasonable value, all other SAPIs (FPM, mod_php, …) are not able to define the path to the binary, as it is out of their scope.

Thank you!


build: add nix shell

Adds a nix shell definition with everything required to build substrate. I'm OK with this not getting merged but I think it's a nice-to-have for any potential nix users that might clone our repo.

I think it's ok to merge. First, I assume it's better to have this file than not and it's certainly not harmful. Second, since there are more than 1 nix user I am not worried that it gets out of touch. And, thirdly, if it ever gets unmaintained we can remove it easily.

bot merge

What is the consensus on flakes? Would anybody object turning this into a flake in the long term?

@FlorianFranzen I haven't looked into flakes yet so I barely know how they work. I didn't know they could be used for shell definitions.


CAMEL-19295: Experiment with sync LRUCache and test case that otherwi…

…se will OOME
Description

Target

[ ] I checked that the commit is targeting the correct branch (note that Camel 3 uses camel-3.x, whereas Camel 4 uses the main branch)

Tracking

[ ] If this is a large change, bug fix, or code improvement, I checked there is a JIRA issue filed for the change (usually before you start working on it).

Apache Camel coding standards and style

[ ] I checked that each commit in the pull request has a meaningful subject line and body.

[ ] I formatted the code using mvn -Pformat,fastinstall install && mvn -Psourcecheck

@davsclaus I've just got the results of testing this code.  I run some tests comparing with Camel 4.0.0-M3 (baseline) with this patch.
For resolving the endpoints:
Baseline:
Benchmark                                Mode  Cnt  Score   Error  Units
EndpointResolveTest.testActionStatus_1   avgt   10  3.273 ± 0.003  us/op
EndpointResolveTest.testActionStatus_16  avgt   10  3.674 ± 0.007  us/op
EndpointResolveTest.testActionStatus_2   avgt   10  3.314 ± 0.002  us/op
EndpointResolveTest.testActionStatus_32  avgt   10  4.738 ± 0.020  us/op
EndpointResolveTest.testActionStatus_4   avgt   10  3.730 ± 0.001  us/op
EndpointResolveTest.testActionStatus_8   avgt   10  3.400 ± 0.002  us/op

This patch:
Benchmark                                Mode  Cnt   Score   Error  Units
EndpointResolveTest.testActionStatus_1   avgt   10   3.727 ± 0.002  us/op
EndpointResolveTest.testActionStatus_16  avgt   10  12.688 ± 1.002  us/op
EndpointResolveTest.testActionStatus_2   avgt   10   3.405 ± 0.003  us/op
EndpointResolveTest.testActionStatus_32  avgt   10  25.113 ± 0.785  us/op
EndpointResolveTest.testActionStatus_4   avgt   10   3.792 ± 0.001  us/op
EndpointResolveTest.testActionStatus_8   avgt   10   3.741 ± 0.014  us/op

Note: the _X is the number of threads (i.e.; EndpointResolveTest.testActionStatus_4  is the test with 4 threads).
For the endpoint registry operations:
Baseline:
Benchmark                                          Mode  Cnt     Score    Error  Units
EndpointRegistryTest.testContainsExistentKey       avgt   10    17.696 ±  0.007  us/op
EndpointRegistryTest.testContainsNonExistentKey    avgt   10     5.190 ±  0.001  us/op
EndpointRegistryTest.testContainsNonExistentValue  avgt   10  1866.783 ±  0.401  us/op
EndpointRegistryTest.testDynamicSize               avgt   10     0.002 ±  0.001  us/op
EndpointRegistryTest.testIsDynamic                 avgt   10  1045.090 ±  1.387  us/op
EndpointRegistryTest.testReadOnlyMap               avgt   10    18.633 ±  0.017  us/op
EndpointRegistryTest.testReadOnlyValues            avgt   10     5.812 ±  0.025  us/op

This patch:
Benchmark                                          Mode  Cnt     Score    Error  Units
EndpointRegistryTest.testContainsExistentKey       avgt   10    23.900 ±  0.006  us/op
EndpointRegistryTest.testContainsNonExistentKey    avgt   10    21.621 ±  0.032  us/op
EndpointRegistryTest.testContainsNonExistentValue  avgt   10  1866.985 ±  0.566  us/op
EndpointRegistryTest.testDynamicSize               avgt   10     0.027 ±  0.001  us/op
EndpointRegistryTest.testIsDynamic                 avgt   10  1003.702 ± 61.613  us/op
EndpointRegistryTest.testReadOnlyMap               avgt   10    19.331 ±  0.009  us/op
EndpointRegistryTest.testReadOnlyValues            avgt   10     5.895 ±  0.024  us/op

And the impact is quite extreme for the registry under concurrent access:
Baseline:
Benchmark                                                       Mode  Cnt     Score    Error  Units
EndpointRegistryScalabilityTest.testContainsNonExistentKey_2    avgt   10    17.520 ±  0.010  us/op
EndpointRegistryScalabilityTest.testContainsNonExistentKey_4    avgt   10    16.919 ±  0.002  us/op
EndpointRegistryScalabilityTest.testContainsNonExistentKey_8    avgt   10    16.848 ±  0.009  us/op
EndpointRegistryScalabilityTest.testContainsNonExistentValue_2  avgt   10  1881.827 ±  0.240  us/op
EndpointRegistryScalabilityTest.testContainsNonExistentValue_4  avgt   10  1873.975 ±  0.102  us/op
EndpointRegistryScalabilityTest.testContainsNonExistentValue_8  avgt   10  1904.569 ±  0.129  us/op
EndpointRegistryScalabilityTest.testDynamicSize_2               avgt   10     0.002 ±  0.001  us/op
EndpointRegistryScalabilityTest.testDynamicSize_4               avgt   10     0.002 ±  0.001  us/op
EndpointRegistryScalabilityTest.testDynamicSize_8               avgt   10     0.002 ±  0.001  us/op
EndpointRegistryScalabilityTest.testIsDynamic_2                 avgt   10  1005.876 ±  0.376  us/op
EndpointRegistryScalabilityTest.testIsDynamic_4                 avgt   10   984.097 ±  0.402  us/op
EndpointRegistryScalabilityTest.testIsDynamic_8                 avgt   10  1000.953 ±  0.392  us/op
EndpointRegistryScalabilityTest.testReadOnlyMap_2               avgt   10    20.184 ±  0.020  us/op
EndpointRegistryScalabilityTest.testReadOnlyMap_4               avgt   10    19.486 ±  0.010  us/op
EndpointRegistryScalabilityTest.testReadOnlyMap_8               avgt   10    19.062 ±  0.028  us/op
EndpointRegistryScalabilityTest.testReadOnlyValues_2            avgt   10     6.539 ±  0.012  us/op
EndpointRegistryScalabilityTest.testReadOnlyValues_4            avgt   10     6.498 ±  0.004  us/op
EndpointRegistryScalabilityTest.testReadOnlyValues_8            avgt   10     6.782 ±  0.018  us/op

This patch:
Benchmark                                                       Mode  Cnt      Score     Error  Units
EndpointRegistryScalabilityTest.testContainsNonExistentKey_2    avgt   10    138.018 ±   5.506  us/op
EndpointRegistryScalabilityTest.testContainsNonExistentKey_4    avgt   10    347.650 ±   4.114  us/op
EndpointRegistryScalabilityTest.testContainsNonExistentKey_8    avgt   10   2727.941 ±  27.952  us/op
EndpointRegistryScalabilityTest.testContainsNonExistentValue_2  avgt   10   4908.715 ± 434.815  us/op
EndpointRegistryScalabilityTest.testContainsNonExistentValue_4  avgt   10   9054.876 ±  61.169  us/op
EndpointRegistryScalabilityTest.testContainsNonExistentValue_8  avgt   10  18575.008 ± 321.350  us/op
EndpointRegistryScalabilityTest.testDynamicSize_2               avgt   10      0.121 ±   0.001  us/op
EndpointRegistryScalabilityTest.testDynamicSize_4               avgt   10      0.576 ±   0.002  us/op
EndpointRegistryScalabilityTest.testDynamicSize_8               avgt   10      1.915 ±   0.008  us/op
EndpointRegistryScalabilityTest.testIsDynamic_2                 avgt   10   1050.203 ±   2.756  us/op
EndpointRegistryScalabilityTest.testIsDynamic_4                 avgt   10   1093.550 ±  60.650  us/op
EndpointRegistryScalabilityTest.testIsDynamic_8                 avgt   10   3698.012 ±  16.992  us/op
EndpointRegistryScalabilityTest.testReadOnlyMap_2               avgt   10     20.164 ±   0.038  us/op
EndpointRegistryScalabilityTest.testReadOnlyMap_4               avgt   10     19.920 ±   0.008  us/op
EndpointRegistryScalabilityTest.testReadOnlyMap_8               avgt   10     19.935 ±   0.025  us/op
EndpointRegistryScalabilityTest.testReadOnlyValues_2            avgt   10      6.683 ±   0.028  us/op
EndpointRegistryScalabilityTest.testReadOnlyValues_4            avgt   10      6.528 ±   0.013  us/op
EndpointRegistryScalabilityTest.testReadOnlyValues_8            avgt   10      7.064 ±   0.026  us/op

Yeah can you test with camel-caffeine-lrucache as well.
Also I think we can have a non LRU cache, we often just want to keep 1000 elements in a cache, and they may not need to be exact LRU based. So they can be FIFO or anything like that, just that the size of big enough for normal use-cases.
So basically we can make a cache that is just a ConcurrentMap from the JDK to be used in the various places, where a LRU is really not needed.

Sure thing. Let run the tests with camel-caffeine-lrucache and see how it goes. I believe we can have the results today still.

Also I think we can have a non LRU cache, we often just want to keep 1000 elements in a cache, and they may not need to be exact LRU based. So they can be FIFO or anything like that, just that the size of big enough for normal use-cases.

Indeed. Maybe, it's the case we could go with a simpler alternative by default and ... if needed, we can leave a more extensible one.
I was thinking maybe, we could have a ring buffer (circular queue). IMHO, we may not necessarily need to expire the least-recently used records, but we could overwrite them if needed be.

@davsclaus if it helps I have an idea of how to implement a basic thread-safe LRU cache. Let me know if you are interested.

@essobedo yeah sure, we may only need LRU in some situations

dynamic endpoint registry
simple cache
jmx mbean cache (LRU not needed, only in use during startup) - we can have a bigger size, and clear the cache after startup
service pool (only for non singleton = only a few components: ftp, ssh, mina, avro-rpc)
bean introspection (LRU likely not as needed if we have a big enough size - LRU has overhead to reorder on get)
file idempotent repository (is LRU based today - can be synchronized as it does not need super fast (read/write to disk anyway)
MemoryIdempotentRepository can be synchronized as it does not need super fast (memory only for development)

@essobedo if you come up with the LRU Cache relatively soon - no pressure - I also offer to run the same tests on the perf lab I have access. I should have access to the machines for a few more weeks, so it should be fine.

@essobedo you are welcome to provide a LRUCache then @orpiske can give it a test in his lab.
After that we can look whether we can refine and avoid LRU where its not really needed anyway - a ConcurrentMap from JDK is the fastest.

@davsclaus May I use the same branch? Or should I create another one?

yes sure you are welcome to use this branch or whatever you think is best

Hi, I have created the CAMEL-19311](https://issues.apache.org/jira/browse/CAMEL-19311) to discuss the LRU. I'm adding the issue here just to link this issue to the JIRA issue opened by me.

@orpiske could you please try this?

Second Chance (Clock) is very easy to implement to give LRU like hit rates, high read concurrency, and is a good fit for small custom caches. It is basically a FIFO with a mark bit that is set on read. On a write a global lock is acquired, the FIFO is scanned resetting the mark bit, and the first unset entry is chosen for eviction. This means the worst case is O(n), which is fine for a cache of a few thousand entries. As reads are the common case, writes on this lock for a small amount of work is acceptable.
When brainstorming approaches for ConcurrentLinkedHashMap (Guava/Caffeine predecessor), that was my original approach that triggered my interest when solving some work performance problems. I had to release that as a pre-1.0 beta to mitigate people from using my unstable concurrent lru alpha code, so you can see review that as a reference and a basic analysis.

Thanks @ben-manes for sharing your knowledge to the Camel community.
The code for the Caffeine LRU Cache is here
https://github.com/apache/camel/tree/camel-3.x/components/camel-caffeine-lrucache/src/main/java/org/apache/camel/component/caffeine/lrucache
It may be that we can improve this and our situation with Camel is the cache sizes are small (1000) (never huge)
And today maybe the warmup is not as needed (we run a lot of unit tests and start/stop Camel frequently, so fast startup in these test is preferred)
https://github.com/apache/camel/blob/camel-3.x/components/camel-caffeine-lrucache/src/main/java/org/apache/camel/component/caffeine/lrucache/CaffeineLRUCacheFactory.java#L53

Oh that’s great. I simply meant that if you want to make this existing lru cache concurrent without a dependency, then second chance is an effective approach that should be easy to maintain. Your pr changes also look reasonable.

For warmup, a very long time ago the builder had a class loading issue because it selected the implementation by a string switch. That seemed to cause the factory to be slow to classload due to the constant pool. I don’t think it would have tried to load the implementations, but it was oddly visible. The cache uses codegen variants to minimize the memory footprint, e.g. have ttl entry fields only if expirable.
That was fixed by using reflection which also trimmed the jar bloat. The current version can instantiate 180k/s. This has done in 2.6.1 (2017).
An unreleased optimization cached that reflective load so it becomes a direct call on subsequent usages. That resulted in 4M/s. Happy to release it if the current time is still an issue and the snapshot jar shows an improvement.

@orpiske could you please try this?

I'll try this one today. I think I can post the results by COB.

@orpiske FYI, I've changed a bit the implementation for something easier to maintain

@orpiske FYI, I've changed a bit the implementation for something easier to maintain and closer in terms of behavior to the initial non thread-safe implementation

Thanks for the heads up. That's OK, the test should start in about 1 hour or so, so it should pick the updated one.

Considering that the baseline is a non-thread-safe implementation that sounds good, thx @orpiske

@ben-manes thx, for your priceless feedback, anything else to add regarding this PR?

LGTM
Great collaboration guys and thanks for all the performance tests.

lgtm!

Ok let's merge it and see how the tests go


Use random_password for secure auth token

Whilst a little inconvenient compared to using random_string this
method is more 'secure'.
If grep is not suitable instruction for the intended audience perhaps
something like "pull state and search for auth_token" or similar might
suit?

Running the make commands in same commit was perhaps not the way to go. :)


save/load colors to hard disk

The fact that the Linnstrument can store only 3 light patterns feels a little limiting to me. Would it be possible to add a "save as..." button to save the current light pattern to the computer's hard disk? And perhaps a "load from" button as well, to load it? Then one could have an unlimited number of patterns.

My tentative plan for how to do this is to write out the contents of colorGrid (the 2d array that holds colors for the app) as JSON to a file. This could then be re-loaded to the app to be sent to the LinnStrument. This means you would also have to use the app to interpret and load any color settings you saved to a file.
The other option would be to write MIDI to a file, which wouldn't require the app to load saved files, but would be a little harder to implement, and harder to describe to potential users.

This is also a feature I am hoping for!


Format strings in solana-ledger crate

Problem
Cleaning up some of the strings in solana-ledger crate, strings that are too long are known to inhibit clippy from working properly on entire files.
Summary of Changes

Put format_strings = true in rustfmt.toml
Run ../cargo nightly fmt within ledger directory
Manually tweak some strings after that

Codecov Report
Attention: Patch coverage is 44.95413% with 60 lines in your changes are missing coverage. Please review.

Project coverage is 82.7%. Comparing base (e01278e) to head (ad82706).
Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1392   +/-   ##
=======================================
  Coverage    82.7%    82.7%
=======================================
  Files         872      872
  Lines      369436   369442    +6
=======================================
+ Hits       305779   305791   +12
+ Misses      63657    63651    -6


NameError when starting

Hello,
On windows, I get an error after typeing terraforming on the command line
Ruby: 2.2.4
Terraforming: 0.7.0
:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in require': uninitialized constant Ox::Raw (NameError)        from C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in require'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/terraforming-0.7.0/lib/terraforming.rb:2:in <top (required)>'        from C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in require'
from C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in require'        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/terraforming-0.7.0/bin/terraforming:3:in <top (required)>'
from C:/Ruby22/bin/terraforming:23:in load'        from C:/Ruby22/bin/terraforming:23:in '

This issue is duplicated with #153 .


Fix skinning calculations

it was incorrect to store bone matrices as quaternions because it is
allowed for these matrices to have a skew component.
We now store the 4x4 matrix -- which is the same amount of data as
before, however we compute the cofactor matrix in the vertex shader when
transforming normals.
fixes #4887

This is a draft because I need to run more tests and also because I'm going improve performance before actual comit. But this new version should be functional.


Add getInputProps to Field instance docs

Feel free to update or request some wording/clarity fixes!

Fantastic!


PMP is being shut down

Just wanted to leave a heads up here that PMP is being shut down in July 2021

/me pours one out for the PMP

All things come to an end, I guess.


[Feature] Add a new image formatter for RBAC based new privilege framework

What type of PR is this：

[ ] BugFix
[x] Feature
[ ] Enhancement
[ ] Refactor
[ ] UT
[ ] Doc
[ ] Tool

Which issues of this PR fixes ：

Fixes #
Problem Summary(Required) ：

Introduce a new privilege framework.
To avoid huge PR which is hard to review and easy to conflict, I'm splitting into several small PR, each implementing an individual aspect of the new privilege framework. This is the second one. For previous PRs see

https://github.com/StarRocks/starrocks/pull/11447

This PR implements a new format of image and uses this format to persist the AuthenticationManager class.
Checklist:

[x] I have added test cases for my bug fix or my new feature
[ ] I have added user document for my new feature or new function

[FE PR Coverage Check]
:heart_eyes: pass : 110 / 116 (94.83%)
file detail

path
covered_line
new_line
coverage
not_covered_line_detail

:large_blue_circle:
com/starrocks/persist/metablock/SRMetaBlockFooter.java
4
6
66.67%
[20, 21]

:large_blue_circle:
com/starrocks/authentication/AuthenticationManager.java
30
32
93.75%
[206, 207]

:large_blue_circle:
com/starrocks/persist/metablock/SRMetaBlockReader.java
32
34
94.12%
[76, 77]

:large_blue_circle:
com/starrocks/persist/metablock/SRMetaBlockException.java
2
2
100.00%
[]

:large_blue_circle:
com/starrocks/persist/metablock/SRMetaBlockWriter.java
21
21
100.00%
[]

:large_blue_circle:
com/starrocks/common/io/Text.java
13
13
100.00%
[]

:large_blue_circle:
com/starrocks/persist/metablock/SRMetaBlockEOFException.java
2
2
100.00%
[]

:large_blue_circle:
com/starrocks/persist/metablock/SRMetaBlockHeader.java
6
6
100.00%
[]

[FE PR Coverage Check]
:heart_eyes: pass : 111 / 131 (84.73%)
file detail

path
covered_line
new_line
coverage
not_covered_line_detail

:large_blue_circle:
com/starrocks/server/GlobalStateMgr.java
0
8
00.00%
[1227, 1314, 1315, 1317, 1479, 1524, 1525, 1527]

:large_blue_circle:
com/starrocks/authentication/AuthenticationManager.java
32
42
76.19%
[220, 221, 222, 223, 246, 247, 254, 255, 256, 257]

:large_blue_circle:
com/starrocks/persist/metablock/SRMetaBlockReader.java
32
34
94.12%
[95, 96]

:large_blue_circle:
com/starrocks/persist/metablock/SRMetaBlockException.java
2
2
100.00%
[]

:large_blue_circle:
com/starrocks/persist/metablock/SRMetaBlockWriter.java
21
21
100.00%
[]

:large_blue_circle:
com/starrocks/common/io/Text.java
12
12
100.00%
[]

:large_blue_circle:
com/starrocks/persist/metablock/SRMetaBlockEOFException.java
2
2
100.00%
[]

:large_blue_circle:
com/starrocks/persist/metablock/SRMetaBlockFooter.java
4
4
100.00%
[]

:large_blue_circle:
com/starrocks/persist/metablock/SRMetaBlockHeader.java
6
6
100.00%
[]

[FE PR Coverage Check]
:heart_eyes: pass : 118 / 138 (85.51%)
file detail

path
covered_line
new_line
coverage
not_covered_line_detail

:large_blue_circle:
com/starrocks/server/GlobalStateMgr.java
0
8
00.00%
[1227, 1314, 1315, 1317, 1479, 1524, 1525, 1527]

:large_blue_circle:
com/starrocks/authentication/AuthenticationManager.java
32
42
76.19%
[220, 221, 222, 223, 246, 247, 254, 255, 256, 257]

:large_blue_circle:
com/starrocks/persist/metablock/SRMetaBlockReader.java
35
37
94.59%
[99, 100]

:large_blue_circle:
com/starrocks/persist/metablock/SRMetaBlockException.java
2
2
100.00%
[]

:large_blue_circle:
com/starrocks/persist/metablock/SRMetaBlockWriter.java
21
21
100.00%
[]

:large_blue_circle:
com/starrocks/common/io/Text.java
16
16
100.00%
[]

:large_blue_circle:
com/starrocks/persist/metablock/SRMetaBlockEOFException.java
2
2
100.00%
[]

:large_blue_circle:
com/starrocks/persist/metablock/SRMetaBlockFooter.java
4
4
100.00%
[]

:large_blue_circle:
com/starrocks/persist/metablock/SRMetaBlockHeader.java
6
6
100.00%
[]

[FE PR Coverage Check]
:heart_eyes: pass : 120 / 140 (85.71%)
file detail

path
covered_line
new_line
coverage
not_covered_line_detail

:large_blue_circle:
com/starrocks/server/GlobalStateMgr.java
0
8
00.00%
[1227, 1314, 1315, 1317, 1479, 1524, 1525, 1527]

:large_blue_circle:
com/starrocks/authentication/AuthenticationManager.java
33
43
76.74%
[220, 221, 222, 223, 246, 247, 254, 255, 256, 257]

:large_blue_circle:
com/starrocks/persist/metablock/SRMetaBlockReader.java
35
37
94.59%
[99, 100]

:large_blue_circle:
com/starrocks/persist/metablock/SRMetaBlockException.java
2
2
100.00%
[]

:large_blue_circle:
com/starrocks/persist/metablock/SRMetaBlockWriter.java
21
21
100.00%
[]

:large_blue_circle:
com/starrocks/common/io/Text.java
16
16
100.00%
[]

:large_blue_circle:
com/starrocks/persist/metablock/SRMetaBlockEOFException.java
2
2
100.00%
[]

:large_blue_circle:
com/starrocks/authentication/UserAuthenticationInfo.java
1
1
100.00%
[]

:large_blue_circle:
com/starrocks/persist/metablock/SRMetaBlockFooter.java
4
4
100.00%
[]

:large_blue_circle:
com/starrocks/persist/metablock/SRMetaBlockHeader.java
6
6
100.00%
[]

[FE PR Coverage Check]
:heart_eyes: pass : 120 / 138 (86.96%)
file detail

path
covered_line
new_line
coverage
not_covered_line_detail

:large_blue_circle:
com/starrocks/server/GlobalStateMgr.java
0
8
00.00%
[1225, 1312, 1313, 1315, 1477, 1522, 1523, 1525]

:large_blue_circle:
com/starrocks/authentication/AuthenticationManager.java
33
41
80.49%
[217, 218, 219, 220, 243, 244, 251, 252]

:large_blue_circle:
com/starrocks/persist/metablock/SRMetaBlockReader.java
35
37
94.59%
[99, 100]

:large_blue_circle:
com/starrocks/persist/metablock/SRMetaBlockException.java
2
2
100.00%
[]

:large_blue_circle:
com/starrocks/persist/metablock/SRMetaBlockWriter.java
21
21
100.00%
[]

:large_blue_circle:
com/starrocks/common/io/Text.java
16
16
100.00%
[]

:large_blue_circle:
com/starrocks/persist/metablock/SRMetaBlockEOFException.java
2
2
100.00%
[]

:large_blue_circle:
com/starrocks/authentication/UserAuthenticationInfo.java
1
1
100.00%
[]

:large_blue_circle:
com/starrocks/persist/metablock/SRMetaBlockFooter.java
4
4
100.00%
[]

:large_blue_circle:
com/starrocks/persist/metablock/SRMetaBlockHeader.java
6
6
100.00%
[]

run starrocks_admit_test


chore(main): release 0.8.20

:robot: I have created a release beep boop
0.8.20 (2023-12-08)
Bug Fixes

change dist to signatures folder (d599689)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/kevinah95/hacienda/releases/tag/v0.8.20 :sunflower:


Can we have longer titles?

Right now, not even a github PR link is not shown completely:

I believe the correct thing to do is to not set a max length, and let FL deal with it. This will make all FL widths supported.
If you agree, i can add a PR which removes the things related to https://github.com/rainyl/Flow.Launcher.Plugin.ClipboardR/blob/master/src/ClipboardR/Main.cs#LL27C26-L27C26

Yes, I believe that you are correct, I am very happy to merge if you are willing to fix it 😄

I'll try to.


Cancel account

I'd like to cancel my account. I did not end up using this service. I already sent two emails to<EMAIL_ADDRESS>(on June 23rd) and<EMAIL_ADDRESS>(on June 30th) and have received no response. I want to ensure I won't be charged again for something I'm not using.

Well, never got an answer to this from support. However, I did join their Slack (only accessible through grida.co) and found this link that was given to another person (in case anyone else needs it):
https://payments.grida.co/p/login/bIYfZddLx5Ld2D68ww
I wish I would have seen this before my card was charged again. It would be nice if this information was added to your website somewhere. The Slack post I found this on was two months ago, and I don't understand why it would take so long to add this link or just include it in your sign up flow.


Transaction and create hook problem

I have an observer in which i create an event and subscribe on this event like this
class ChangedStateOfOrderObserver < ActiveRecord::Observer
  observe :order

  def after_save(order)
    if order.state_changed?
      publish_changed_state_event(order)
    end
  end

  def publish_changed_state_event(order)
    client = RailsEventStore::Client.new
    stream_name = "order_#{order.id}"
    event_data = {
        data: { order_id: order.id, state: order.state }
    }
    event = Orders::StateChanged.new(event_data)

    notifiers = []

    notifiers << Managers::OrderAcceptedNotifier.new if order.accepted?
    notifiers << Managers::OrderCreatedNotifier.new if order.new?
    notifiers << Clients::OrderStateChangedNotifier.new

    notifiers.each do |n|
      client.subscribe(n, [event.class.name])
    end

    client.publish_event(event, stream_name)
  end
end

Clients::OrderStateChangedNotifier.new - in this class I send push notification to clients to inform that order's state has been changed.
I run into bug, when if push notificatin can not be performed due to some ssl bugs, order' save function rolls back and app crashes.
What do you think, is it correct behavior that save is rollbacked? I think problem with notifications should not interfere with default work flow of programm, how can I fix it?

The assumption behind RES was that (at least for now) all persistence will be done in the same transaction as AR models use. You could prevent that by publishing an event in after_commit instead after_save (in after_commit transaction is already committed and your data is saved). But remember about error handling - if anything goes wrong in after_commit it is up to you to handle that.
And again let's use https://gitter.im/arkency/rails_event_store to discuss things ;)


feature: Allow openai token to be specified via command/env variable

Checklist:

[x] I've searched for similar issues and couldn't find anything matching
[x] I've discussed this feature in the #k8sgpt slack channel

Is this feature request related to a problem?

[ ] Yes
[x] No

Describe the solution you'd like

Having password in config files is not always what a certain user of the application wants.
I propose a way of specifying any command instead of the plain string, which output will then
be treated as the password.
For this the current config file structure needs to change a bit. Here an example:
ai:
    providers:
        - name: openai1
          password: my-secure-password
        - name: openai2
          model: gpt-3.5-turbo
          password:
            type: value
            value: my-secure-password
        - name: openai3
          model: gpt-3.5-turbo
          password:
            type: command
            command:
            - echo
            - my-secure-password
          - name: openai4
          model: gpt-3.5-turbo
          password:
            type: environment
            name: OPENAI_TOKEN

Here we can see how this could look like.
The password field should be transformed from a simple string, to an object.
The type parameter specifies how the rest of the yaml map shall be interpreted.
I would have 3 types in mind:

value
environment
command

For type value, password value would be specified by a field value. There should
also be a short form, which is depicted in openai1 in the example above. This is basically
the current way of defining password and would ensure no breaking change in the config.
Type environment would require a name field, which specifies the name of the environment
variable holding the token.
Type command requires a command field, which is a list of string, defining a command +
arguments to be called in order to retrieve the password.
Benefits for the project and its users

This would improve the security for end users, since they are no longer required to store
their api tokens in the configuration file.
The design is also extensible, should the need arise to add new password types.
Potential drawbacks

The only downside I can think of is code execution when running untrusted configs. I am
not 100% convinced that this is a real issue though.
Additional context

@thschue @AlexsJones what are your opinions on this?

I like the idea, we just need to ensure that it’s transparent for the user, e.g. the auth command behaves as now and additional things can be used via params in the cli. There’s also an issue for encryption in Progress (#224), which should be kept in mind … From my side, there are no objections, would love to see this 👍

Can you illustrate how this would look in the CLI?

If there 's no objection, we can close this issue.

Just to close this thought out, it's possible with Viper to env reading, which we actually already do.

	viper.SetEnvPrefix("K8SGPT")
	viper.AutomaticEnv() // read in environment variables that match

This means you'd be able to use the token such as
	AnalyzeCmd.Flags().BoolVarP(&anonymize, "anonymize", "a", false, "Anonymize data before sending it to the AI backend. This flag masks sensitive data, such as Kubernetes object names and labels, by replacing it with a key. However, please note that this flag does not currently apply to events.")
	// array of strings flag
	AnalyzeCmd.Flags().StringSliceVarP(&filters, "filter", "f", []string{}, "Filter for these analyzers (e.g. Pod, PersistentVolumeClaim, Service, ReplicaSet)")
	// explain flag
	AnalyzeCmd.Flags().BoolVarP(&explain, "explain", "e", false, "Explain the problem to me")

Would become K8SGPT_EXPLAIN etc..
The issue is that we don't auth and analyze in one command.
So I think the real work is modifying the analyze command to detect if those params are set and do a "dynamic" auth


[Bug] Temporal tests don't run in air-gapped environments

What are you really trying to do?
I'm trying to run the sample unit tests, behind a firewall that does not allow downloading the temporal test server binary.
Describe the bug
I don't think this bug has to do with this repo, specifically. I think it's actually deep in the guts of Temporal itself.
When I try to run the unit tests, Temporal is unable to download a test server. This happens when I am behind a firewall that blocks access to certain sites.
I am able to run temporal server start-dev in a separate terminal (using a Temporal server I installed using brew install temporal). I found that start_time_skipping() supports a test_server_existing_path argument, so I tried adding that to the test code (here in this repo). Unfortunately, it appears that Temporal doesn't pass that argument all the way down to EphemeralServer, so that deep code tries to download a fresh copy of the test server binary. And that's where my firewall steps in and says "nope."
(More output is included later, for context.)  None of those; local Python virtualenv

Additional context
NOTE: I tried this without my firewall, and Temporal did download the binary to my $TMPDIR. Subsequent runs seemed to try to use that binary (but there was another issue, which I'll try to resolve/report elsewhere). I had to rm temporal-test-server-sdk-python-1.2.0 and turn my firewall back on to get the trackback details.
I also tried to find a workaround by running my local dev server on --port 9999 and --http-port 9999, but Temporal did not seem to find this server during testing; it kept trying to download the binary.

Yes, the temporal server will require access to the internet to run tests, at least the first time.


Need to support complex shadow blocks

Shadow blocks are currently not supported in the following ways:

[ ] When attached to a next
[ ] When the shadow block has a next
[ ] When the shadow block has inputs other than dummy inputs.

Example:
    <block type="statement_no_input">
        <next>
            <shadow type="statement_no_input"></shadow>
        </next>
    </block>

After some internal discussion we've decided to support complex shadow blocks in the following ways on all platforms.

Disallow top level shadow blocks.
Allow complex shadow blocks, but only allow shadows to have other shadows as children (enforced at xml load time and while dragging).
Bump attempts to connect a normal block to a shadow block.
Strongly suggest developers only use simple* shadows for kid focused apps.

*A simple block is a block with only an output or a previous connection (no next or value connections).

@NeilFraser One more detail--when connecting a block with a shadow next between two other blocks I opted to bump the remainder instead of replacing the shadow block on next.
Does that seem reasonable to you?

After a bit more internal discussion we're having the shadow get replaced by the remainder when it splices between blocks.


not formatting

Issue Type: Bug
I tried everything but... every tipe of file is formatting , but js is not. everything you are thinking of, I already did but stiil any of .js files arent formated. even "prettier" isnt working. don't know what to do help. for exmp: document.queriSelector it must have color right? it si just white text, it is functional but still.
VS Code version: Code 1.61.2 (6cba118ac49a1b88332f312a8f67186f7f3c1643, 2021-10-19T14:57:20.575Z)
OS version: Windows_NT x64 10.0.19042
Restricted Mode: No

System Info

Item
Value

CPUs
Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz (4 x 2304)

GPU Status
2d_canvas: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onoop_rasterization: enabledopengl: enabled_onrasterization: enabledskia_renderer: enabled_onvideo_decode: enabledvulkan: disabled_offwebgl: enabledwebgl2: enabled

Load (avg)
undefined

Memory (System)
3.88GB (0.51GB free)

Process Argv

Screen Reader
no

VM
0%

Extensions (9)

Extension
Author (truncated)
Version

simple-react-snippets
bur
1.2.4

prettier-vscode
esb
9.0.0

material-icon-theme
PKi
4.10.0

prettier-now
rem
1.4.9

LiveServer
rit
5.6.1

prettier-vscode
Sim
2.0.7

prettier-plus
svi
4.2.2

bootstrap4-vscode
the
6.1.0

bootstrap-3-snippets
wcw
0.1.0

A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythontb:30283811
pythonptprofiler:30281270
vshan820:30294714
vstes263cf:30335440
vscorecescf:30384386
pythondataviewer:30285071
pythonvsuse255:30340121
vscod805:30301674
pythonvspyt200:30340761
binariesv615:30325510
vsccppwt:30382697
bridge0708:30335490
pygetstartedt3:30385195
dockerwalkthru:30377721
bridge0723:30353136
pythonrunftest32:30373476
pythonf5test824:30373475
javagetstartedt:30364666
pythonvspyt187:30373474
vsqsis400:30386382
vsaa593cf:30376535
vssld246:30386377

helpp

Does this reproduce in the latest VS Code insiders build with all extensions disabled?

prettier isnt working at all, even other type of files aren't formatting, for example cpp files. format on save is on. in json settings file everything is alright defaultformatter is set on prettier but it still isnt formatting.

Please start by filing this against your formatting extensions


Restarting HA takes very long with MA enabled

What version of Music Assistant has the issue?
2022.11.0
The problem
When I enable MA in HA restarting HA takes more then 4 minutes.
This step takes very long

When I disable MA

Then the first time restarting HA still takes long, but from then HA restarts in less then a minute
How to reproduce
Enable/disable MA
Relevant log output
None
Additional information

This are all sonos players

What version of Home Assistant Core are your running
2022.11.3
What type of installation are you running?
Home Assistant OS
On what type of hardware are you running?
Generic x86-64 (e.g. Intel NUC)

This isn't the cause. I'm running v2022.11 from when it is available.
And i have restarted HA a lot since then.

Both the Spotify and TuneIn configure correctly? So both are working after startup.

Both Spotify and TuneIn configured correctly? So both are working once MA started?!

Yes they are both working

I don't have a clue. Maybe someone else? I have a similar configuration with tunein, Spotify and a huge local collection. The startup time for my setup is just 2-3 seconds.

The OP has previously had an issue with a player blocking the start. Perhaps try removing all but one of your players and see if that makes a difference. Try and pick a known working player?
Then I would suggest disabling the music providers one at a time and see if that makes a difference.

You are referring this issue https://github.com/music-assistant/hass-music-assistant/issues/784
This was because i had the spotify media player from HA as a media player in MA.
Now I don't have Spotify enabled in HA anymore.
Since then I have also removed the MA integration (also the .db file) and re-installed MA.

Hi
Normally MA doesn't block startup. Most sync actions are performed after startup in background tasks.
I only expect this to happen with failing credentials for music providers or network issues to resources addressed by MA (I.e media players).
Without any logging I don't see ways to follow up on this.
Maybe enabling debug logging for MA reveals some info:
logger:
  default: warning
  logs:
 Music Assistant:
    custom_components.mass: debug
    music_assistant: debug

Best Eric

Hi @gieljnssns. Have you made any progress narrowing down what is causing the issue?

I thought to wait until the new version is out…

You certainly can although this issue might be a player that isn’t being worked on….

mass-debug.log

It looks like MA is roughly  started in 10 seconds, then some other part is starting
2022-12-06 09:17:31.391 WARNING (MainThread) [homeassistant.helpers.entity] Update of calendar.rafc is taking over 10 seconds

The next MA logging is from some automation I Guess, after 10 minutes delay:
2022-12-06 09:28:50.681 DEBUG (MainThread) [custom_components.mass.player_controls.media_player.keuken] volume_set command called with value: 65

I doubth MA is not starting gaat

@erkr
I think it is the shutting down of MA.
this step takes very long

Then the music stops playing and HA restarts

I indeed also noticed that during a restart, MA continues to play until HA starts up again.
But that doesn't delay my startup at all. Also at the bottom of your log, or looks like MA stopped within a second:
2022-12-06 09:40:59.782 INFO (MainThread) [music_assistant] Stop called, cleaning up...
2022-12-06 09:40:59.783 DEBUG (MainThread) [music_assistant.event] application_shutdown
2022-12-06 09:40:59.783 INFO (MainThread) [music_assistant.db] Database disconnected.
2022-12-06 09:40:59.815 DEBUG (MainThread) [music_assistant.stream] Streamserver exited.

What happens if you only reload the MA integration while playing music? Same delay of several  minutes? Or does it just take some seconds?

Sorry, will try when the MA version for HA 2022.12 is out.

Restarting or reloading HA while music is playing is what cause the delay due to buffers that need to be freed. A signal is sent but not consumed as fast as we may wish.
Another reason we should move the core of MA to a separate add-on.

Reloading the integration takes a couple seconds.

There must be something in MA that is blocking a restart  👆🏻

The MA 2.0 release will move all back end stuff to an add-on, in order to be more independent of HA. Let's wait for that launch and see if your issue persists.

This issue is fixed in v2.0 release because the entire corer of MA then runs in its own dedicated process.

@gieljnssns I see you have moved to the beta so I am closing this.


Use System globalName

Closes #1

This change is included in #3 so I'll close this one and focus in that one.


aws_inspector2_coverage doesn't process regions correctly

Describe the bug
When I run this query:
select
  scan_status_reason, region,
  count(*)
from
  inspector.aws_inspector2_coverage
where resource_type = 'AWS_EC2_INSTANCE'
group by  scan_status_reason, region

I get the same result count regardless of region.
+------------------------------+----------------+-------+
| scan_status_reason           | region         | count |
+------------------------------+----------------+-------+
| DEEP_INSPECTION_NO_INVENTORY | ap-northeast-1 | 8     |
| DEEP_INSPECTION_NO_INVENTORY | ap-northeast-2 | 8     |
| DEEP_INSPECTION_NO_INVENTORY | ap-south-1     | 8     |
| DEEP_INSPECTION_NO_INVENTORY | ap-southeast-1 | 8     |
| DEEP_INSPECTION_NO_INVENTORY | ap-southeast-2 | 8     |
| DEEP_INSPECTION_NO_INVENTORY | ca-central-1   | 8     |
| DEEP_INSPECTION_NO_INVENTORY | eu-central-1   | 8     |
| DEEP_INSPECTION_NO_INVENTORY | eu-north-1     | 8     |
| DEEP_INSPECTION_NO_INVENTORY | eu-west-1      | 8     |
| DEEP_INSPECTION_NO_INVENTORY | eu-west-2      | 8     |
| DEEP_INSPECTION_NO_INVENTORY | eu-west-3      | 8     |
| DEEP_INSPECTION_NO_INVENTORY | sa-east-1      | 8     |
| DEEP_INSPECTION_NO_INVENTORY | us-east-1      | 8     |
| DEEP_INSPECTION_NO_INVENTORY | us-east-2      | 8     |
| DEEP_INSPECTION_NO_INVENTORY | us-west-1      | 8     |
| DEEP_INSPECTION_NO_INVENTORY | us-west-2      | 8     |
| EC2_INSTANCE_STOPPED         | ap-northeast-1 | 16    |
| EC2_INSTANCE_STOPPED         | ap-northeast-2 | 16    |
| EC2_INSTANCE_STOPPED         | ap-south-1     | 16    |
| EC2_INSTANCE_STOPPED         | ap-southeast-1 | 16    |
| EC2_INSTANCE_STOPPED         | ap-southeast-2 | 16    |
| EC2_INSTANCE_STOPPED         | ca-central-1   | 16    |
| EC2_INSTANCE_STOPPED         | eu-central-1   | 16    |
| EC2_INSTANCE_STOPPED         | eu-north-1     | 16    |
| EC2_INSTANCE_STOPPED         | eu-west-1      | 16    |
| EC2_INSTANCE_STOPPED         | eu-west-2      | 16    |
| EC2_INSTANCE_STOPPED         | eu-west-3      | 16    |
| EC2_INSTANCE_STOPPED         | sa-east-1      | 16    |
| EC2_INSTANCE_STOPPED         | us-east-1      | 16    |
...

Steampipe version (steampipe -v)
v0.20.3
Plugin version (steampipe plugin list)
aws 0.104.0
To reproduce
This environment is configured with AWS Inspector2 using Delegated admin. Queries are run from the Inspector Delegated Admin account.
Expected behavior
I'd expect to see different results based on the number of instances in each region
Additional context
Add any other context about the problem here.

My connection looks like:
connection "inspector" {
  plugin  = "aws"
  profile = "xxx-security"
  regions = ["*"]
    options "connection" {
        cache     = true # true, false
        cache_ttl = 3600  # expiration (TTL) in seconds
    }
}

I see similar results with the finding table:
select
  region, count(arn)
from
  inspector.aws_inspector2_finding
where status = 'ACTIVE'
and severity = 'CRITICAL'
group by region
+----------------+-------+
| region         | count |
+----------------+-------+
| ap-northeast-1 | 3324  |
| ap-northeast-2 | 3324  |
| ap-south-1     | 3324  |
| ap-southeast-1 | 3324  |
| ap-southeast-2 | 3324  |
| ca-central-1   | 3324  |
| eu-central-1   | 3324  |
| eu-north-1     | 3324  |
| eu-west-1      | 3324  |
| eu-west-2      | 3324  |
| eu-west-3      | 3324  |
| sa-east-1      | 3324  |
| us-east-1      | 3324  |
| us-east-2      | 3324  |
| us-west-1      | 3324  |
| us-west-2      | 3324  |
+----------------+-------+

3324 is roughly the number of critical findings I have in us-east-1, there are zero in Ohio and ~ 2800 in Oregon.

And... I just changed by regional envar to us-west-2 and re-ran the query.  2805 for every region. So it's clear the plugin is using the region that's default for the SDK and not passed in via the connection.

Looks like the inspector2 client is using getClientForDefaultRegion:
https://github.com/turbot/steampipe-plugin-aws/blob/f711c30a36d9597e7cb1f5e1cf13e75c986ad628/aws/service.go#L787
If these are regional resources then it should be using getClientForQuerySupportedRegion.

Yup, Inspector findings are regional. They're only aggregated across regions when brought into SecurityHub.

@jchrisfarris @e-gineer, Apologize for the bump! I have submitted a pull request with the necessary fixes. The Inspector2Client will now utilize the regions specified in the .spc file, and the results will be rendered accordingly. Below is the connection configuration in my .spc file.
connection "aws" {
  plugin  = "aws"
  profile = "me"
  regions = ["*"]
}

Output for the above connection config.
> select
  scan_status_reason, region, resource_type,
  count(*)
from
  aws_inspector2_coverage
group by  scan_status_reason, region, resource_type
+--------------------+-----------+---------------+-------+
| scan_status_reason | region    | resource_type | count |
+--------------------+-----------+---------------+-------+
| SUCCESSFUL         | us-east-1 | AWS_ACCOUNT   | 1     |
+--------------------+-----------+---------------+-------+

I have only data in the region us-east-1 and it rendered as expected.
Could you please give it a try?  If you encounter any further issues, please let me know. Thank you!


improve typings for setState

this should have less friction with TypeScript when using string paths for setState

Have not been able to fully test it, but should be fine - if you could create a preview build, I'll do the testing.

By the way, the tests contain some dedicated tests for verifying type definitions. Would be nice to add something for setState as well (was on my to-do list ;)).

By the way, the tests contain some dedicated tests for verifying type definitions. Would be nice to add something for setState as well (was on my to-do list ;)).

Will try to think of something.


FileSearchProvider results are not displayed correctly

VSCode Version: 1.33.0-insider
OS Version: Windows 10 Enterprise

Steps to Reproduce:

Register a FileSearchProvider and return a set of results in a URI array
Expected: the path is displayed after each filename in the results dropdown
Actual: the path is displayed only for files that are currently open in the guest's editor. For all others, the displayed path is just a backslash.

Does this issue occur when all extensions are disabled?: n/a

Also fixed by https://github.com/Microsoft/vscode-cached-file-search-provider/commit/14d4ec1676429da1c54195031790dd20ebe44c95

@roblourens When is FileSearchProvider expected to get promoted from a proposed API to a final one? A search for the api-finalization tag didn't show anything for this.

It's not a high priority right now. Is there something you want to use it for?

I'm building an extension that implements IFileSystemProvider to access code on a remote server. As I understand it, IFileSearchProvider would allow me to make QuickOpen (Ctrl+P) more useful.

@roblourens Is drive letter casing expected to matter here?
If I do
        vscode.workspace.registerFileSearchProvider('file', {
            provideFileSearchResults(query, options, token) {
                return Promise.resolve([vscode.Uri.parse('file:///e:/dev/new-test-extension/src/extension.ts')]);
            }
        });

everything works as expected, but if the drive letter is capitalized, the drive letter is appended twice:

Is that a correctly formed windows file URI? Do you get the same from Uri.file(e:/dev...)?

Using vscode.Uri.file('E:\dev\new-test-extension\src\extension.ts') and vscode.Uri.file('e:\dev\new-test-extension\src\extension.ts') both work. So I think I'm just misusing parse

I can't remember, it might be that e: needs to be uri-encoded. You can check by creating one and toStringing it.


Not an issue as well, I've made a Brew cask

If anyone interested, you can install robmathers/WhereAmI via Homebrew cask by tapping welldan97/whereami:
$ brew tap welldan97/whereami
==> Tapping welldan97/whereami
Cloning into '/opt/boxen/homebrew/Library/Taps/welldan97/homebrew-whereami'...
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 5 (delta 0), reused 5 (delta 0), pack-reused 0
Unpacking objects: 100% (5/5), done.
Checking connectivity... done.
Tapped 0 formulae (28 files, 17.2K)

$ brew cask install whereami
==> Downloading https://github.com/robmathers/WhereAmI/releases/download/v1.02/whereami-1.02.zip
######################################################################## 100.0%
==> Verifying checksum for Cask whereami
==> Symlinking Binary 'whereami' to '/usr/local/bin/whereami'
🍺  whereami staged at '/opt/homebrew-cask/Caskroom/whereami/latest' (36K)

$ whereami
Latitude: 56.320993
Longitude: 44.027497
Accuracy (m): 65.000000
Timestamp: 01/03/2016, 12:11:27 GMT+3

Also I've made a small script:
#!/usr/bin/env bash

set -e

main() {
  output=''
  while ! does-include "$output" 'Latitude' ; do
    output=$(whereami)
  done
  echo $(fetch "$output" 'Latitude') $(fetch "$output" 'Longitude')
}

fetch() {
  echo "$1" | grep "$2" | head -n 1 | cut -d' ' -f2
}

does-include() {
  echo "$1" | grep "$2" > /dev/null
}

main "$@"

which makes output more consistent - remove duplicates, keeps retrying till return results, and returns just latitude and longitude, i.e.:
$ w97-whereami
56.320956 44.027472

$ brew cask install whereami
==> Downloading https://github.com/robmathers/WhereAmI/releases/download/v1.02/whereami-1.02.zip
######################################################################## 100.0%
==> Verifying checksum for Cask whereami
==> Symlinking Binary 'whereami' to '/usr/local/bin/whereami'
🍺  whereami staged at '/opt/homebrew-cask/Caskroom/whereami/latest' (36K)

Now brew cask install is deprecated; just use brew install is okay. And tested on Apple Silicon, it works fine.
BTW, @welldan97 it warns me Warning: Unexpected method 'license' called on Cask whereami. when I tapped your formula; probably you can fix that.


parameterisable modules

Something we can't do at the moment is to use the same module with two instance with two different configuration. If one module wants 2 balances for example it is not possible.
I propose a way to do that:
pub trait Balance {}

mod balances {
    pub struct Instance0;
    pub struct Instance1;

    pub trait Trait<Instance = Instance0> {}

    pub struct Module<T: Trait<Instance>, Instance = Instance0> {
        _p: core::marker::PhantomData<(T, Instance)>,
    }

    impl<T: Trait<Instance>, Instance> super::Balance for Module<T, Instance> {}
}

// A module using two balances
mod example1 {
    pub trait Trait {
        type balance: super::Balance;
        type balance1: super::Balance;
    }
}

// A module that is bound to the default balances
// The same way as the old way, no breakage
mod example2 {
    pub trait Trait: super::balances::Trait {
    }
}

// A module that is bound to the instance1 balances
mod example3 {
    pub trait Trait: super::balances::Trait<super::balances::Instance1> {
    }
}

struct Runtime;

// Default instance implementation is same as the old way,
// no breakage
impl balances::Trait for Runtime {}

impl balances::Trait<balances::Instance1> for Runtime {}

impl example1::Trait for Runtime {
    // same as the old way, no breakage
    type balance = balances::Module<Self>;
    type balance1 = balances::Module<Self, balances::Instance1>;
}

impl example2::Trait for Runtime {
}

impl example3::Trait for Runtime {
}

fn main() {
    let _ = Runtime;
}

To do so we need to modify decl_module! to be able to declare such a module.
If this is wanted I would like to work on it.

Go ahead.

This also requires changes to the Storage implementation? Otherwise both Balance modules would modify the same storage instance.


Advanced Start compatibility with Space Out DLC

Mod Advanced Start is not compatible with Space Out DLC.

It has been updated.


OpenIdConnectOptions - resolve ClientId / ClientSecret dynamically

Moved from https://github.com/openiddict/openiddict-core/issues/202.

I have a ASP.Net WEB API application that is a "client" to a OpenIddict server. This API is used by various customers. And refresh token should be provided by the OpenIddict server in the correct customer scope. When configuring UseOpenIdConnectAuthentication on the WEB API Startup, we can set the ClientId / ClientSecret. But we would like to set these fields per request, depending on the customer token that the WEB API client provides. So can we set ClientId / ClientSecret dynamically per request, using a callback for example? Or what would be the preferred way of supporting this scenario?

We call this multi-tenancy, and currently there's no support for it.
https://github.com/aspnet/Security/issues/35

Actually, I had an idea soon after moving this ticket: I'm pretty sure this scenario could be achieved using the RedirectToIdentityProvider/AuthorizationCodeReceived events (by dynamically replacing the client_id parameter from the authorization/token request).
/cc @tedvanderveen

That assumes the metadata is the same for each client

@Tratcher @PinpointTownes Yes one could call it multi-tenancy, but in a very basic way. That is, only the client_id and client_secret should vary, the other metadata/Options stay the same from the perspective of the multi-tenant application (in this case the ASP.Net Web API application that authenticated against the OpenID server).
So basically we need to direct the OpenID server on what Application instance to select. I like the idea @PinpointTownes suggested by using RedirectToIdentityProvider and AuthorizationCodeReceived to transport the client_id and client_secret params.


1910 Release Notes Missing

1910 Release Notes do not appear in the Technet Gallery Archive or the Archive as this page mentioned. Latest Archive notes are from 1908.0

@jamesorlando I will add these back tomorrow (PST). Please keep in mind that the 1910 Azure Stack build is no longer under support.

@jamesorlando I will add these back tomorrow (PST). Please keep in mind that the 1910 Azure Stack build is no longer under support.

Hi again @jamesorlando. Unfortunately TechNet has been made read-only, and will be retired soon. So we will need to find another place to host archived release notes. Thanks for bringing this to our attention! #please-close

Hi again @jamesorlando. Unfortunately TechNet has been made read-only, and will be retired soon. So we will need to find another place to host archived release notes. Thanks for bringing this to our attention! #please-close

All archived release notes are now at https://docs.microsoft.com/en-us/azure-stack/operator/relnotearchive/release-notes

@sethmanheim Thanks for sharing the details.


Bug: queryArgs is causing infinite rerenders in useDataTable

when I added queryArgs as parameter in useDataTable hook I get this message.
Warning: Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.
it seems to be related to useAtom https://github.com/tesseractcollective/react-graphql-ui/blob/f2d55cc3c00839c0ae369040b9b04e2ddcd911c7/src/hooks/datatable/useDataTable.tsx#L175 and that it causes rerender in the setter https://github.com/pmndrs/jotai/issues/26
also it would be great to be able to use queryArgs and searchbar together

for use queryArgs is needed to build and store in a state, building queryArgs on the fly may cause infinite rerender.
in addition to this issue was added the possibility to use queryargs and searchbar together #21


Minor TODOs

[ ] Split getPermission into two methods: getPermissionByMethod and getPermissionById

[ ] Alternatively, make the existing method functionally equivalent by making the second argument an object, checking first for an id and then a method property.

[x] Parameter/promise/request validation

[x] Remove duplicate permissions in addPermissionsFor
[x] requestPermissionsMiddleware
[x] grantPermissionsMiddleware
[x] revokePermissionsMiddleware

[ ] grantPermissionsMiddleware: Allow objects in requestedPerms to specify permission id
[x] requestUserApproval: Allow user to pass back an object describing the approved permissions

I wasn't sure about the permission ID items in here. I think the distinction may be that permissions requests have IDs (for the sake of responding to them), and permissions do also have an ID, but we don't have any need to look up by them for MVP.
So given that, I think we can close this for now, but I'll let you go over it to be sure.

Agree that ID lookup is, for MVP purposes, a nicety, and we can close this issue.


fixed the notification issue

Android 13 permission dialog box

lower android version.

@lingarajsankaravelu can you check it now.

@lingarajsankaravelu Thank you for the suggestions and would definitely try to implement it.

@vinitfreakk I agree with @lingarajsankaravelu even I love to code but even then I go to bed at 2 am. I have seen you create an issue in daytime and make a PR at night wonder how you manage it with your college because I can't.  Thank you for contributing so much. Take care brother.
Tested your code and approving them.

🥷🥷🥷🥷


Relative file link in Terminal not clickable

Does this issue occur when all extensions are disabled?: Yes

Version: 1.96.2 (user setup)
Commit: fabdb6a30b49f79a7aba0f2ad9df9b399473380f
Date: 2024-12-19T10:22:47.216Z
Electron: 32.2.6
ElectronBuildId: 10629634
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Windows_NT x64 10.0.22631
Steps to Reproduce:
The integrated terminal file link works for absolute path (e.g.: /usr/x/proj/_snapshot/snapshot-1.png),
and relative files that are not ignored (e.g.: src/index.ts).
But if the file/folder is gitignored (e.g.: ./_snapshot/snapshot-1.png while _snapshot is ignored in .gitignore),
it doesn't work (clicking on shows No matching results)
Originally asked in: https://discord.com/channels/470167643710816277/1320179380315623494/1320179380315623494

Hello, It's not reproducible from my side. Kindly provide a screenshot or sort video to have on the same page.
Used: d4de5ceb
Thanks

Is this screenshot, the Expected:   __vis__/local/client/expect/to_match_image_snapshot.spec.tsx/fails-when-the-image-is-different-beyond-failure-threshold-in-pixels.png is clicked:

You can see on the right side the file is there (and is opened).
If I commented out **/__vis__/local in the .gitignore, it works:

Here is the project I used for these snapshots: https://github.com/repobuddy/storybook-addon-vis/tree/state2


Add option to fail immediately if the connection pool is fully exhausted and a connection is attempting to be retrieved

We're in a scenario where, if the connection pool is fully exhausted, we don't want to wait around to see if we can get a connection within the timeout, we just want to fail immediately. There are a few ways we've been able to do this but i'm wondering if there is any appetite adding this functionality in to the library itself?
Thanks

Not much appetite. But I am curious about the usecase. Why not just set the connection timeout to something low?

Hey thanks for your interest.
We have many apps with sharded dbs. Some over 100 shards - which means 100 connection pools. We've had a couple of instances of:

one shard getting hot
the connection pool becoming exhausted
new inbound requests try to acquire a connection to that pool but are left spinning
this exhausts the inbound thread pool and then the whole host goes down

Multiple teams have come up with their own solutions that sit in front of hikari and fail fast if the connection pool is full exhausted, this at least protects the host.
Setting the connection timeout low is an improvement but we still want a way to fail fast in this scenario.

i'm happy to make a draft PR if you like?

 How would the pool "fail'? Just throw an exception from getConnection()?

Yep, i think throwing an from getConnection() makes the most sense

I realized I can basically build this functionality by passing hibernate a custom connection provider that pulls the relevant data from the mxbean. Also thinking it might be less destructive to put a limit on the number of threads awaiting connections, and fail fast based on that.

Final update in case you were wondering - this works a treat using a custom connection provider.


Full end to end guide on installing on a raspberry pi

Right now I feel like the technical knowledge required to get this up an running is pretty high.
I'd like to build out a nice markdown guide for setting this up on a raspberry pi on your network.
Everything from running the docker image to how to configure the Auto Export app on your device.

That would be amazing!
I've been tinkering with node-red all evening and something workable would be awesome!

Hi Joe, I'd like to talk to you about this project and something I'm working on. Is there a way to contact you direct either through email or a social media DM?

Hi Joe, I'd like to talk to you about this project and something I'm working on. Is there a way to contact you direct either through email or a social media DM?

Hey @Ikoth discord may be a good option? Joe Carter#7961


get_machines during connection attempt fails

I'm running a recent 3.* image of etcd in a container. I then try to connect to this instance, like so:
from etcd import client
c = client.Client(host="<IP_ADDRESS>", port=2379)

This results in:
HTTPError: 404 Client Error: Not Found

The traceback reveals that this is thrown here:
File "/home/jbrendel/projects/pani/local/lib/python2.7/site-packages/etcd/server_ops.py", line 47, in get_machines
  response = self.client.send(2, 'get', fq_path, allow_reconnect=False)

Adding a print statement there shows that it tries to read /keys/_etcd/machines
My etcd version doesn't have this key, though.
What seems to be the problem?

I'm facing the same issue. Any luck with it?


Commit & tag missing for 0.12.3 release

The release exists on crates.io and was created on commit 599a43c047c6766c7eced76e9374f82cf4b515b7 (not clickable because the commit wasn't pushed):
https://docs.rs/crate/tame-gcs/0.12.3/source/.cargo_vcs_info.json

Yanked and republished as 0.12.4

No need to yank this, unless you could no longer find and push the relevant commit in local history?


My extensions marketplace does not load

I downloaded the Visual Studio Code about a week ago and had issues with the program from the start. My Python editor would not recognise the simplest function to sum two parameters. The issue in the output window informed me that I cannot edit from the read only editor. I tried tried to move the application from downloads folder to applications folder. Later on, I discovered that functions run if I "run and debug" them first. However, now I cannot connect to the extensions marketplace and no links on the welcome page work. I tried to delete and reinstall the programm several time, but it does not help. I am working of MacBook Pro that runs on BigSur software. I am hoping you can tell me what to do to make VSCode work. Thank you for your time.

Duplicate of #115713


Ignore non buffer chunk files when resumed

This fixes #1098.
buf_file in v0.14 loads all files which matches with glob for buffer file path as queued. That behavior is to read files as much as possible when upgrading Fluentd.
But there is a bug to read files as queued, which is written by out_file in the same directory with buffer chunk files.
This change is to fix not to load files which doesn't have a part like (b|q)[0-9a-f]+, which shows that file is a buffer chunk.
note about #1098
#1098 is a result of combination of this bug and append true, which does read data from buffer chunk file (this file) and also does write these data to output file (this file) - it is infinite loop of read & write.
The minimum steps to reproduce it is:

execute command: echo "foobar" > temperature.\ruby -e 'puts Time.now.strftime("%Y%m%d")'`.log`
execute fluentd with configuration below:
use ctrl-z to stop Fluentd process without shutdown sequence (shutdown calls flushing)

# no <source> needed
<match demo.temperature>
  @type file
  path temperature
  flush_interval 1s
  append true
</match>

Test failed by introducing unknown

@repeatedly Oops. I fixed that test (and added another data for pattern newly tested).