Feature Request: Move INTERNAL_TOKEN value out of app.ini

Gitea version (or commit ref): latest
Git version: latest
Operating system: Linux
Database (use [x]):

[ ] PostgreSQL
[ ] MySQL
[ ] MSSQL
[ ] SQLite

Can you reproduce the bug at https://try.gitea.io:

[ ] Yes (provide example URL)
[ ] No
[x] Not relevant

Log gist:

Description
I'd like to request that the INTERNAL_TOKEN value that is currently placed in the app.ini during Gitea startup be moved to a separate file/config than the user-defined app.ini.  It should probably be placed in a lockfile, pid, or separate gitea-system-controlled config file, etc.
The reason for this is that a lot of organizations use automation tools such as Puppet, SaltStack, Ansible, etc. to deploy configurations to servers.  If the app.ini (user-defined config file) is being managed by one of these, it will overwrite the existing app.ini that includes the INTERNAL_TOKEN.  This is less than ideal, and obviously breaks the functioning of Gitea.
References:

#2762 https://github.com/go-gitea/gitea/issues/2762
#3226 https://github.com/go-gitea/gitea/issues/3226

same problem using kubernetes and configmaps, config files should not be used to save any kind of state

@xoxys @strk
Any updates? We are unfortunately blocked on this and we're unable to add Gitea as a Helm chart to Kubernetes since it's trying to write to app.ini... Despite app.ini only used for configuration, INTERNAL_TOKEN is being updated within in.
See errors: https://storage.googleapis.com/kubernetes-jenkins/pr-logs/pull/charts/3408/pull-charts-e2e/7056/build-log.txt
Also our Helm chart PR here: https://github.com/kubernetes/charts/pull/3408

ping @lafriks

Specifically:
I0326 19:50:47.406] ---Logs from container gitea in pod gitea-7056-1-gitea-5f94847576-krj5q:---
I0326 19:50:47.658] Generating /data/ssh/ssh_host_ed25519_key...
I0326 19:50:47.659] chown: /data/gitea/conf/app.ini: Read-only file system
I0326 19:50:47.659] Mar 26 19:32:40 syslogd started: BusyBox v1.26.2
I0326 19:50:47.659] Generating /data/ssh/ssh_host_rsa_key...
I0326 19:50:47.659] Generating /data/ssh/ssh_host_dsa_key...
I0326 19:50:47.660] Generating /data/ssh/ssh_host_ecdsa_key...
I0326 19:50:47.660] /etc/ssh/sshd_config line 32: Deprecated option UsePrivilegeSeparation
I0326 19:50:47.660] Mar 26 19:32:40 sshd[14]: Server listening on :: port 22.
I0326 19:50:47.660] Mar 26 19:32:40 sshd[14]: Server listening on <IP_ADDRESS> port 22.
I0326 19:50:47.661] 2018/03/26 19:32:40 [...s/setting/setting.go:924 NewContext()] [E] Error saving generated JWT Secret to custom config: open /data/gitea/conf/app.ini: read-only file system
I0326 19:50:47.661] chown: /data/gitea/conf/app.ini: Read-only file system
I0326 19:50:47.661] 2018/03/26 19:32:41 [...s/setting/setting.go:924 NewContext()] [E] Error saving generated JWT Secret to custom config: open /data/gitea/conf/app.ini: read-only file system
I0326 19:50:47.662] chown: /data/gitea/conf/app.ini: Read-only file system
I0326 19:50:47.662] 2018/03/26 19:32:42 [...s/setting/setting.go:924 NewContext()] [E] Error saving generated JWT Secret to custom config: open /data/gitea/conf/app.ini: read-only file system
I0326 19:50:47.662] chown: /data/gitea/conf/app.ini: Read-only file system

Which is causing the issue (Gitea is trying to write to app.ini when it shouldn't..)

I guess any update would be mentioned here.
Your best bet is providing a pull request

@cdrage you can pregenerate token and other values using gitea cli command generate that was added in 1.4.0 (see https://docs.gitea.io/en-us/command-line/)

Hi @cdrage! I am very much interested in deploying Gitea with a k8s Chart. If you need any help (testing, review, code, ...), don't hesitate to ping me :)

@Nodraak There's already a PR: https://github.com/kubernetes/charts/pull/3408 but we're blocked on this issue :+1:

Maybe put that on a file like pid? @cdrage the INTERNAL_TOKEN token will be shared by gitea web and gitea hook processes. So I don't think a memory shared is enough. Any idea?

@lunny Yeah, anything else preferably, pid would probably do. The code: https://github.com/go-gitea/gitea/blob/96c268c0fcc22604103f67821d66fef39944e80b/modules/setting/setting.go#L924 shows that INTERNAL_TOKEN is actually the only variable that it set within the configuration, no other environment variables are set / modify the configuration file after launching.
Alternatively (as a hack, for now) we could set the internal token as part of the configMap within Kubernetes (before launching). But then again.. it would be nice to have it automatically generated instead.
Anyways! I'll try to push a PR this/next week.

TL;DR: for internal gitea calls, why not call the function directly, instead of using an HTTP api?

Reading again this thread, I have some trouble understanding the utility of INTERNAL_TOKEN.
Correct me if I'm wrong, but from what I have understood:

If the config file contains INTERNAL_TOKEN, gitea works fine (when deployed bare metal or with kubernetes)
If the config file does not contain INTERNAL_TOKEN, gitea will try to write one to the config file, which will fail when deployed with kubernetes (why? does k8s changes the file permissions? or is the problem when k8s deploys a new version which overwrite the token?)
If the values of the token is changed, gitea is broken. (why? If we restart gitea, it should read the token again from the file, shouldnt it?)
This INTERNAL_TOKEN seems to be used only in this function:
https://github.com/go-gitea/gitea/blob/96c268c0fcc22604103f67821d66fef39944e80b/routers/private/internal.go#L18-L24
Which is used here:
https://github.com/go-gitea/gitea/blob/96c268c0fcc22604103f67821d66fef39944e80b/routers/private/internal.go#L39-L48
I guess the goal is to verify if the call comes from gitea itself or from outside. Then for internal gitea calls, why not call the function directly, instead of using an HTTP api?
For example, the HTTP route /ssh/:id/update is used here:
https://github.com/go-gitea/gitea/blob/96c268c0fcc22604103f67821d66fef39944e80b/modules/private/internal.go#L53-L70
Then, instead of reqURL := setting.LocalURL + fmt.Sprintf("api/internal/ssh/%d/update", keyID) and newInternalRequest(reqURL, "POST"), why not do UpdatePublicKey(keyID)?

I've played a little with the code, and managed to substitute the calls (replace HTTP requests by function calls) and to remove all references to INTERNAL_TOKEN. I have not tested extensively, but all the tests passes.
I won't submit a PR yet, but please have a look at my two commits (the most relevant is commit https://github.com/Nodraak/gitea/commit/c20afe9e0a571e4b5cacd645ccdacbb52068da2a "Substitute calls") and if they solve properly this issue, I can open a PR. I am not aware of all the trade-off of gitea, so I probably missed something.

@ cdrage: I did have seen that you planned to work on a PR, sorry for "stealing" your work. I just tried to naively implement my idea :)

@Nodraak what you have removed whas specially made so that ssh process would not need to create database connection that update data as this totally break sqlite3 db backend (sqlite can have only single connection that updates data)

Ahah, so that was what I missed.  Anyway.
So, if I understand correctly, concurrent write access and timeouts are handled by the HTTP protocol (I guess gitea has only one webserver, so there can be only one access to the DB), instead of directly by the database. I don't see why this is a better solution, IMO it adds a lot of complexity (due to indirect calls). Moreover, sqlite support concurrent write acces: the transaction will retry until the DB is unlock or the timeout expires. By default the timeout is 0 so any concurrent write will immediatly return Error: database is locked, but with _busy_timeout one can set an appropriate timeout, for instance a few seconds. (the parameter _busy_timeout is passed when opening the connection)

@Nodraak internal calls is planned to increase most probably if we want to support clustering of some kind

As for sqlite locking it is a bit more difficult because we use xorm and also there is GoLang layer not directly c calls

Two benefit for this change from both gitea web and gitea hook connected to mysql or sqlite. One is to resolve sqlite share write problem. Another is SSH could be deployed different machine from web in future.

Did anyone else happen to start work on this recently? This is still blocking us from deploying Gitea to Kubernetes: https://github.com/kubernetes/charts/pull/3408
@lafriks @Nodraak

Hi
Sadly I could not take a look. For now my priorities have changed and I can't say if I will have the time to work on this issue in the future

We could create a single file on data/internal/lock to share between multiple processes?

@cdrage Is this indeed blocking? There have been others who have deployed Gitea to kubernetes

https://medium.com/google-cloud/kubernetes-110-your-first-deployment-bf123c1d3f8
https://www.presslabs.com/blog/sftp-gitea/

While I certainly have been able to work around the INTERNAL_TOKEN issue myself in Puppet and elsewhere in automation, the workarounds are less than ideal.  It makes life difficult to manage Gitea settings while Gitea is modifying the settings file that I'm laying down through automation.  The applications tend to fight each other.  While this may not be critical, it is definitely a fairly large hiccup.
Thank you to anyone who has the time to look into this and place a PR!  You would be my savior, that's for sure.  ;-)

@techknowlogick Yes. You're unable to create a ConfigMap for the app.ini settings. If you go by the links you posted, it's using volumes for configuration management, rather than the better way of using ConfigMaps (more Kubernetes-esque).
@minoru7 What was your work-around?

@cdrage Well, for Puppet, I have the configuration file being laid down only if it doesn't already exist.  Which, that's fine for a new system, but defeats the purpose of Puppet and continuous configuration.  If I make a change to the configuration, which happens on occasion, I have to manually delete the app.ini to have it take effect.  As for Kubernetes, I haven't had enough time yet to start digging into that, so unfortunately, I don't have any help for you there, sorry.

@minoru7 Thanks!
That helps, since it's the exact same issue as when deploying to Kubernetes. Since app.ini should be immutable, it's difficult to have continuous configuration with INTERNAL_TOKEN making changes to the app.ini file.
So essentially it's also blocking any Puppet deployment too.

Could INTERNAL_TOKEN be set when first set up?

@lunny I believe, last I remember, that it was linked to the daemon or somesuch.  The INTERNAL_TOKEN value changes upon each restart of the service.  So that's why my original request mentioned maybe adding this to a pid file or something instead.

The only one place to change the token is https://github.com/go-gitea/gitea/blob/master/modules/setting/setting.go#L918 when INTERNAL_TOKEN  is empty. If it is changed each restart that maybe a bug.

And in fact we can generate it via https://github.com/go-gitea/gitea/blob/96c268c0fcc22604103f67821d66fef39944e80b/cmd/generate.go#L55 gitea generate

Yeah. The problem is that on each restart, a new token is generated. If you decide to set one yourself at start-up (providing INTERNAL_TOKEN to app.ini) the service will run into an error of trying to modify app.ini despite it already being set (see my above comments for the log)

OK. I will investigate it.

So, as far as I can see, the code should only generate this token if it does not exist. Is this still an issue?

I'm using version 1.3.2.  Last time I attempted it, I generated a token and inserted it into the ini file.  When I restarted the service it overwrote my InternalToken with a newly generated one, which then threw Puppet into overwriting it, which restarts the service, which Puppet then overwrites again.  It was a bad situation.  Not only that, but if I'm rolling out a few of these servers, I want to be able to automate that Token generation in that case.  Or otherwise, the best scenario would be to take the Token out of the config file that Puppet would need to manage.  I have not attempted a newer version of Gitea, so maybe you guys have sorted out my original issue?  I'll give it a try soon when time permits.

I think the real problem is that internal token should not change and I can't find why it should in the code.
The PR https://github.com/go-gitea/gitea/pull/3531 should have introduced all the needed generator to provide a valid and stable configuration.

In fact I like @sapk's idea.


Introduce --root-dir

Related to https://github.com/lycheeverse/lychee/issues/452#issuecomment-1892863035
I tried a couple of more ambitious refactoring, but they kept spiraling out of (my) control, so tried to keep it minimal.

Also, I don't understand the (remaining) CI failures if you could give some hint, thanks!

Hey @trask,
this is a very solid attempt and a very long-standing issue of the project, so thanks a lot for looking into that!
I haven't checked all the edge-cases yet, but I think you're on the right track.
However, I wonder if it supports setting base-url and root-path at the same time? They serve a different purpose: base-url is used for relative URLs, while --root-path is used for absolute URLs. Setting both at the same time is expected to be a common scenario.
I've added an explanation to the section in the code that seemed the most relevant.
On another note, we could use the opportunity and deprecate --offline at the same time.
See https://github.com/lycheeverse/lychee/issues/668 for more information.
In order to deprecate it, we should add a warning message when it's used and update the help message accordingly to
point people to the new --root-path option.
We can also add a note in the README about the deprecation and create a pull request to update the documentation
at https://github.com/lycheeverse/lycheeverse.github.io.
But we don't have to do that in one go. Let's take it step by step.

Thanks for the feedback! I've incorporated your suggestions.

About the linter errors: you can run clippy locally with make lint. It should give you the same output.

About the linter errors: you can run clippy locally with make lint. It should give you the same output.

yay it's green! 💚

Just tested it locally and it works as expected. Good work! 🥳
@norswap, @dkarlovi, @vanbroup, @george-gca, can any of you test this version and provide some feedback? Does it cover your use-cases? 🙏
You can install this lychee version with
cargo install --git https://github.com/trask/lychee --branch root-path

And then it should be the first thing in your $PATH or you use the absolute path.
E.g. for me
> which lychee
/Users/mendler/.cargo/bin/lychee

Then you can just test as normal.
Question to the group: shall we name the option --root-dir instead of --root-path to express that we always expect a directory here? A path could also refer to a file, and that's an invalid input.
Oh and @trask, let me know if you'd like to deprecate --offline in this pull request as mentioned earlier or if we should do that in a separate PR. Whatever you prefer.

Question to the group: shall we name the option --root-dir instead of --root-path to express that we always expect a directory here? A path could also refer to a file, and that's an invalid input.

--root-dir makes sense to me
--root-dir and --base-dir are very close, do you still think it makes sense to change --base-dir to --base-url?

Oh and @trask, let me know if you'd like to deprecate --offline in this pull request as mentioned earlier or if we should do that in a separate PR. Whatever you prefer.

sure, I'd prefer to do this in a follow-up PR.

Renamed --root-path to --root-dir

@george-gca, any updates? Did you find the time to give it a try?

Code-wise it looks good. But now I'm confused about its usage.
When I'm in the fixtures directory I do:
$ cargo run -- resolve_paths_from_root_dir/ --root-dir resolve_paths_from_root_dir/

Issues found in 1 input. Find details below.

[resolve_paths_from_root_dir/nested/index.html]:
   [ERROR] file:///home/thomas/Projects/lychee/fixtures/resolve_paths_from_root_dir/nested/resolve_paths_from_root_dir/nested/about/index.html#missing | Cannot find file
   [ERROR] file:///home/thomas/Projects/lychee/fixtures/resolve_paths_from_root_dir/nested/resolve_paths_from_root_dir/nested/about/index.html#fragment | Cannot find file
   [ERROR] file:///home/thomas/Projects/lychee/fixtures/resolve_paths_from_root_dir/nested/resolve_paths_from_root_dir/nested/another%20page | Cannot find file
   [ERROR] file:///home/thomas/Projects/lychee/fixtures/resolve_paths_from_root_dir/nested/resolve_paths_from_root_dir/nested | Cannot find file
   [ERROR] file:///home/thomas/Projects/lychee/fixtures/resolve_paths_from_root_dir/nested/resolve_paths_from_root_dir/nested/about | Cannot find file

🔍 7 Total (in 0s) ✅ 2 OK 🚫 5 Errors

But:
$ cargo run -- resolve_paths_from_root_dir/ --root-dir ..

🔍 7 Total (in 0s) ✅ 7 OK 🚫 0 Errors

Why isn't the first one working? Why is the second working?

@trask Why isn't the first one working? Why is the second working?

relative --root-dir paths are definitely odd (and not covered currently by the cli.rs tests)
--root-dir is prepended to all absolute local links
and so when --root-dir is a relative path, it effectively turns absolute local links into relative links
e.g. running

cargo run -- resolve_paths_from_root_dir/ --root-dir resolve_paths_from_root_dir/

turns the absolute local link /nested into a relative link resolve_paths_from_root_dir/nested which get resolved against the html file's directory and results in file:///home/thomas/Projects/lychee/fixtures/resolve_paths_from_root_dir/nested/resolve_paths_from_root_dir/nested
and running

cargo run -- resolve_paths_from_root_dir/ --root-dir ..

turns the absolute local link /nested into a relative link ../nested which get resolved against the html file's directory and results in file:///home/thomas/Projects/lychee/fixtures/resolve_paths_from_root_dir/nested
It probably makes more sense to resolve relative --root-dir into an absolute dir, I'll give this a try...

An alternative would be to prevent relative links by throwing an error. It would be simpler to implement while avoiding ambiguity and unwanted side effects.
The help text would need to be updated to indicate that an absolute directory is expected.

done!

@thomas-zahner, what do you think? Can you try it again?

Wouldn't it be better to accept both absolute and relative path, and handle them internally? Maybe doing something like suggested in these answers on stackoverflow? One uses PathBuf itself, the other would add a new dependency.

@mre would this be useful for my case?

Ah, sorry. It's not applicable for your case because you have a more complex routing setup. root-dir is only if you want to prepend an absolute path before a relative link.

Just tested it locally and it works as expected. Good work! 🥳
@norswap, @dkarlovi, @vanbroup, @george-gca, can any of you test this version and provide some feedback? Does it cover your use-cases? 🙏

Unfortunately I haven't been at the company at which we were using this for more than one year now :') They've also moved the specs this was to be used on, so it's hard to say.

@trask Awesome, thank you :+1:
From my side this looks good @mre


editor droppings trigger cosmos

cosmos tries to load foo.jsx~ (note tilde) and then reports on it containing something with a file extension it cannot interpret. That's not a surprise as it's an Emacs editor dropping.
I'd be nice if Cosmos only tried to auto-load files that are valid extensions (.js, .jsx) in fixtures, and just ignored the other ones. Or alternatively if I had a way to configure it to ignore particular file patterns entirely, i.e. *~.
Note that emacs creates a tilde file as soon as you start typing, and it was kind of surprising to see cosmos jump into action even though I hadn't saved yet. For a moment I was "how does it even know? is hot loader that magical?" until I realized what was going on. :)

I managed to reproduce and find the source of the problem, but I don't have a solution yet.
When we require the component class for a fixture, webpack creates a dynamic require context for all files from the components folder. It the require were require('components/' + componentName + '.jsx') we wouldn't have this problem, but some React components (namely ES6 classes) use .js extensions, and I can't think of a way to fit a .jsx? regexp in this require statement.
We could create a context by hand, like requireComponent = require.context('components', true, /\.jsx?$/), but then we'd have to append the component file extension when we do requireComponent(componentName), because for some reason resolve extensions don't apply to context requires. So this doesn't work either.
Any ideas?

This was probably solved by the latest changes. In any case, it can be improved by customizing get-component-fixture-tree.js. Check out the new docs: https://github.com/skidding/cosmos/tree/master/webpack-boilerplate/react-0.13

@faassen this patch should be a fix for your problem: https://github.com/skidding/cosmos/pull/180


Change two-fer exercise to use named exports

Issue: https://github.com/exercism/javascript/issues/436
You are expected to change the export from default to named. Files to be changed: code and test
Refer to the PRs linked to above issue and the official docs as required.

I would like to work on this

@ivanuy This has been fixed. Please feel free to pick other issues - especially https://github.com/exercism/javascript/issues/480 where there are lot of exercises to be fixed - you can pick any exercise and send a PR. Thanks.


DSND-2900: Accept negative value for items per page

Implement change to processor to make items per page an absolute value
Required to follow how the Perl processes the endpoint

Describe the changes
Related Jira tickets
DSND-2900
Developer check list
General

[x] Is the PR as small as it can be?
[x] Has the Jira ticket been updated with any relevant comments?
[x] Is the README up to date?
[x] Has the POM been updated for the latest versions of dependencies?
[x] Has the code been double-checked against main?
[x] Does the code adhere standards in this repository, including SonarQube checks?

Testing

[x] Do the code changes have unit and integration tests with code coverage > 80%?
[x] Has the code been tested locally and/or passed the API Karate tests on Tilt?
[ ] Have mandatory manual test cases been run?
[ ] Are extra Karate tests required?
[x] Are all the test data resources up to date?

Release preparation
Where possible, add links to the respective Jira tickets when an item is checked

[x] Have these changes been included in a release ticket?
[ ] Are changes required to the docker-chs-development deployment or test data?
[ ] Are any changes required to the environment added to deployment repositories?

Notes to the tester
Add any testing hints or instructions here.

CI: No security warnings found


is the crops really help improving performance?

@akhilpm Hi, thanks for shairng the code, we tried simply set the  confidence threshold of selecting the crop to 1.0, thus no crop is maintained and only original image is used, but the performance is very close to that of using crops as the default model of the paper. has anyone came across this situation?

@twangnh Thank you for your interest in our work.
This is discussed in #44. Please refer to it.
Akhil


Add swagger documentation for getTestByVersionInfo API #552.

Fixes #552

ECA check failing, trying to validate against<EMAIL_ADDRESS>(that email needs to be both the one used for the Eclipse profile and the one associated with the github commit.


fix: batch update categories

fix #184
Now we're able to save a list of categories without any errors.
I replaced the original 'Save' with 'Updates' because the former wasn't able to handle 'create_time' and 'update_time' properly, even if they were manually specified. It required more SQL statements to execute, but the result is definitely worth it.

Is it a better choice to find out all the data in batches, then update the data fields found, and then save?

Is it a better choice to find out all the data in batches, then update the data fields found, and then save?

Writing like this is not elegant，However, it can reduce the number of times to execute sql.
I don't know which of the two methods to choose. What's your opinion

Is it a better choice to find out all the data in batches, then update the data fields found, and then save?

I don't think this is the best option. Like you mentioned, the code is not elegant. Generally, users don't update categories frequently and there aren't too many categories. It has little impact on performance so we don't need to write complex code to optimize it.
I also tried finding other ways to reduce the sql statement, but they either difficult to maintain or too complex. If you have any better ideas, please let me know!

I think you are right

Please use rebase instead of merge

Done👌


Actor parent

Hi there,
I'm trying to create some actor hierarchies.
Let's assume that we have two actors selected and you want to set the parent_actor as parent to the child_actor. I've tried the following but it gives me an error "uobject is not a UMaterialInstanceConstant"
import unreal_engine
child_actor = unreal_engine.editor_get_selected_actors()[0]
parent_actor = unreal_engine.editor_get_selected_actors()[1]
child_actor.set_parent(parent_actor)

I then tried to manually link the two actors in the Editor and then tried to read the 'children' property but it returns an empty array.
ue.log(mesh.get_property('children'))
[]

Any ideas? thanks

Hi, set_parent() is for materials (unfortunate naming ;) you have to use
'''py
object1.attach_to_actor(object2)
'''

Oh, I usually do that by dragging, didn't know that it's called "attach" in Unreal! Cheers, worked fine! :) You can close the issue.

quick question: I can't get the Actor's parent. The GetAttachParentActor is missing and the only way I found to get the parent, is by going through the Root Component. This doesn't return an Actor though, it returns the parent's Root Component
child_actor.RootComponent.GetAttachParent()

Am I missing something?


add missing french doc

To do

[ ] CRON jobs
[ ] Getting started
[ ] Tips/troubleshooting

Closing as no longer relevant due to new docs portal :)


Named wildcard params

Wildcard patterns aren't very useful without ability to actually retrieve them, i.e. with chi.UrlParam.
Maybe we can use the following pattern syntax for this:
/my/url/*param1
and retrieve it later with chi.UrlParam("param1").
This won't break any existing code as chi doesn't do any check after * symbol, i.e. with pattern set to qwe*iop both qwe1iop and qwedsf are wired to the handler.

why not just use, /my/url:param1 then?

i.e. your parameter contains slashes, i.e. it's a storage key:
/storage/folderID/userID/somekey
and you don't want to hard-code key format, a wildcard is a nice choice, but there's no way to get the matched parameter other than getting full request path, stripping everything and etc.
That would also require handler to know the prefix to strip off, and it somewhat breaks the abstraction of an app.
Named wildcard params, if possible, would solve this.
The proposed syntax (/*param) is the same in Rails, for example.

yea I agree with you.. I think a better solution is to change from :param syntax to {param} which would solve the delimiter problem and you can place them anywhere on the route.

If syntax is {param}, then how would these patterns be handled?
Pattern 1: /{param} // can match both /someparam and /someparam/something/something
Pattern 2: /{param}/{param2} // ??
IMO, wildcards would be simpler to implement and to understand.

submit a PR then :) but, make sure you also include before/after benchmarks

this isn't something I have time for anytime soon, but I'd love some help from other users to keep making chi better.

Turns out it's already implemented here.
Perhaps it's worth to add it to documentation :)

For anyone else looking for how to get the matched path part, the variable is named *:
thing := chi.URLParam(r, "*")


Fix #741: navigation bar moves to right on click of heart icon

First thing, PLEASE READ THIS: ReactPlay Code Review Checklist

Description
In the homepage, while clicking on the heart icon in the navigation bar, the navigation bar moves right.
Fixes #741
Type of change
Please delete options that are not relevant.

[x] Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?
Tested in local environment in cypress.
Checklist:

[x] I have performed a self-review of my own code
[x] My changes generate no new warnings
[x] New and existing unit tests pass locally with my changes

Hello @kd100100 , Thanks for the PR, Can you attach some screenshots or screen recordings?

nav-error-recording.webm

@atapas @koustov Could you please review this?

Hello @kd100100 , Thanks for the PR, Can you attach some screenshots or screen recordings?

nav-error-recording.webm

@kd100100 , Can you share the recording for the fix?

Hello @kd100100 , Thanks for the PR, Can you attach some screenshots or screen recordings?

nav-error-recording.webm

@kd100100 , Can you share the recording for the fix?

@Sachin-chaurasiya Here is the recording of the fix.
fixed-nav-error-recording.webm

Hello @kd100100 , Thanks for the PR, Can you attach some screenshots or screen recordings?

nav-error-recording.webm

@kd100100 , Can you share the recording for the fix?

@Sachin-chaurasiya Here is the recording of the fix.
fixed-nav-error-recording.webm

Thanks @kd100100

I have verified on the live site and it's working fine. can you double-check is this issue exists?
Screen.Recording.2022-10-26.at.10.07.07.PM.mov

@Sachin-chaurasiya Just found out that this issue occurs when connected to external mouse. Please check connecting to an external mouse.

@kd100100 , Can you address the comments?

Closing this PR as the issue is not reproducible.


Setup ssl-protocol=any by default and add ssl-errors option

Add ignore ssl errors and set ssl-protocol=any by default

Since 1.9.8 the default SSL protocol is now tlsv1 not sslv3. This is more secure than any. See ariya/phantomjs#12655.
I like the other fix if you back out any.

ok, I've updated PR.
Look, please.

Did you forget to push? Still only 1 commit.

No, I've updated current commit :)

FYI if you ever need to provide additional phantom args, phantomjs lib/mocha-phantomjs.coffee <page> <reporter> <config> is something we support (semver wise)

Up. Now ignore-ssl-errors is boolean.

mocha-phantomjs 4.0.0 now passes all unknown options along to phantomjs.


Fix export onyx state not working

Details

The export onyx state reads the database and we specify the version to 1, but the version could be higher. This PR fix it by removing the version params so it just opens the active database.
Fixed Issues

$ https://github.com/Expensify/App/issues/45232
PROPOSAL: https://github.com/Expensify/App/issues/45232#issuecomment-2222258231
Tests

Same as QA Steps

[x] Verify that no errors appear in the JS console

Offline tests

Same as QA Steps
QA Steps

Open Settings > Troubleshoot
Press Export Onyx state
Verify a file will be downloaded

Note: On Android, the app will ask to share the file

[x] Verify that no errors appear in the JS console

PR Author Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for the expected offline behavior in the Offline steps section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[x] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

[x] Android: Native
[x] Android: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[x] MacOS: Desktop

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[x] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] I verified that if a function's arguments changed that all usages have also been updated correctly
[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[x] If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:

[x] I verified that all the inputs inside a form are aligned with each other.
[x] I added Design label and/or tagged @Expensify/design so the design team can review the changes.

[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native

https://github.com/Expensify/App/assets/50919443/7d69a821-a94a-4e51-8120-8def348702bd

Android: mWeb Chrome

https://github.com/Expensify/App/assets/50919443/f9309522-e678-47f7-8cb1-84bd72a05398

iOS: Native

https://github.com/Expensify/App/assets/50919443/468261ce-0130-4ffd-ad17-f5985a3b20ed

iOS: mWeb Safari

https://github.com/Expensify/App/assets/50919443/9ac57dfd-a1c5-461c-9e0d-42b989284c46

MacOS: Chrome / Safari

https://github.com/Expensify/App/assets/50919443/09547cfb-a420-435a-aefd-27af66563fef

MacOS: Desktop

https://github.com/Expensify/App/assets/50919443/81bd5781-df89-4629-b1de-396f5097bc64

🚀 Deployed to staging by https://github.com/techievivek in version: 9.0.7-3 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Cherry-picked to staging by https://github.com/thienlnam in version: 9.0.7-4 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
failure ❌

🕸 web 🕸
success ✅

@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes.

🚀 Deployed to production by https://github.com/thienlnam in version: 9.0.7-8 🚀

platform
result

🤖 android 🤖
failure ❌

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
failure ❌

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/mountiny in version: 9.0.8-6 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


useUtc: true not working with customDateAdapter

Reproduction
Use StackBlitz to reproduce your issue:

Components: https://stackblitz.com/edit/angular-moment-date-adapter-overriding-h6zeds?file=main.ts

Steps to reproduce:

Change your system timezone so that there is a difference of atleast 1 day.
Observe the date shown is not the same as provided i.e '2020-11-30T00:00:00Z';
Now go to main.js and change the useClass for DateAdapter to MomentDateAdapter.
Observe that the date is changed to 11/30/2020;

Expected Behavior
What behavior were you expecting to see?
when we pass useUtc as true while using a custom date adapter it should work as expected.
Actual Behavior
What behavior did you actually see?
useUtc does not work when we extend MomentDateAdapter and make a custom one.
Environment

Angular: 7
CDK/Material: ^7.3.4
Browser(s): Chrome
Operating System (e.g. Windows, macOS, Ubuntu):  Windows

useUtc is implemented at the date adapter level so it's your responsibility to account for it in your custom adapter. You can see how it is being handled in the existing MomentDateAdapter. https://github.com/angular/components/blob/master/src/material-moment-adapter/adapter/moment-date-adapter.ts


TestGraphEditor.testShowSaltExample times out

Describe the bug
On a new machine, with a fresh clone of hexatomic, the integration tests fail with the following trace on mvn clean install.
Running org.corpus_tools.hexatomic.it.tests.TestGraphEditor
Tests run: 4, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 9.776 s <<< FAILURE! - in org.corpus_tools.hexatomic.it.tests.TestGraphEditor
testShowSaltExample  Time elapsed: 5.629 s  <<< ERROR!
org.eclipse.swtbot.swt.finder.widgets.TimeoutException: Timeout after: 5000 ms.: Viewport location Point(25.0, 0.0) not reached, was Point(22.0, 0.0) instead
	at org.corpus_tools.hexatomic.it.tests.TestGraphEditor.testShowSaltExample(TestGraphEditor.java:283)

Expected behavior
Tests pass with mvn clean install.
Desktop (please complete the following information):

Operating System: Ubuntu 20.04
Hexatomic Version: develop
Java Version: AdoptOpenJDK 11

Test also fails in Eclipse, it seems that zooming in doesn't work.

I get the same error from the command line with Maven, but it works when running the tests from Eclipse. I check if the locale has something to do with it.

This is in fact related to #192 and the keyboard layout issue. When executing the current code on my machine, the Shift+ gets translated to Shift=. We might have interpreted the semantics of the keyboard layout wrong and maybe it needs to be set to the actual keyboard which is present on the system and not to a static one. #127 might have been the result of an inconsistency between the display locale and the used keyboard.

Actually, using Ctrl++ as a shortcut for zooming in seems to be extremely unusable for en_US keyboards since this means they have to press the Shift modifier key as well. My suggestion would be to use the keyboard mapping as it is in develop, but use a shortcut where we are sure the key is present without modifier on as many keyboard layouts as possible.


move the badges to top and add some more

Description
Move the badges to the top and add some more badges to the top of readme.md file, since the badges will be colorful and more attractive at the top of README.md file than the text the users will like it and after linking the badges it will also help the users to navigate to different sections/ webpages like PRs, issues, contributors, etc.

Solution
I will move the badges to the top of Readme file, add some more badges and also will add links related to them so that the README.md file will look more interactive and awesome.

[ ] I will move them to the top
[ ] I will align them to the center
[ ] I will add some more badges
[ ] I will add links to the badges

Work under/as

[x] LGMSOC
[ ] Contributor

@vidhi-mody @und3fined-v01d should I work on this??

Hi @Umesh-01 there are some other high priority issues we've created. Would prefer if those are taken care of first


Link to "React Testing with MSW" is broken

Describe the bug
The following documentation on using Mock Service Worker with Vitest contains a broken link to an example.
The link points to: https://github.com/vitest-dev/vitest/tree/main/test/react-testing-lib-msw.
Reproduction
Visit https://vitest.dev/guide/mocking.html#example-3 and try to open the link to the React Example.
System Info
N/A

Used Package Manager
npm
Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guidelines.
[X] Read the docs.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
[X] The provided reproduction is a minimal reproducible example of the bug.

The link should be https://github.com/vitest-dev/vitest/tree/main/examples/react-testing-lib-msw, would you like to send a PR to fix this?

I checked it and it is fixed in main. But looks like it is not deployed.

Hey @patak-dev and @EstebanBorai I would like to do this. Can I Please?

@NaincyKumariKnoldus seems it is fixed already but not deployed, I'll publish now 👍🏼


Remove functions from global scope in cookie js

Fixed by https://github.com/nhsuk/connecting-to-services/commit/323541d53d9cc0767aec4d9ce4fac847d1d076ea


Include Linear Canonical Transform

in rsmath/rsmath we should create a module for linear canonical transforms
The set of functions for doing so defined by @dtabell can be converted into class structure as well

The notebook FastLCT.ipynb contains all functions and tests needed to get started with this task.
For now, the functions to extract are the following:

lct_abscissae
resample_signal
scale_signal
lct_fourier
chirp_multiply
lct_decomposition
apply_lct

The above notebook also implements a series of tests that can be converted to unit tests.
I am happy to discuss further—either here or in person.
Some details remain for Boaz and I to iron out, but those affect primarily some processing of the signal on input and output. We anticipate those details requiring at most minor adjustments to the above functions as presently implemented.

I don't see how to assign this task to anyone—to me or to someone else.

@dtabell -- try again. I just changed the settings so that all RadiaSoft staff have write access to this repo.

@gurhar1133 -- is this on your todo list?

@gurhar1133 -- is this on your todo list?

I can bump it up in priority 👍


Wrong Adress on Ledger Nano S with Advanced Passphrase

When i connect with my ledger device my testnet address on device same as shown on my account, but when i activate 25. word passphrase account with pin on my ledger testnet address is different with dex account shown one.
Reproduce:

Plug Ledger nano s
Unlock with pin
Open Settings Menu
Enter Security sub-menu
Select Passphrase
Choose Attach to a PIN option from the Passphrase menu in the device security settings.
Create a secondary PIN code.
Re-enter the secondary PIN code to confirm it.
Choose and confirm a secret passphrase (max 100 characters)
Enter your primary PIN code to validate.
Turn off the device and enter your secondary PIN code to access the passphrase-protected accounts.
Open Binance Chain App on Ledger nano s device
Enter Binance.Dex
Activate wallet with ledger nano s device
Open your address on ledger nano s device
Select testnet
Click Account Photo on Binance.Dex
Compare address on Ledger nano s device with Binance.Dex

Device Firmware : 1.5.5
Binance Chain App version: 1.0.0
Binance Support ticket number: 1303526
its include video

Thank you, this is a known issue with the old build. We are waiting for a new deployment to Ledger Live to update the address display.

Fixed in v1.0.2


Unresolved conflict between rules as applied to StyleCopAnalyzers

Currently StyleCop.Analyzers has several fields named _supportedDiagnostics. Warning SA1309 (FieldNamesMustNotBeginWithUnderscore) is reported for these fields. If the code fix for SA1309 is applied, each of these fields is renamed to supportedDiagnostics, which does not cause any errors. However, since each of these fields is marked static readonly, the new name results in warning SA1311 (StaticReadonlyFieldsMustBeginWithUpperCaseLetter) getting reported. If the code fix for this rule is applied, the new name of the field is SupportedDiagnostics. This name conflicts with the existing property name SupportedDiagnostics.
This issue is currently open for discussions regarding potential solutions for addressing this situation now as well as a policy for handling similar naming conflicts in the future.

@pdelvo @macpak Please feel free to add descriptions of possible solutions. We'll discuss them all and decide which one to go with. :+1:

Possible solution: Suppress warnings
In situations like this, SA1311 could be suppressed through the use of a #pragma directive or the SuppressMessage attribute.
Advantages:

This allows the field name to clearly represent its relation to the property with the same name (with the exception of the case of the first letter)

Disadvantages:

It means we are not following StyleCop rules within a project that implements StyleCop rules
It makes the code ugly
It means there is more work involved with developing the code, and maintenance costs may rise since otherwise simple operations like renaming a variable involve examining the warning suppressions associated with that variable

Possible solution: Getter-only auto-property with inline initializer
Example:
Before:
private static readonly ImmutableArray<DiagnosticDescriptor> supportedDiagnostics =
    ImmutableArray.Create(Descriptor);

public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
{
    get
    {
        return supportedDiagnostics;
    }
}

After:
public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
{
    get;
} = ImmutableArray.Create(Descriptor);

Advantages:

Eliminates the problem and provides even tighter association of the underlying value with the property that exposes it
Does not result in any additional runtime overhead, unlike some other options like eliminating the cached variable or expression-bodied members

Disadvantages:

Might not increase readability
Does not provide a general solution or guidance for users who face this problem in the future
Relies on a C# 6 feature, so isn't even usable as a solution for users working with earlier versions of C#

It would seem like multiple runs would need to be done when doing the code fix.  Somehow SA1309 would need to know it could trigger SA1311.  After SA1309 is done, it could run the process again and see if SA1311 was triggered on the same line.  In this case, it could either reverse the last fix and offer to redo it with a suffix on the field, or just quit and let the user know of the "future" conflict.

Possible solution: Update SA1311 to ignore these cases
SA1311 could be updated to identify cases where a field someName and property SomeName which exposes the field exist in the same class. The "exposes the field" determination could either be an assumption (assume that if the field and property exist, that a reasonable user would have implemented the property specifically to expose the field), or it could be based on semantic analysis of the property getter to see if it actually ends with return this.someName; (or return someName;).
Advantages

Addresses concerns for users with C# 6 as well as with previous versions without requiring code changes or suppressing warnings

Disadvantages

Likely conflicts with original StyleCop behavior
Potentially defeats one of the consistency goals of StyleCop

Possible solution: Change to instance field
If the private static readonly fields were changed to private readonly fields, the naming rules would enforce the use of a lowercase letter instead of an uppercase letter.
Advantages

Easy, low-maintenance change
Arguably makes sense since the exposed property is also an instance member

Disadvantages

Requires additional allocations if the enclosing type is instantiated multiple times
Does not provide guidance if the exposing property is static

This is a major issue, responsible for hundreds of warnings in the current build (all of them except one in fact).

I like the solution to update SA1311 to ignore these cases. I would not try to use static analysis to check if the field is actually a backing field because you might have cases where you have multiple return statements. E.g. Return some default value if the field is not initialized. Or return a copy of the field or maybe an immutable version.

I'm not particularly opposed to that, but before deviating from StyleCop on this one (in this manner) I'd like to get a wider consensus.
I was thinking about this again last night, and decided the best name for these should we decide to follow the current rule would be SomeNameValue. The code fix could even be updated to detect the existence of a conflicting member name (unlike method names this is extremely easy for fields) and change the proposal to from "Rename to 'SomeName'" to "Rename to 'SomeNameValue'" in the particular case where the field is a backing field for a property (or property-like method).

I don't think so. I like that idea. But what should happen if there is already a XValue field/property? What if the Property is valled Value? I don't think renaming to eventually FooValueValueValue is a good idea. Maybe we should not offer a diagnostic if this is the case?

If this is what we are going to do I could implement the code fix and fix the diagnostics in the project itself.

@pdelvo We won't be able to provide a solution in all cases, but it does allow us to address one particularly common case. Eventually the general solution for #436 and #437 (whatever that may be) will come into play.
I'll assign this to you for updating the existing code fix to add the Value suffix. :+1:
Don't worry about actually renaming all the fields. I'll do that when I enable the next analyzer release in this project itself. :smile:

Im going to add Value as often as needed because we send the user into rename mode anyway. I ended up using semantics for this because it was not as trivial as I thought at the beginning. A different part of a partial class, or a base type could define a member of that name.

:bulb: Keep it simple to start with, because there's a pretty high likelihood I'll at least want to discuss the possibility of changes to the algorithm prior to a merge (even if we go with the original implementation at the end).

I was away for some time, but I see that you agreed on the solution :) Good job :+1:

I think this issue can be closed


Operation request: Disassemble shellcode

Request to add an operation which would perform disassembly on input bytes.
E.g.:
from base64
from gzip
disassemble

Hi @schrodyn,
A shellcode disassembler for x86, x64, ARM etc. is something that has been on the 'To Do' list for a while.  I've done some research into what's already available and open sourced as far as client-side JavaScript is concerned and this is what I've found:

Capstone.js

This seems to be the most comprehensive JavaScript solution and supports a good selection of different architectures. The main issue is its size. The minified version is 4.84MB at the time of writing this, which is a bit much to ask everyone to download when only a handful will actually use those operations (see Design Principals for an explanation of this). For context, the whole of CyberChef is currently around 2MB so that's quite a big size hit. Even if we stripped Capstone down to just support x86 it still comes in at 1.8MB.

X86-64-Disassembler-JS

This is much smaller (302KB before it's even been minified), however it would need some work before it could be incorporated into a large project as it is all declared at the global scope with no identifier encapsulation. It also only supports x86 and x64, but that isn't too bad to start off with. I'd be concerned that it's not a particularly active project though so I doubt any further architectures will be incorporated in future.

Other solutions not written in JavaScript include ODA which makes AJAX requests to a server-side API. This doesn't appear to be open source but I'd be happy to be proven wrong.
If anyone else has any thoughts on this we'd like to hear them. The other option is to just start from scratch, but this feels like a fairly comprehensive project in its own right and probably shouldn't live inside the CyberChef repository.

Since you mentionned ODA, there is also https://github.com/radare/radare2/ via r2pipe, could even get graphs etc. from it see https://github.com/radare/radare2-r2pipe see https://github.com/radare/radare2-r2pipe/tree/master/nodejs


[sui-indexer]http rpc parse Error("invalid array length 20, expecting 32", line: 1, column: 181)

Steps to Reproduce Issue

use the main branch run sui with sui-indexer
the indexer got error message

Indexer failed to read fullnode with error: `Failed reading transaction response with tx digest TransactionDigest(weVNn3je57miFca5HHC7scMP6m2XBHe4gm7aRGWMmDr) and err: RpcError(ParseError(Error("invalid array length 20, expecting 32", line: 1, column: 181)))`

Expected Result
Expected http api parse success.
System Information

OS: ubuntu20.4
Compiler: cargo 1.65

Is working now.


add metadata to stats api call also for micro api

As per https://github.com/nats-io/nats-architecture-and-design/pull/205#issuecomment-1467820995


Hide the scroller of VirtualScroll

Hi,
First of all thanks for the great tool. It super easy for use and it is working very smooth. However I have problem with hiding the scroller of VirtualScroll can you give me some advices ?
I'm using it like this:
<VirtualScroll
  width={867}
  height={600}
  rowsCount={productNodes.length}
  rowHeight={300}
  overscanRowsCount={2}
  rowRenderer={
  index => productNodes[index]
}
/>

I'm not sure I understand what you mean. Hide the scrollbar? This can be done by CSS, no?

Yes but when I try to edit the CSS to hide the scrollbar the VirtualScroller stop working.
I saw that the VirtualScroller is generating 2 div:  <div class="Grid VirtualScroll" ... > and   What i have tried is the following css:
.Grid, .VirtualScroll {
        overflow-y: hidden;
}

.Grid__innerScrollContainer {
       overflow: auto;
}

This is hiding the scroller but after that the Grid__innerScrollContainer can not be scrolled.

That's because that CSS disables scrolling. You don't want to do that. You want to hide the scrollbar (presumably?).
For that you should look at an approach more like this: https://css-tricks.com/examples/WebKitScrollbars/
I'm going to close this issue by the way since it doesn't seem actionable on my part. :)

@ghost did you end up finding a working solution?  I'm running into this issue now, and the example @bvaughn gave also appears to use overflow-y: hidden

just make your <List width={largerAbitThanWindowsWidth} .... /> will solve the issue

This is what worked for me:
::-webkit-scrollbar {
width: 0px;
}


use Random.id() instead of Meteor.uuid() for compat with meteor 1.6.1

Meteor.uuid() is no longer available and Random.id() is the suggested replacement as of http://docs.meteor.com/changelog.html#v05720130221

@artwells Can we please get this merged and a new version pushed to Atmosphere? It's a blocker for everyone using this package and wanting to upgrade to the latest version of Meteor.
I completely understand if you don't have time to maintain this project though, so perhaps adding @baursn or others as collaborators would be helpful?
p.s. Thanks for creating this package, it's been super useful for us!

@baursn let's redirect to your fork.  The community would be much better served by a more active maintainer.
Let me know how you'd like to proceed.

Ok, created new meteor package: baursn:accounts-guest based on my fork.
I think we can just redirect everyone there.


ModuleDefinition support

Hey! Trying to compile pixi and phaser definitions I stumbled upon unimplemented ModuleDefinition.
Any plans to support it soon? Any help needed?

Hello
Have been away on other priorities but can look into it.  All help is greatly needed and appreciated just let me know what you would like to do and ask questions here.
Have not looked at ModuleDefinition but we can look at it together if you would like.  That way we can improve the generator and target the specifics that you would like.
Thank you for the interest in the project.

Just to add more detail to this issue ...
The offending line in the pixi.js.d.ts is below
declare module 'pixi.js' {     export = PIXI; }
error from TsToCSharp:

Error: Unknown statement kind 'ModuleDeclaration'
at visitStatement (E:\Source\Github\mono\TsToCSharp\dist\TsToCSharpGenerator.js:41:19)
at node.getStatements.forEach.statement (E:\Source\Github\mono\TsToCSharp\dist\TsToCSharpGenerator.js:29:59)
at Array.forEach ()
at visitStatements (E:\Source\Github\mono\TsToCSharp\dist\TsToCSharpGenerator.js:29:26)
at Object.TsToCSharpGenerator (E:\Source\Github\mono\TsToCSharp\dist\TsToCSharpGenerator.js:14:5)
at sfs.forEach.astSourceFile (E:\Source\Github\mono\TsToCSharp\dist\TStoCSharp.js:38:60)
at Array.forEach ()
at genOptions.fileList.forEach.fileName (E:\Source\Github\mono\TsToCSharp\dist\TStoCSharp.js:37:21)
at Array.forEach ()
at Function.main (E:\Source\Github\mono\TsToCSharp\dist\TStoCSharp.js:31:33)


Add tests for tokenization methods

Description
Add tests for tokenization methods (no docs changed yet)
Fixes part of #100
Type of change

[x] Bug fix (non-breaking change which fixes an issue)

Checklist:

[x] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
[x] I have not rewritten tests relating to key interfaces which would affect backward compatibility

FTR: Having green unit tests in Python 8 magically installed by GH Codespaces is confusing when the GH actions then fail - the tests don't run at all in 3.7-3.9 and there is a bunch of typeguard.TypeCheckError in Python 3.10

@Aprillion I hear you about tests failing in some and not others. Maybe if you a moment, you can look into ensuring test failure on one python version don't stop the others from running.
A few comments but otherwise it's good.

I would prefer for PR's to come from named branches in the future and not from main. Merging.


Open unified-thread-pool in storage readpool

Development Task

[ ] fix all regression issues

The regression reported in #7122 comes from two parts:

Multilevel queue is not cost free.
Some cost has been reduced by tikv/yatp#37. There are still about 1% difference though.
More threads seem perform badly in point get.
The thread count is larger when using unified thread pool.


Generative AI Avatar Creation

Is your feature request related to a problem? Please describe.
In the age of digital interaction and online representation, personalized avatars play a significant role in how individuals present themselves in virtual environments, social media, gaming, and more. Creating unique and artistic representations from personal images can enhance user engagement and creativity.
Describe the solution you'd like
The Generative AI Avatar Creation Tool enables users to transform selfies into unique, artistic avatars through a simple web interface. Utilizing OpenCV for face detection, the tool accurately crops the user's face from the uploaded image. It then employs pre-trained GAN models, such as StyleGAN, to generate avatars in various artistic styles, offering customization options for different looks. The generated avatar is displayed alongside the original selfie for comparison, with options to download the final image.
Describe alternatives you've considered
Instead of GANs, VAEs could be used for avatar generation. While VAEs are generally simpler to train and can produce diverse outputs, they might not achieve the same level of detail or artistic style as GANs.
I would love to work on this issue . Kindly assign it to me under gssoc and hactoberfest

@Stuti333 Go ahead!


Big Sur 11.6: Can't create/destroy spaces

Installed Yabai from head, SIP disabled. I can move windows between work spaces and some workspace controls function as far as I can tell. I've tried uninstalling sa, installing again and reloading to no avail. Trying to run yabai -m space --create does nothing, destroying as well doesn't seem to work

Here are my space creation commands from way back that still work:
# create new space + throw + focus
shift + alt - n : yabai -m space --create \
	&& wid="$(yabai -m query --windows --window | jq -r '.id')" \
	&& sidx="$(yabai -m query --spaces --display | jq -r 'map(select(."is-native-fullscreen" == false))[-1].index')" \
	&& yabai -m window "${wid}" --space "${sidx}" \
  && yabai -m space --focus "${sidx}"

# create new space + throw app and dont focus
alt - n : yabai -m space --create \
	&& wid="$(yabai -m query --windows --window | jq -r '.id')" \
	&& sidx="$(yabai -m query --spaces --display | jq -r 'map(select(."is-native-fullscreen" == false))[-1].index')" \
	&& yabai -m window "${wid}" --space "${sidx}"

# create new space
cmd + alt - n : yabai -m space --create

# create new space and focus
lctrl + cmd - n : yabai -m space --create \
	&& sidx="$(yabai -m query --spaces --display | jq -r 'map(select(."is-native-fullscreen" == false))[-1].index')" \
  && yabai -m space --focus "${sidx}"

you gotta have jq installed so do brew install jq

I had this issue after an update (on 12.3, not 11.6 though) because I didn't:
$ sudo yabai --uninstall-sa && sudo yabai --install-sa

All of these commands work fine for me on my 11.6.1 machine.  Download the latest version and install the scripting-addition as per the wiki instructions.

I don't want no necrobump, but I use this for destroying the current space:
shift + alt - x : yabai -m space --destroy "$(yabai -m query --spaces --display | jq -r 'map(select(."has-focus" == true))[0].index')"


Upgrade from 4.2.3 to 5.0.5: no login possible

I tried to upgrade my redmine from 4.2.3 to 5.0.5.
after the start of my new Redmine 5.0.5 docker container ...it seemed all ok...db was migraded, all plugins start...
but now I can't login anymore
here are the tasks I made:

copy of the hole mariadb Database
create a new container with right setting for db
container starts successfull, all plugins start well

this procedure worked well til 4.2.3...
did I make something wrong?

Try launching without any plugins to rule out an incompatible plugin.
I personally haven't tried migrating to 5.x yet. Still running 4.2.x, i can
give it a try if that helps.
On Wed, Apr 5, 2023, 6:05 PM auc-mma @.***> wrote:

I tried to upgrade my redmine from 4.2.3 to 5.0.5.
after the start of my new Redmine 5.0.5 docker container ...it seemed all
ok...db was migraded, all plugins start...
but now I can't login anymore
here are the tasks I made:

copy of the hole mariadb Database
create a new container with right setting for db
container starts successfull, all plugins start well

this procedure worked well til 4.2.3...
did I make something wrong?
—
Reply to this email directly, view it on GitHub
https://github.com/sameersbn/docker-redmine/issues/511, or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABK2RGLD65W2JK7ESE4E64LW7XUB3ANCNFSM6AAAAAAWUT75LE
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

works now...
It seems to be..that i made a mistake while copying the database...


[StreamDeck] Improvement on button previews

Improvements in code and preview button

Fixed overlay text on image that was previously only displaying the background image.
Added preview on static text construction.
Minor adjustment in control position
Removing duplicate or useless "Test" button

Lot of small PRs regarding StreamDeck improvement but I prefer this way since it's quite extensive code.

This is getting sexy mate!


Add considerations about cardinatlity?

This is implementation-specific, but a few numbers might be useful as a frame of reference.
#22 comes to mind; having arbitrary full even text as label value would be a "metric" in name, but not in practice.

Maybe a section around best practices?
I think we'll need to choose a line for where we put things in the spec, and where we just refer off to Prometheus docs. Cardinality, use absolute unixtimes, doing counter math in "Prometheus" and not usually using timestamps are ones we'd want on the spec side I'd say anyway.


Missleading name of the component

The name fritzdect is a bit missleading because this is also working with FRITZ!Powerline 546E.
I can confirm it is working without any problems so far.
Maybe a better name would be fritz_smarthome or something in this direction.
More information here: https://en.avm.de/guide/smart-home/intelligent-switching/

#10688 was renamed from new to be integrated component fritzhome to fritzbox. This should replace the switch/fritzdect platform and fix this issue.


Added instance type offerings and enhanced instance types

Adds support for:

A more comprehensive instance type list based on the existing instance_types.json file.
Filtering instance types
Querying instance type offerings
Filtering instance type offerings

Coverage decreased (-0.3%) to 94.003% when pulling a220d27ebc9707c5641b395effe2d1ab07c51b97 on CloudVE:add_instance_type_offerings into 53a3e52c67288c38fd7389c2199eb7012303d4cb on spulec:master.

ping @spulec @JackDanger

Hi @bblommers. Thanks for reviewing. Since the availability of instance types is affected by the available capacity in a particular zone, I think it would be useful for moto to support scenarios where some regions just don't have the requested instance type. Clients using the instance type offering api should ideally account for that, and expect instance types to be unavailable, and this would help them to test that explicitly. Perhaps we could always return at least one instance type by default, say t2.nano, to handle regions in which no instance types at all are defined?

Also, I forgot to mention that I generated this offerings list using the existing instances.json file, by adding just two availability zones to each instance type, and modified a few to test for specific test conditions.

@nuwang Gotcha, I didn't think of the scenario of wanting to test for unavailability.
In that case, a full list might be a better solution after all. Just thinking out loud here, but potentially with a script that periodically downloads the full list from AWS itself per region.
@spulec Any thoughts on this?

Since Availability Zone names don't map to the same location across accounts, I'm a bit nervous about having these be different across AZs.
If I am a developer using Moto and I know that us-east-1a in my AWS account supports a given instance type, that seems reasonable to me to potentially hardcode it. It would feel weird if Moto then said the instance type wasn't supported.
I'm a bit more comfortable with them varying by Region if we think there is a maintainable way to keep that up to date with the real availabilities. Can we write a script that uses these APIs for real and dumps it to a json?

@nuwang Hope you don't mind - I'll have a stab at creating this script now

@bblommers Not at all, much appreciated!


[BUG] Unable to deploy simple pod with PVC

Describe the bug
Unable to deploy simple pod with PVC mentioned in the example
https://longhorn.io/docs/1.3.0/references/examples/#pod-with-persistentvolumeclaim
To Reproduce
Steps to reproduce the behavior:

Provision RKE2 through Rancher
Install Longhorn with Fleet and Helm
Deployment example simple-pod with PVC

Expected behavior

Pods deployed and running without errors.
Volumes showing on LongHorn UI

Log or Support bundle
LongHorn Manager Log
time="2022-07-29T17:21:49Z" level=warning msg="pvc-111fdc66-ca80-4335-832b-741eddaf13cd-r-4c420263: time=\"2022-07-29T17:21:10Z\" level=info msg=\"Listening on gRPC Replica server <IP_ADDRESS>:10000\""
time="2022-07-29T17:21:49Z" level=warning msg="pvc-111fdc66-ca80-4335-832b-741eddaf13cd-r-4c420263: time=\"2022-07-29T17:21:10Z\" level=info msg=\"Listening on data server <IP_ADDRESS>:10001\""
time="2022-07-29T17:21:49Z" level=warning msg="pvc-111fdc66-ca80-4335-832b-741eddaf13cd-r-4c420263: time=\"2022-07-29T17:21:10Z\" level=info msg=\"Listening on sync agent server <IP_ADDRESS>:10002\""
time="2022-07-29T17:21:49Z" level=warning msg="pvc-111fdc66-ca80-4335-832b-741eddaf13cd-r-4c420263: time=\"2022-07-29T17:21:10Z\" level=info msg=\"Listening on sync <IP_ADDRESS>:10002\""
time="2022-07-29T17:21:49Z" level=warning msg="pvc-111fdc66-ca80-4335-832b-741eddaf13cd-r-4c420263: time=\"2022-07-29T17:21:11Z\" level=info msg=\"New connection from: <IP_ADDRESS>:37140\""
time="2022-07-29T17:21:49Z" level=warning msg="pvc-111fdc66-ca80-4335-832b-741eddaf13cd-r-4c420263: time=\"2022-07-29T17:21:11Z\" level=info msg=\"Opening volume /host/var/lib/longhorn/replicas/pvc-111fdc66-ca80-4335-832b-741eddaf13cd-07fa2681, size<PHONE_NUMBER>/512\""
time="2022-07-29T17:21:49Z" level=warning msg="pvc-111fdc66-ca80-4335-832b-741eddaf13cd-r-4c420263: time=\"2022-07-29T17:21:30Z\" level=warning msg=\"Received signal interrupt to shutdown\""
time="2022-07-29T17:21:49Z" level=warning msg="pvc-111fdc66-ca80-4335-832b-741eddaf13cd-r-4c420263: time=\"2022-07-29T17:21:30Z\" level=warning msg=\"Starting to execute registered shutdown func github.com/longhorn/longhorn-engine/app/cmd.startReplica.func4\""

Kubectl describe pod
Events:
  Type     Reason              Age                   From                     Message
  ----     ------              ----                  ----                     -------
  Warning  FailedScheduling    10m                   default-scheduler        0/6 nodes are available: 6 pod has unbound immediate PersistentVolumeClaims.
  Warning  FailedScheduling    10m                   default-scheduler        0/6 nodes are available: 6 pod has unbound immediate PersistentVolumeClaims.
  Normal   Scheduled           10m                   default-scheduler        Successfully assigned default/volume-test to ip-172-20-234-251.us-west-2.compute.internal
  Warning  FailedMount         83s (x4 over 8m11s)   kubelet                  Unable to attach or mount volumes: unmounted volumes=[volv], unattached volumes=[volv kube-api-access-n2682]: timed out waiting for the condition
  Warning  FailedAttachVolume  20s (x12 over 8m40s)  attachdetach-controller  AttachVolume.Attach failed for volume "pvc-111fdc66-ca80-4335-832b-741eddaf13cd" : rpc error: code = DeadlineExceeded desc = volume pvc-111fdc66-ca80-4335-832b-741eddaf13cd failed to attach to node ip-172-20-234-251.us-west-2.compute.internal

Environment

Longhorn version: 1.3.0
Installation method: Rancher Catalog App/Helm/Kubectl
Kubernetes distro (e.g. RKE/K3s/EKS/OpenShift) and version: RKE2 1.21.8-rk2r2

Number of management node in the cluster: 3
Number of worker node in the cluster: 3

Node config

OS type and version: Rocky 8.5
CPU per node: 2CPU
Memory per node: 8GB Ram
Disk type(e.g. SSD/NVMe): SSD
Network bandwidth between the nodes: 5GBps

Underlying Infrastructure (e.g. on AWS/GCE, EKS/GKE, VMWare/KVM, Baremetal): AWS EC2
Number of Longhorn volumes in the cluster: Default settings 3 replicas ( unable to provision any)

cc @PhanLe1010 @innobead Something not right with their iscsi install, I remember seeing this before with the invalid initiator name.
2022-07-29T17:13:51.259081883Z [pvc-111fdc66-ca80-4335-832b-741eddaf13cd-e-bb57e1bf] time="2022-07-29T17:13:51Z" level=warning msg="FAIL to discover due to Failed to execute: nsenter [--mount=/host/proc/1/ns/mnt --net=/host/proc/1/ns/net iscsiadm -m discovery -t sendtargets -p <IP_ADDRESS>], output , stderr, iscsiadm: Cannot perform discovery. Invalid Initiatorname.\niscsiadm: Could not perform SendTargets discovery: invalid parameter\n, error exit status 7"
2022-07-29T17:13:51.269887587Z [pvc-111fdc66-ca80-4335-832b-741eddaf13cd-e-bb57e1bf] time="2022-07-29T17:13:51Z" level=warning msg="Nodes cleaned up for iqn.2019-10.io.longhorn:pvc-111fdc66-ca80-4335-832b-741eddaf13cd"

It is this ticket https://github.com/longhorn/longhorn/issues/2319
Install iscsid by deploying this daemonset kubectl apply -f https://raw.githubusercontent.com/longhorn/longhorn/v1.3.0/deploy/prerequisite/longhorn-iscsi-installation.yaml

@PhanLe1010  : This worked. We can the issue now. Thank You.


[DOC]: update EllipsePixelRegion docstring

The description of major and minor was swapped

😆 Thanks, @mirca!

The travis Sphinx failures are unrelated.  Merging.


SharedPtr isn't correct?

I'm not sure but the destructor for SharedPtr[T] seems off:
  proc `=destroy`*[T](p: SharedPtr[T]) =
    if p.val != nil:
      if p.val.counter.load(Acquire) == 0:
        `=destroy`(p.val.value)
        deallocShared(p.val)
      else:
        discard fetchSub(p.val.counter, 1, Release)

Here's an example failure mode I think:

You have three threads.
thrA calls fetchSub setting the count to zero.
Then thrB and thrC both do a load(Acquire) at the same time.
Both thrB and thrC proceed to free the shared pointer.

Using a p.val.counter.fetchSub(1, Release) == 0 seems to work and match various examples. Though you need to set the initial count to 1. The C++ shared_ptr's all appear to use swap or compareSwap though.
Also, I was having failures with fetchSub(1, Aquire) giving me inconsistent results on my M1. From what examples and docs I've you'd need to use fetchSub(1, Release) instead. I haven't read up enough on the memory semantics to confirm it. However, I was looking into it because I kept getting what looked like incorrect atomic counts on my M1. Switching to Release made the issue go away.
Here's what I ended up using in my own implementation:
  if x.container != nil:
    let res = atomicSubFetch(addr x.container.cnt, 1, ATOMIC_RELEASE)
    if res == 0:
      when compiles(`=destroy`(x[])):
        `=destroy`(x[])
      deallocShared(x.container)

Here's an example failure mode I think

But how could 3 threads access the same object with an RC == 1? Your example makes no sense.

D'oh! That's why I shouldn't try creating an example late at night. I'll try and make another. Or maybe just add a test to verify it works.

Ok, I re-worked an example and remembered to keep the total count 😆

Threads A & B both use a SharePtr, so count = 2
A & B both hit destructors for their copies
A & B both do p.val.counter.load(Acquire) in parallel
A & B both get count == 2
A & B go on to fetchSub(p.val.counter, 1, Release)
fetchSub will be strictly ordered so count will be 1, then 0
Total count == 0, but neither A & B will free the ptr

So not a double free, but no one ever frees the SharePtr.

Remember the count is stored as "natural count - 1" so if both threads use a sharedptr the count should be 1, not 2. So no wonder it leaks in your scenario as you still don't count like the code does.

It doesn't matter if it's the natural count - 1, as I used a "logical count". In the actual base they'll both still just get count == 1 and still leak.
Using natural count - 1:

Threads A & B both use a SharePtr, so count = 1
A & B both hit destructors for their copies
A & B both do p.val.counter.load(Acquire) in parallel
A & B both get count == 1
A & B go on to fetchSub(p.val.counter, 1, Release)
fetchSub will be strictly ordered so count will be 1, then -1
Total count == -1, but neither A & B will free the ptr

Ok, created an example (#46) that on my machine gives a few cases where the SmartPtr isn't freed. You can run it without the os.sleep but it requires higher numbers, but still happens 1 out of a million or so.
└─(15:53:58 on test-smartptrsleak ✭)──> nim c -r "/Users/jaremycreechley/pr
ojs/nims/figuro/vendor/threading/tests/tsmartptrsleak.nim"
Hint: used config file '/Users/jaremycreechley/.asdf/installs/nim/2.0.0/config/nim.cfg' [Conf]
Hint: used config file '/Users/jaremycreechley/.asdf/installs/nim/2.0.0/config/config.nims' [Conf]
Hint: used config file '/Users/jaremycreechley/projs/nims/nim.cfg' [Conf]
Hint: used config file '/Users/jaremycreechley/projs/nims/figuro/nim.cfg' [Conf]
Hint: used config file '/Users/jaremycreechley/projs/nims/figuro/config.nims' [Conf]
Hint: used config file '/Users/jaremycreechley/projs/nims/figuro/vendor/nim.cfg' [Conf]
Hint: used config file '/Users/jaremycreechley/projs/nims/figuro/vendor/threading/tests/nim.cfg' [Conf]
Hint: mm: arc; threads: on; opt: none (DEBUG BUILD, `-d:release` generates faster code)
38527 lines; 0.022s; 46.832MiB peakmem; proj: /Users/jaremycreechley/projs/nims/figuro/vendor/threading/tests/tsmartptrsleak.nim; out: /Users/jaremycreechley/projs/nims/figuro/vendor/threading/tests/tsmartptrsleak [SuccessX]
Hint: /Users/jaremycreechley/projs/nims/figuro/vendor/threading/tests/tsmartptrsleak [Exec]
freeCounts: got: 9990 expected: 10000

/Users/jaremycreechley/projs/nims/figuro/vendor/threading/tests/tsmartptrsleak.nim(51) tsmartptrsleak
/Users/jaremycreechley/.asdf/installs/nim/2.0.0/lib/std/assertions.nim(41) failedAssertImpl
/Users/jaremycreechley/.asdf/installs/nim/2.0.0/lib/std/assertions.nim(36) raiseAssert
/Users/jaremycreechley/.asdf/installs/nim/2.0.0/lib/system/fatal.nim(53) sysFatal
Error: unhandled exception: /Users/jaremycreechley/projs/nims/figuro/vendor/threading/tests/tsmartptrsleak.nim(51, 1) `freeCounts.load(Acquire) == N`  [AssertionDefect]
Error: execution of an external program failed: '/Users/jaremycreechley/projs/nims/figuro/vendor/threading/tests/tsmartptrsleak'

This bug also affects mm:atomicArc!

This bug also affects mm:atomicArc!

That's a great memory leak to squash!
Should I create a PR with a fix for it?

Ok, updated my PR to include the fix. I'll checkout the Nim atomicArc too.

@elcritch hello, is it fixed by https://github.com/nim-lang/threading/pull/46?

Yep!


Add checks for model spec and matching output values in to_onnx() method

🚀 Feature
The official PyTorch tutorial for exporting to ONNX includes checking the model spec as well as confirming the output values match the PyTorch version of the model. The current Lightning implementation of to_onnx() only calls torch.onnx.export but skips these additional checks. For best practice, I think they should be included (if not by default, then with an optional boolean flag to turn them on)
Motivation

Follow the official tutorial as closely as possible
Ensure the ONNX version of the model does not produce unexpected results before it's used in production

Pitch
Add something along the lines of the following code to the end of the current to_onnx() method
import onnx
import onnxruntime
import numpy as np

def to_numpy(tensor):
    return tensor.detach().cpu().numpy() if tensor.requires_grad else tensor.cpu().numpy()

onnx_model = onnx.load(file_path)
onnx.checker.check_model(onnx_model)
ort_session = onnxruntime.InferenceSession(file_path)
ort_inputs = {ort_session.get_inputs()[0].name: to_numpy(input_sample)}
ort_outs = ort_session.run(None, ort_inputs)
for ort_out, torch_out in zip(kwargs["example_outputs"], ort_outs):
    np.testing.assert_allclose(to_numpy(torch_out), ort_out, rtol=1e-03, atol=1e-05)

Alternatives
Users override the method and implement the checks themselves. However, I think these are general enough that they should be included in the base method to limit boilerplate code
Additional context

This would require including the Python bindings for onnx and onnxruntime with the Lightning distribution
The biggest challenge to generalize would be the model outputs. Many models have more than one output node, so we need to make sure each node is compared with the appropriate corresponding ONNX node. Iterating with zip is probably alright unless the PyTorch version outputs a dict (which I think would be bad practice)
In my own use, I have found you need to be very careful about the order of library imports. Details in this issue comment from the onnx repo

Thanks for the issue @addisonklinke !
want to try and submit a PR?


Bug 1944513: [release 4.9] fix ceph mon quorum lost alert query

Only the 'Running' mons with result value of '1' should be counted.
Signed-off-by: Arun Kumar Mohan<EMAIL_ADDRESS>(cherry picked from commit af44e5c58470f3bf1d5e950dc19e07c70de693da)

Description of your changes:
Which issue is resolved by this Pull Request:
Resolves #
Checklist:

[ ] Commit Message Formatting: Commit titles and messages follow guidelines in the developer guide.
[ ] Skip Tests for Docs: Add the flag for skipping the build if this is only a documentation change. See here for the flag.
[ ] Skip Unrelated Tests: Add a flag to run tests for a specific storage provider. See test options.
[ ] Reviewed the developer guide on Submitting a Pull Request
[ ] Documentation has been updated, if necessary.
[ ] Unit tests have been added, if necessary.
[ ] Integration tests have been added, if necessary.
[ ] Pending release notes updated with breaking and/or notable changes, if necessary.
[ ] Upgrade from previous release is tested and upgrade user guide is updated, if necessary.
[ ] Code generation (make codegen) has been run to update object specifications, if necessary.

/assign @leseb
In the release branch, we don't have a monitoring tag.
✖   type must be one of [bot, build, ceph, cephfs-mirror, ci, core, csi, docs, mds, mgr, mon, osd, pool, rbd-mirror, rgw, test] [type-enum]

@leseb , @travisn , please take a look

I used ceph tag (instead of monitoring), hope that is good for now.

I used ceph tag (instead of monitoring), hope that is good for now.

Yeah, the changed prefixes haven't been backported to 4.9, so ceph still works there


get package name changed to edu.cascadia.mobas.pollinatorpathway

Done when package name is changed

name changed


Getting an error when job creation place holders are submitted without entering values

This error is related to job creations inside companies.
This occurs when placeholders are submitted without entering any value (by clicking 'submit')
Below is the error occurred
 Runtime Error : org.luaj.vm2.LuaError: King_seniru#5890.lua:638: attempt to compare __lt on nil and number

The bug was fixed and those changes will take effect in master branch after merging 'effects' branch!

@all-contributors please add @Seniru for design, maintainence, doc


Improve the CI test

The CI test will now run JupyterLab with the new theme actually enabled. This will require the small tweak to .css url mangling in the PR jupyterlab/jupyterlab_server#62 in order to be functional.

Thanks!


[Suggestion] CLI

Create a multi-platform CLI, (Windows + *nix) for creating URLs easily, and maybe updating them.
Requested in #86

If you want, I'd be happy to do this for you. I've made a CLI for discordextras ( internal tool ) that is multiplatform. It's Javascript based, but it's AIO and works out of the box. I'll have to tweak some things to make it work with Lynx however. Let me know if your interested!
Cheers, SuperDev

Hi, that'd be amazing - thank you SuperDev.
API docs are at https://docs.getlynx.dev/api/usage
And I've added you to Lynx-Shortener/CLI
When I'm next free I'll take a look to understand how you've done it so I should be able to maintain + bug fix it too.

Hi, that'd be amazing - thank you SuperDev.
API docs are at https://docs.getlynx.dev/api/usage
And I've added you to Lynx-Shortener/CLI
When I'm next free I'll take a look to understand how you've done it so I should be able to maintain + bug fix it too.

awesome, if your comfortable I can send you the code for discordextras CLI if you want an idea on how things work.

Sounds good, thank you

Sounds good, thank you

is there a private way I am able to send it to you?

Hi, that'd be amazing - thank you SuperDev.
API docs are at https://docs.getlynx.dev/api/usage
And I've added you to Lynx-Shortener/CLI
When I'm next free I'll take a look to understand how you've done it so I should be able to maintain + bug fix it too.

seems like you added me to the wrong repository haha, on the main one instead of the CLI one. I'd add something here if I wasn't too busy with Easyshortener.

You could probably zip it and email it to info [at ] getlynx.dev or a Google drive link or something

You could probably zip it and email it to info [at ] getlynx.dev or a Google drive link or something

would a wormhole link work for you?

Yep that'd work well, thank you. I'm currently away for the next week so won't be able to take a look until I get back but I'll make sure to then.

Yep that'd work well, thank you. I'm currently away for the next week so won't be able to take a look until I get back but I'll make sure to then.

No worries! If you could give me access to the /CLI repo instead of /Lynx so I can git all changes  would be appreciated.
Link expires in 60 mins: https://wormhole.app/JzDAB#CUHKRMHdnk1KdABjNhOMKg

I'll try to finish the CLI in a few hours.

One thing I didn't notice is the authentication part. The other thing I'm wondering is if you want a workflow via github actions to build it automatically for all platforms.

Oh yep, oops. There you go you should be able to access /CLI now - I also downloaded the zip from the link. Thank you

One thing I didn't notice is the authentication part. The other thing I'm wondering is if you want a workflow via github actions to build it automatically for all platforms.

I've been moving to Drone CI/CD recently so I'd probably look into that myself instead but if you have an existing workflow I'd greatly appreciate it

Oh yep, oops. There you go you should be able to access /CLI now - I also downloaded the zip from the link. Thank you

Forgot to mention, if you want to compile it I used ncc and babel, it's preconfigured so shouldn't need to worry but ncc and pkg should be global. ( this is for all platforms)

one final tiny thing so I can be transparent about any changes, if you can add a roadmap to the repository would be good, noticed that Lynx has one, might as well continue it

One thing I didn't notice is the authentication part. The other thing I'm wondering is if you want a workflow via github actions to build it automatically for all platforms.

I've been moving to Drone CI/CD recently so I'd probably look into that myself instead but if you have an existing workflow I'd greatly appreciate it

Workflow is added, errors due to permissons it needs to push.

Apologies for not getting back to you on this. I'll try to find some time on this soon to properly look through what you've done and release it.

Closed due to #155.


Fix rounding issue for discounted cart items

Issue was found when running a 20% discount campaign on site. Some products caused Klarna Loading Failed. The issue was that the cart item values was not properly rounded (but truncated instead). Removing | 0 and using Math.round() instead solved that issue.
NB:
Has only been tested on a SEK site with 20% discount.

Ok, so I added Math.round()' wherever I found | 0(expect for the weight stuff. Only fixed it for prices) Not out of necessity but just to make sure.  If| 0` was used with the intent to truncate, then the latest commit would not be good I guess, but I assume we should always round prices, or at least keep the same behaviour for all price fields/variables.


[main] Upgrade to latest dependencies

Cron -knative-prow-robot
/cc knative-sandbox/channel-wg-leads
/assign knative-sandbox/channel-wg-leads
Produced by: knative-sandbox/knobots/actions/update-deps
Details:
bumping knative.dev/pkg 35916ab...3e1e4d7:
  > 3e1e4d7 Update community files (# 2137)
  > 803d2ba use more general kubernetes.Interface (# 2135)
  > 47dfdcf consolidate k8s flags to an environment package (# 2133)
  > 6484377 update boilerplate date (# 2134)
bumping knative.dev/reconciler-test 0b740d3...f667a8f:
  > f667a8f Fix redundant name in Assert helper (# 205)
bumping knative.dev/eventing 5d3d12f...a4650e0:
  > a4650e0 Update community files (# 5458)
  > d5f8b90 rekt/resources: support trigger annotations (# 5456)
  > d1106c8 [QE] Don't wait on triggers, before deploying their subscriber (# 5444)
  > 65bed40 Update actions (# 5438)
  > 0d129e4 Fix a broken link in experimental-features.md (# 5453)
  > b813a54 Remove camel as a downstream now that is deprecated (# 5449)
  > 9d1c35f drop use of deprecated sharedmain functions (# 5450)
  > 6e9588c Bump downstream job to go 1.16 (# 5448)

/lgtm
/approve


Add nithin-vijayan to contributors list

Excellent tutorial bro. Poli :smile:

@nithin-vijayan,  I'd love to learn about your journey in open source community, the problems, pain points you had etc.
Could you share how you felt about the tutorial, your experiences with open source community etc?


[TW#28318] ESP32 Bluetooth SPP Security related queries

Dear Sir/Madam,
We have developed a BT SPP Acceptor based Application on ESP32 Wrover Module (No Input No Output Capability).
We have connected a BT SPP based Application with BT Classic Mobile App (Initiator).
When inserted different BT Security Options related to SPP Profile, found some unsolved queries.
Following is the List of the Queries related to BT Security
Queries:
1) Bluetooth Security Mode (BT BR/EDR Security Mode 1, 2, 3 & 4) :
Which Bluetooth Security Mode(s) supported/implemented by Different Security Options given by ESP32 SPP Profile?
2) BT Encryption Feature (ESP_SPP_SEC_ENCRYPT)
i) Which Encryption Algorithm supported by SPP profile? What is the Size of Encryption Key used in Encryption Algorithm?
ii) Suggest some way to test the Encryption feature of BT SPP Profile when encryption is enabled in our application
3) BT Authorization Feature (ESP_SPP_SEC_AUTHORIZE)
a) Setting the Authorization in our BT Application cause the following problems:
i) Not get the Service Connection (ESP_SPP_SRV_OPEN_EVT) event at Acceptor Side when connected with Mobile App
ii) Connection was lost when data sent to the BT Acceptor by Mobile App
Kindly suggest some solution to solve this
4) BT MITM Protection (ESP_SPP_SEC_MITM)
a) How does this feature prevent the MITM?
b) Does this feature provide authorization and encryption?
Regards,
Ritesh Prajapati

Hi， @Ritesh236, Sorry for later reply. There is some problem in the  Security Options in SPP, so please use it just as the demo. And for the queries:

The Bluetooth Security Mode we use is Mode 4, and the IO Capability which you use is No Input No Output, so the security level is 2.
The Encryption Algorithm supported by SPP profile is E0.
Not  support, now.
As  the IO Capability which you use is No Input No Output, MITM is not supported.

@blueMoodBHD,
Thanks for providing update for that.  I will check it with my team and let you know if any query regarding that.

With ESP_SPP_SEC_AUTHENTICATE and No Input No Output, it support security mode 4 level 2,  using Legacy Pairing or Security Simple Pairing are both OK. And if you use Security Simple Pairing, the authentication algorith which will be use is Numeric Comparison(just work). And if you use Legacy Pairing, you should set fixed pin.

@blueMoodBHD,
Thanks for quick reply for same. I will check it with my team on Monday and send reply with query if any more from security perspective as we have already started to work on bluetooth with profile and security feature.

@Ritesh236 Hi, would you help provide any updates for the issue? Thanks.

@Ritesh236 Hi, would you help provide any updates for the issue? Thanks.

@Ritesh236 Hi, would you help provide any updates for the issue? Thanks.

@Ritesh236 Thanks for reporting the issue. Feel free to reopen the issue if you have any updates. Thanks.


TableRow.toString() logic is inverted for non-null populated lists

Simple inverted logic with a list null check.
Offending Code in the master branch
Steps to Reproduce

Create a TableRow instance
set the children on the TableRow with a list which contains at least one object
call TableRow.toString()
String will output "child list is null" because the logic is the opposite of what it should be.

@Hixie

Thanks for the report!

Looks like a trivial fix.  :P


kconfig: Linked code into external SEMC-controlled memory without boot header

It is not clear to me why the following check for CODE_FLEXSPI and CODE_FLEXSPI2 configs was added at NXP_IMX_RT_BOOT_HEADER config (at PR https://github.com/zephyrproject-rtos/zephyr/pull/41579). Since the boot ROM cannot copy and then run code linked into non-FlexSPI controlled memory.
https://github.com/zephyrproject-rtos/zephyr/blob/426c9cbc90fb33cab56d2705e40a8a855df1785c/soc/arm/nxp_imx/rt/Kconfig.soc#L652-L657
It is also unclear to me why there was no imply for CODE_SEMC (in PR https://github.com/zephyrproject-rtos/zephyr/pull/22864), CODE_ITCM and other CODE_LOCATION. https://github.com/zephyrproject-rtos/zephyr/blob/426c9cbc90fb33cab56d2705e40a8a855df1785c/soc/arm/nxp_imx/rt/Kconfig.soc#L710-L711
I think these checks should be removed and imply for CODE_SEMC, CODE_ITCM, CODE_SRAM0, CODE_OCRAM added.
zephyr/soc/arm/nxp_imx/rt/Kconfig.soc:
...
menuconfig NXP_IMX_RT_BOOT_HEADER
	bool "Boot header"
	depends on (!BOOTLOADER_MCUBOOT)
	help
	  Enable data structures required by the boot ROM to boot the
	  application from an external flash device.
...
config CODE_SEMC
	bool "Link code into external SEMC-controlled memory"
	imply NXP_IMX_RT_BOOT_HEADER if !BOOTLOADER_MCUBOOT

config CODE_ITCM
	bool "Link code into internal instruction tightly coupled memory (ITCM)"
	imply NXP_IMX_RT_BOOT_HEADER if !BOOTLOADER_MCUBOOT
...
config CODE_SRAM0
	bool "Link code into RAM_L memory (RAM_L)"
	imply NXP_IMX_RT_BOOT_HEADER if !BOOTLOADER_MCUBOOT

config CODE_OCRAM
	bool "Link code into OCRAM memory (OCRAM-M4)"
	imply NXP_IMX_RT_BOOT_HEADER if !BOOTLOADER_MCUBOOT
...

@danieldegrasse, I can make a PR if you can confirm that my assumptions above are correct.

Hi @MikhailSiomin, Sorry for the late response. Currently, CONFIG_IMX_RT_BOOT_HEADER only enables the presence of the boot header. Although the iMX.RT bootloader should support loading the image into RAM using this feature, this use case is not currently tested or supported. If you are interested in enabling this feature, a PR to do so would be welcomed, I just wanted to make you aware that the effort to do so may be more than changing the KConfig settings here.

@danieldegrasse, I used a custom bootloader on 2.7 Zephyr that linked into semc and it worked. But faced the above problem when switching to Zephyr version 3.2. I will check what the changes affect and prepare a PR.

@MikhailSiomin, great- thank you for taking this on!


Move electra attestation's committeeBits at the end

fixes #8340
We could wait the spec PR to be merged, just to avoid early compatibility breaks with other clients
Documentation

[ ] I thought about documentation and added the doc-change-required label to this PR if updates are required.

Changelog

[ ] I thought about adding a changelog entry, and added one if I deemed necessary.

requires reference test update too

we won't be able to merge this until the spec reftests are updated, but overall looks fine, as long as the spec is changing it.

The spec PR has been merged. We just need to wait for ref-spec release