Refactor infrastructure layer

Reduces the complexity of repository implementation, removing the use of generics and specializing for a specific entity.
Restricts Dao responsibility by removing services methods.
Remove pagination service generics.

Codecov Report

Merging #75 (229e67e) into main (5be358d) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #75      +/-   ##
==========================================
+ Coverage   98.74%   98.75%   +0.01%
==========================================
  Files          49       50       +1
  Lines         717      725       +8
==========================================
+ Hits          708      716       +8
  Misses          9        9

Impacted Files
Coverage Δ

...ication/client/search/bloc/client_search_bloc.dart
100.00% <ø> (ø)

...pplication/client/search/client_search_status.dart
100.00% <ø> (ø)

...ib/infrastructure/drift/client/client_filters.dart
100.00% <ø> (ø)

...n/client/search/widgets/client_search_results.dart
100.00% <ø> (ø)

...cation/client/search/bloc/client_search_state.dart
100.00% <100.00%> (ø)

lib/infrastructure/drift/client/client_dao.dart
100.00% <100.00%> (ø)

...ucture/drift/client/client_pagination_service.dart
100.00% <100.00%> (ø)

...infrastructure/drift/client/client_repository.dart
100.00% <100.00%> (ø)

lib/infrastructure/drift/common/filters.dart
100.00% <100.00%> (ø)

lib/infrastructure/drift/core/dao.dart
100.00% <100.00%> (ø)

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


Translation.jsjava.prototype

added dependency for pom.xml file, added script.js function and java servlet

ok still getting merge conflicts, gonna see if i can fix them

Okay, Will wait for you too fix them then

ok yeah i think i understand why. on the first pull request I had, for some reason one of the target files got modified, so I added them, now every time I try to make a pr i get merge conflicts and it seems like they're too big to modify in github :/

Maybe going forward to prevent this, lets just make sure our target folders are empty lol.
How should we fix this now?

man im not even sure!! i really don't even understand the target files in the first place

I think it might be due to us having slightly different versions of the project being built, so our contents within our individual target folders are going to be empty.

I'm gonna try manually deleting the target folders from GitHub, then you can send this PR (for the third time). Just make sure to run "mvn clean" before you push to github, so that the target folder is empty

john wait!!! we fixed it i just got off a call with cam

closing this branch, merge conflicts have been avoided


Dump SeaORM Dependency from SeaSchema's Migrator

Motivation
A dependency tree of a typical SeaORM application looks like this. Which SeaORM is depends by the application and the underlying SeaSchema migrator. This is hard to maintain and difficult to release new version of SeaORM.
axum-graphql v0.1.0 (sea-orm/examples/axum-graphql_example)
├── entity v0.1.0 (sea-orm/examples/axum-graphql_example/entity)
│   ├── sea-orm v0.7.1
│   │   ├── sea-orm-macros v0.7.0 (proc-macro)
│   │   ├── sea-query v0.23.0
│   │   │   ├── sea-query-derive v0.2.0 (proc-macro)
│   │   ├── sea-strum v0.23.0
│   │   │   └── sea-strum_macros v0.23.0 (proc-macro)
├── migration v0.1.0 (sea-orm/examples/axum-graphql_example/migration)
│   ├── entity v0.1.0 (sea-orm/examples/axum-graphql_example/entity) (*)
│   └── sea-schema v0.7.1
│       ├── sea-orm v0.7.1 (*)
│       ├── sea-query v0.22.0
│       │   └── sea-query-derive v0.2.0 (proc-macro) (*)
│       ├── sea-schema-derive v0.1.0 (proc-macro)

Solution
We could get rid of SeaORM dependency on SeaSchema's migrator, and manage the connection to various db backend with sqlx::Any. sqxl::Pool::any_kind method can be used to identify the db backend of current connection.

@tyt2y3 thoughts?

If we remove the dependency all-together, how do we expose a proper connection inside the migration script?
https://github.com/SeaQL/sea-schema/blob/e28bd81c8f15ab1ab57ad11fa7e192fbe3086eb1/tests/migration/src/m20220118_000003_seed_cake_table.rs#L15-L21

Opppps.
Then, we should split sea-orm structs and enums that depends on sqlx into a new crate maybe called sea-connection. While leaving connection related traits inside sea-orm. This will also allows other connectors to be plugged into sea-orm.

#40

May be the best and simplest way is to move the sea-orm facing functionalities (migrator logic) into sea-orm-cli itself, and leave only the schema manager in sea-schema.

For sea-schema, we could keep most of the migrator logic intact while introduce a new connection trait, MigratorConnection, in it. Then, implement MigratorConnection for sea_orm::DatabaseConnection. In this way, sea-schema doesn't depends on sea-orm thus breaking the deadlock.


Svero on official Svelte 3 FAQ

Svero is on official Svelte 3 FAQ now: https://github.com/sveltejs/svelte/issues/2669 and https://github.com/sveltejs/svelte/wiki/FAQ#is-there-a-routing-solution.
Thanks for your work, @kazzkiq.

Thanks! Glad to see it being useful to others as much as it was to me. 👍


fix overflow when calculating offset with large set ordinals

Similar to #222 there's an integer overflow that could lead to ArrayIndexOutOfBoundsException. This one's more subtle:
OVERFLOW: (long)(ordinal * currentData.bitsPerFixedLengthSetPortion) + currentData.bitsPerSetPointer
CORRECT:  ((long)ordinal * currentData.bitsPerFixedLengthSetPortion) + currentData.bitsPerSetPointer,

Kudos to @adamkeyser for suggesting a closer look at sets.

Redoing with a different branch and more than just Set types.


[BUG] Add-PnPListItem

Notice
Many bugs reported are actually related to the PnP Framework which is used behind the scenes. Consider carefully where to report an issue:

Are you using Invoke-PnPSiteTemplate or Get-PnPSiteTemplate? The issue is most likely related to the Provisioning Engine. The Provisioning engine is not located in the PowerShell repo. Please report the issue here: https://github.com/pnp/pnpframework/issues.
Is the issue related to the cmdlet itself, its parameters, the syntax, or do you suspect it is the code of the cmdlet that is causing the issue? Then please continue reporting the issue in this repo.
If you think that the functionality might be related to the underlying libraries that the cmdlet is calling (We realize that might be difficult to determine), please first double check the code of the cmdlet, which can be found here: https://github.com/pnp/powershell/tree/master/src/Commands. If related to the cmdlet, continue reporting the issue here, otherwise report the issue at https://github.com/pnp/pnpframework/issues

Reporting an Issue or Missing Feature
When executing Add-PnPListItem the first time an exception occurs. (But the Item was created successfully)
When I execute the same code the second time, the Listitem was created either but without any error
Expected behavior
The Listitem is created without an issue, by the first time!
Actual behavior
format-default : The collection has not been initialized. It has not been
requested or the request has not been executed. It may need to be explicitly
requested.
+ CategoryInfo          : NotSpecified: (:) [format-default], CollectionNotIn
itializedException
+ FullyQualifiedErrorId : Microsoft.SharePoint.Client.CollectionNotInitialize
dException,Microsoft.PowerShell.Commands.FormatDefaultCommand
Steps to reproduce behavior
Dynamic loading of the PnP.Powershell commandlets during Runtime
Authentication via Certificate
SharePoint Online SiteCollection, Custom Item list.
Texfields, Peoplepicker 1(No Multiple Values, People Only), Peoplepicker 2(Multiple Values, People Only)
Add-PnPListItem -List "YOurList" -Values $listItemValues
What is the version of the Cmdlet module you are running?
1.3.13-nightly
Which operating system/environment are you running PnP PowerShell on?

[ X] Windows
[ ] Linux
[ ] MacOS
[ ] Azure Cloud Shell
[ ] Azure Functions
[ ] Other : please specify

The error message you're seeing is a 'quirk' of CSOM and PowerShell. The cmdlet returns an item after adding it.  PowerShell will always try to parse those values if they are rendered to the output. However, by default CSOM is limiting what is being returned from the server. It will simply access the properties on the object. CSOM has been developed in such a way that if a collection or property is access that has not been loaded it will throw the exception you see above.
The result is that we as developers have to explicitly ask for certain fields to return. By default we display the id, the title and the uniqueid when show a list item as we do not know ahead of time what you are looking for in the item.
In your script example, do you do something more after Add-PnPListItem? If you try to access a property from that list item that has not been loaded you will have to retrieve it with Get-PnPListItem.

No, I just create a new Listitem. As I allready mentionend. If I execute the Script again, the Add-PnPListItem works as expected.

Can you try to modify your script as follows?
$i = Add-PnPListItem -List "yourlist" -Values $listitemValues

And try again?
You will notice that you most likely do not receive the error message, as PowerShell is not parsing the output it receives from the cmdlet. However, if you then on a new line enter $i, do you receive the error then? If you receive an error can you enter Get-PnPException and paste the result of that here?
What would be interested to know is what is in the content of your $listitemValues variable, as that can have an effect on the Add-PnPLlistItem execution. So the actual content, or at least obfuscated, but formatted as you have it formatted.

Your where right, as soon as I did modify my code in the way you've mentioned- it worked. But why it came to this behavior.
I'm using that script since months. I just started to modify my provisioning scripts, to use PnP.PowerShell. Never had an issue, before. Even with earlier versions of the PnP.Powershell, but unfortuanelty I can't tell you the version on which I've testet and it worked. Since I'm updating the bins on time ;)
Here the content of the $listitemValues variable:
Name                           Value

DomCompanyCode                 99999
DomCollaborationTarget         SPOnline
DomProvisioningStatus          Bereit
DomSpaceRequestedBy<EMAIL_ADDRESS>DomDescription                 Prov Test Standard Online
DomCostCenter                  0815
DomCountryCode                 AT
DomTeamsOwnerOrSCV<EMAIL_ADDRESS><EMAIL_ADDRESS>Title                          Test random3f42fd2e170f
DomItsmParent                  StandardOnline_SN
DomWebName                     random3f42fd2e170f
DomCollaborationTemplate       Standard
DomOrganizationDevelopment     0815

Update: It seems a general issue, now I have the same behavior for Set-PnPListItem , if I use it without an assignment like $dummyRetval= Set-PnPListItem I get the same error. The next command is not related to PNP.
After the Add-PnPLlistItem I use the Move-Item command.
After the Set-PnPListItem, I write a Logentry with nLog.
In both cases, I avoid an Issue if just catch the returnvalue- even I didn't need it. Now I have to add on every PnP-Command my $dummyRetval, to avoid further issues? Hopefully not.

Have you considered removing and reinstalling PnP PowerShell? I'm wondering if the format file ended up corrupt on your end. The file is located in the installation folder and is called PnP.PowerShell.dll-help.xml.

There is nothing to remove / reinstall, currently using 1.3.15-nightly - since I try to avoid to install the modules. I download the Nugets, unpack them and load it with Import-Module, probably that might be an issue?


Remove nodejs

Awesome! I'll merge as is so we can get this in, though I'm still curious about the telemetry question above.


Adding Transition Effect and Grammatical Improvisation

Description
Adding Transition Effect and Grammatical Improvisation
This PR fixes  #1063
Adding Transition Effect and Grammatical Improvisation [homePage.html / "Used by section"]
Notes for Reviewers
Adding Transition effect on companies logo which are using meshery .
And Adding Grammatical Improvisation like Changing Small letter to Capital Letter were required for UI Improvisation
meshery.io

Signed commits

[] Yes, I signed my commits.

Did you raise an issue or got an issue assigned before sending the PR?

 Hello Arunima ,Yes Actually I raised an issue . Please feel free to connect if anything else needs to address.Thankyou.   Sent from Mail for Windows From: Arunima ChaudhuriSent: 09 March 2023 21:53To: meshery/meshery.ioCc: Chandravijay rai; MentionSubject: Re: [meshery/meshery.io] Adding Transition Effect and Grammatical Improvisation (PR #1063) Did you raise an issue or got an issue assigned before sending the PR?—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID<EMAIL_ADDRESS>
Yes actually I raised is PR.

Actullay Arunima  I have added some transition effect feature in this PR

A PR correcting grammar, but using the wrong word ("improvisation") to describe the need for grammar correction is a little sketchy, @Cvr421. 😉


Fix prompt_table_data empty tensor shape error

When executing LLM in a VLM model alone, the correct prompt_table_data's hidden_size = self.hidden_size * tp_size, because self.hidden_size = pretrained_config.hidden_size // tp_size

@BasicCoder Thank you for your interest in TrtLLm. We have fixed it in our internal version, and it will be updated on GitHub soon.


2.0/Use CommandLineParser library

The CommandLineParser Nuget package could a better solution to parse command line arguments. Consider using it in the PackageCLI projects, since it worked well in the demo project used in issue #323

Please also consider https://learn.microsoft.com/en-us/dotnet/standard/commandline/, since that's what we are using in the CAR factory project.

Another consideration is Spectre.Console, which supports not only parsing command line args, but also advanced console output. This library is also used in Dumpify


bundle package --all » requiring password 1.12.4

Hi guys,
bumped our bundler version to 1.12.4 and our builds are failing with the following:
Your user account isn't allowed to install to the system Rubygems.
  You can cancel this installation and run:

      bundle install --path vendor/bundle

  to install the gems into ./vendor/bundle/, or you can enter your password
  and install the bundled gems to Rubygems using sudo.

Was there a major change that occurred?
Previously we undertook the following approach:
bundle package --all
bundle install --local

My colleague @sjauld believes it is due to a change that requires gems to be installed, and if the user issuing the command, then password is prompted (which, given ours is a remote machine, is not available).
Given that bundle package has no indication that it will attempt to perform any installations of gems to the system (and setting the flag --no-install does not change anything either) we are perplexed as to why bundle package would be attempting to install gems anywhere but ./vendor/cache as per the specification.

@jufemaiz Can't seem to reproduce this on my machine on 1.12.5
╭─boggs@archbook ~/dev/4612-test ‹ruby-2.3.0› ‹node-v4.4.1›
╰─➤  dbundle --version                                                                                1 ↵
Bundler version 1.12.5
╭─boggs@archbook ~/dev/4612-test ‹ruby-2.3.0› ‹node-v4.4.1›
╰─➤  cat Gemfile
source 'https://rubygems.org'

gem 'rack', '1.6.3'
╭─boggs@archbook ~/dev/4612-test ‹ruby-2.3.0› ‹node-v4.4.1›
╰─➤  dbundle package --all
Fetching gem metadata from https://rubygems.org/
Fetching version metadata from https://rubygems.org/
Resolving dependencies...
Installing rack 1.6.3
Using bundler 1.12.5
Bundle complete! 1 Gemfile dependency, 2 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
Updating files in vendor/cache
  * rack-1.6.3.gem
╭─boggs@archbook ~/dev/4612-test ‹ruby-2.3.0› ‹node-v4.4.1›
╰─➤  bundle install --local
Using rack 1.6.3
Using bundler 1.12.5
Updating files in vendor/cache
Bundle complete! 1 Gemfile dependency, 2 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
╭─boggs@archbook ~/dev/4612-test ‹ruby-2.3.0› ‹node-v4.4.1›
╰─➤  dbundle exec rackup --version                                                                                1 ↵
Rack 1.3 (Release: 1.6.3)

Could you confirm if this is still an issue with 1.12.5, or maybe perhaps give more details as to how to reproduce this issue?

ping @jufemaiz

Could you confirm if this is still an issue with 1.12.5, or maybe perhaps give more details as to how to reproduce this issue?

I will but currently traveling. Will try before flight tonight
On Thursday, 9 June 2016, Lynn Cyrin<EMAIL_ADDRESS>wrote:

ping @jufemaiz https://github.com/jufemaiz
Could you confirm if this is still an issue with 1.12.5, or maybe perhaps
give more details as to how to reproduce this issue?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/bundler/bundler/issues/4612#issuecomment-224832556,
or mute the thread
https://github.com/notifications/unsubscribe/AABAYXvGkSZu-6x6S1hQWf-Tc2vRrBfDks5qJ8_dgaJpZM4ImPg1
.

--
–
Joel Courtney
m: +61 401 501 625
e<EMAIL_ADDRESS>w: http://euphemize.net
p: http://flic.kr/jufemaiz/
t: http://twitter.com/jufemaiz

@jufemaiz Any update on this?

Closing due to lack of response from reporter.


[WIP] Add constraints

Code was taken from https://github.com/bytesandbrains/ProcessOptimizer with permission
Thanks to @sigurdcarlsen

Hello @holgern! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:

In the file skopt/optimizer/optimizer.py:

Line 638:80: E501 line too long (84 > 79 characters)

In the file skopt/space/constraints.py:

Line 22:80: E501 line too long (90 > 79 characters)
Line 30:80: E501 line too long (85 > 79 characters)
Line 44:80: E501 line too long (96 > 79 characters)
Line 53:80: E501 line too long (82 > 79 characters)
Line 75:80: E501 line too long (91 > 79 characters)
Line 77:80: E501 line too long (113 > 79 characters)
Line 79:80: E501 line too long (80 > 79 characters)
Line 81:80: E501 line too long (109 > 79 characters)
Line 87:80: E501 line too long (81 > 79 characters)
Line 95:80: E501 line too long (99 > 79 characters)
Line 101:80: E501 line too long (95 > 79 characters)
Line 103:80: E501 line too long (144 > 79 characters)
Line 105:80: E501 line too long (85 > 79 characters)
Line 109:80: E501 line too long (81 > 79 characters)
Line 122:80: E501 line too long (102 > 79 characters)
Line 124:80: E501 line too long (115 > 79 characters)
Line 132:80: E501 line too long (90 > 79 characters)
Line 133:80: E501 line too long (128 > 79 characters)
Line 145:80: E501 line too long (118 > 79 characters)
Line 157:80: E501 line too long (80 > 79 characters)
Line 168:80: E501 line too long (97 > 79 characters)
Line 185:80: E501 line too long (86 > 79 characters)
Line 187:80: E501 line too long (114 > 79 characters)
Line 190:80: E501 line too long (108 > 79 characters)
Line 193:80: E501 line too long (107 > 79 characters)
Line 196:80: E501 line too long (113 > 79 characters)
Line 199:80: E501 line too long (108 > 79 characters)
Line 221:80: E501 line too long (101 > 79 characters)
Line 222:80: E501 line too long (94 > 79 characters)
Line 226:80: E501 line too long (130 > 79 characters)
Line 237:80: E501 line too long (94 > 79 characters)
Line 243:80: E501 line too long (109 > 79 characters)
Line 247:80: E501 line too long (115 > 79 characters)
Line 250:80: E501 line too long (114 > 79 characters)
Line 251:80: E501 line too long (108 > 79 characters)
Line 253:80: E501 line too long (113 > 79 characters)
Line 256:80: E501 line too long (108 > 79 characters)
Line 270:80: E501 line too long (105 > 79 characters)
Line 272:80: E501 line too long (116 > 79 characters)
Line 281:80: E501 line too long (93 > 79 characters)
Line 283:80: E501 line too long (94 > 79 characters)
Line 285:80: E501 line too long (107 > 79 characters)
Line 301:80: E501 line too long (80 > 79 characters)
Line 317:80: E501 line too long (106 > 79 characters)
Line 318:80: E501 line too long (98 > 79 characters)
Line 323:80: E501 line too long (148 > 79 characters)
Line 333:80: E501 line too long (106 > 79 characters)
Line 335:80: E501 line too long (115 > 79 characters)
Line 344:80: E501 line too long (93 > 79 characters)
Line 346:80: E501 line too long (94 > 79 characters)
Line 348:80: E501 line too long (107 > 79 characters)
Line 380:80: E501 line too long (106 > 79 characters)
Line 381:80: E501 line too long (98 > 79 characters)
Line 386:80: E501 line too long (148 > 79 characters)
Line 395:80: E501 line too long (129 > 79 characters)
Line 401:80: E501 line too long (96 > 79 characters)
Line 407:80: E501 line too long (99 > 79 characters)
Line 412:80: E501 line too long (115 > 79 characters)
Line 414:80: E501 line too long (119 > 79 characters)
Line 420:80: E501 line too long (104 > 79 characters)
Line 422:80: E501 line too long (120 > 79 characters)
Line 433:80: E501 line too long (81 > 79 characters)
Line 435:80: E501 line too long (81 > 79 characters)
Line 438:80: E501 line too long (111 > 79 characters)
Line 443:80: E501 line too long (134 > 79 characters)
Line 452:80: E501 line too long (80 > 79 characters)
Line 453:80: E501 line too long (93 > 79 characters)
Line 463:80: E501 line too long (103 > 79 characters)
Line 466:80: E501 line too long (107 > 79 characters)
Line 506:80: E501 line too long (92 > 79 characters)
Line 524:80: E501 line too long (119 > 79 characters)
Line 528:80: E501 line too long (122 > 79 characters)
Line 534:80: E501 line too long (90 > 79 characters)
Line 547:80: E501 line too long (102 > 79 characters)
Line 553:80: E501 line too long (105 > 79 characters)
Line 558:44: E712 comparison to True should be 'if cond is True:' or 'if cond:'
Line 559:80: E501 line too long (115 > 79 characters)
Line 563:80: E501 line too long (84 > 79 characters)
Line 569:80: E501 line too long (80 > 79 characters)
Line 572:80: E501 line too long (108 > 79 characters)
Line 575:80: E501 line too long (97 > 79 characters)
Line 577:36: E701 multiple statements on one line (colon)
Line 577:80: E501 line too long (85 > 79 characters)
Line 587:80: E501 line too long (119 > 79 characters)
Line 595:80: E501 line too long (99 > 79 characters)
Line 598:80: E501 line too long (80 > 79 characters)
Line 601:80: E501 line too long (117 > 79 characters)
Line 602:80: E501 line too long (136 > 79 characters)
Line 606:80: E501 line too long (111 > 79 characters)
Line 607:80: E501 line too long (130 > 79 characters)
Line 611:80: E501 line too long (119 > 79 characters)
Line 612:80: E501 line too long (138 > 79 characters)
Line 634:80: E501 line too long (108 > 79 characters)
Line 639:80: E501 line too long (108 > 79 characters)
Line 658:80: E501 line too long (102 > 79 characters)
Line 661:80: E501 line too long (117 > 79 characters)
Line 665:80: E501 line too long (80 > 79 characters)
Line 671:80: E501 line too long (116 > 79 characters)

In the file skopt/tests/test_constraints.py:

Line 5:80: E501 line too long (98 > 79 characters)
Line 84:80: E501 line too long (95 > 79 characters)
Line 137:80: E501 line too long (80 > 79 characters)
Line 153:80: E501 line too long (82 > 79 characters)
Line 198:80: E501 line too long (83 > 79 characters)
Line 199:80: E501 line too long (83 > 79 characters)
Line 213:80: E501 line too long (87 > 79 characters)
Line 214:80: E501 line too long (87 > 79 characters)
Line 218:80: E501 line too long (87 > 79 characters)
Line 219:80: E501 line too long (87 > 79 characters)
Line 253:80: E501 line too long (86 > 79 characters)
Line 364:80: E501 line too long (81 > 79 characters)
Line 549:80: E501 line too long (118 > 79 characters)
Line 571:80: E501 line too long (118 > 79 characters)
Line 617:80: E501 line too long (81 > 79 characters)
Line 638:80: E501 line too long (84 > 79 characters)
Line 666:80: E501 line too long (91 > 79 characters)
Line 681:80: E501 line too long (91 > 79 characters)
Line 708:80: E501 line too long (91 > 79 characters)
Line 729:80: E501 line too long (91 > 79 characters)
Line 731:80: E501 line too long (92 > 79 characters)
Line 736:80: E501 line too long (91 > 79 characters)
Line 741:80: E501 line too long (91 > 79 characters)
Line 766:80: E501 line too long (106 > 79 characters)
Line 773:1: W391 blank line at end of file

Hi there, is there any plan to continue with the constraints? This would be really helpful for many applications.. and I currently desperately need this functionality ;-)


Database and small bu fixes

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

Needs approval from an approver in each of these files:

OWNERS

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

[APPROVALNOTIFIER] This PR is APPROVED
Approval requirements bypassed by manually added approval.
This pull-request has been approved by: leihchen
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS

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


Optimize asan CI job

This job is performing duplicate work and is one of the presubmit CI's largest bottlenecks.
 Ideas from @benvanik :

same exact compiler should be used to build the things, and same asan runtime should be used to run them, only difference is whether we pass a flag to iree-compile when building the test deps
only should have to rebuild test deps, nothing else
(and ideally, it shouldn't be a cmake flag that impacts each rule, but each test dep should have two artifacts and we should build one set or the other or both, then we configure once, build iree-test-deps iree-test-deps-with-asan)
so this whole run should be long-poled on building the compiler with asan on, but otherwise should be cheap
roughly 1-3mins longer than a normal build and test
(whatever the time to build test deps and run the tests is, but not the compiler)
we could also split the asan compiler/runtime into its own packages and build them concurrently with the other compiler, such that this just installs the asan compiler/runtime, builds test deps, and runs them
whether we pass --iree-llvmcpu-sanitize=address or not when building a test dep shouldn't be a giant global flag, just one variant of compiler flags for a test dep we should be able to build with (like building for cpu/vulkan/etc)
it's just cpu, cpu w/ sanitizer, vulkan, metal, etc
(we're going to need such things as we go deeper too - vulkan/spirv version variants, etc)
we have to move away from having big "IF VULKAN ENABLED THEN BUILD ONE VULKAN TEST CONFIG"
and not having to reconfigure for each variant :P

love the breakdown!
the only test deps that need to be rebuilt are the LLVM CPU ones - do we only run the LLVM CPU ones here or vmvx/vulkan/etc too? (if so, that'll cut things down even more)

love the breakdown! the only test deps that need to be rebuilt are the LLVM CPU ones - do we only run the LLVM CPU ones here or vmvx/vulkan/etc too? (if so, that'll cut things down even more)

IREE_BUILD_ALL_CHECK_TEST_MODULES is on (the default), so all the other ones are built too. It is useful to build them once (not twice), to ensure that those compilation pipelines are ASan-clean. Splitting the test definitions out and removing the top level IREE_BYTECODE_MODULE_ENABLE_ASAN option would let us keep that coverage without duplicating builds.

agreed - we've cause ASAN bugs in the compiler like that compiling things so good to keep once but agree shouldn't have to do them again with the llvm-cpu-specific asan variant mode

Sample run after refactoring: https://github.com/openxla/iree/actions/runs/8115687607/job/22184075017?pr=16452

Step
Time taken

Configure
1m10s

Build
6m

Build test deps
2m35s

Build microbenchmark suites
20s

Main ctest
27s

llvm-external-projects tests
24s

Total: 18m14s before changes --> 11m52 after changes


Order of commands in help is unreliable in Python <3.6

Expected Behavior
The order in which commands are shown in the help should be reliable across Python versions.
Actual Behavior
For Python >= 3.6, the order shown in the help text is the order in which the commands are added to the group. That is how it should be.
For Python <3.6, the order shown in the help text is not the order in which the commands are added to the group, and appears to be unpredictable (but pretty much repeatable).
The unpredictability and the changes across Python versions make it hard for users of Click to define testcases for the produced help.
Analysis shows that the use of a standard dictionary is the reason for this behavior. The standard Python dicttionaty became order-preserving with Python 3.6. We could show that replacing the dict in the following code with OrderedDict (minimally for Python < 3.6) solves the issue:
In click/core.py:
class Group(MultiCommand):
    . . .

    def __init__(self, name=None, commands=None, **attrs):
        MultiCommand.__init__(self, name, **attrs)
        #: the registered subcommands by their exported names.
        self.commands = commands or {}     # <- Use of standard Python dict causes the issue
        # self.commands = commands or collections.OrderedDict  # <- Addresses the issue

Environment

Python version: 2.7, 3.4, and higher
Click version: 7.1.1

See previous discussion in #672 and #513. Commands are ordered alphabetically, see Group.list_commands, so I'm not sure why you're seeing an inconsistent order. If you do want a different order, Group can be subclassed and overridden.
We're dropping support for Python < 3.6, as those versions are unsupported upstream. I don't really want to add more compat code at this point, especially since there are workarounds if your project needs that.

I forgot to mention that we do use an approach similar to the one in https://github.com/pallets/click/issues/513#issuecomment-301046782 for maintaining the original order. Sorry for that. The implementation of it overwrites self.commands after calling the super init, which I think is ugly, and that spawned my comment. We will change that to pass the commands list to the super init, as in the example from #513.
On "Python not supported upstream":

Python 3.5 is still supported for security fixes, EOL is 2020-09-13.
Python 2.7 and 3.4 are still in wide use, even after their EOL.
If we package owners believe we can remove support for EOL Python versions on the day it occurs, we are not doing the Python community a good service, overall. At least my view.


[ETL-425] Update bootstrap trigger to resolve missing data issue

Bootstrap trigger script now accepts a second parquet dataset and performs a union of the first and second dataset's "diff field" before taking a diff with the records on Synapse.
Crontab updated to use both sharedschema and archivemetadata datasets.

Accidentally submitted the wrong branch.


How to use environment variable in distribution config file

The scenario is that

I run distribution in containerA and redis in containerB
distribution use redis as cache
I use docker-compose for service management and link these two service together

However the traditional environment variable exposed by docker-compose doesn't match the override rule of distribution so if distribution support reference environment variable directly in configuration file it will be easy to deal with this scenario

@farmerworking the idea is to define the registry environmental variables in the docker compose yml file.   Variables set under the environment section will be visible in the container.

contents in docker-compose.yml
registry:
    image: registry:2
    links:
        - cache
cache:
    image: redis

the cache addr and port will be available at runtime and will be something like CACHE_PORT_6379_TCP_ADDR, CACHE_PORT_6379_TCP_PORT. However this information is dynamic which can't be defined under environment section
@RichardScothern

You have to name your environment variables in a specific manner described here:
https://github.com/docker/distribution/blob/master/docs/configuration.md#override-specific-configuration-options
Your issue is more specific to docker compose.  I am unsure if you can interpolate environment variables in the compose file - I suggest asking your question in the #docker-compose IRC channel.


Add link for pdf and zipped html for a C book

Include downloads link for a zipped html and pdf versions of a C book.

Excellent!


To support replace configMetaDataDisk with File registry

Please add unit test for IsBackendPingeable method and I will merge this. Thanks.

@maximilien  unit test for IsBackendPingeable method is done, please review it again, thanks!

Nice. Cheers :beers:


Set current working directory as default directory AND set default language env

If working in a really big svn directory. arc diff will check all changes from root svn directory.  Which will cost a lot of time and include lots of changes should not include in one commit.
Change it to current working directory will emit this con and following the default svn command action.
===========
While working in language other than english. svn info will generate strings can't parsed in regex patterns.  Leads to wrong svn info result.
set default language to english will fix it.

https://secure.phabricator.com/book/phabcontrib/article/contributing_code/#no-pull-requests


First design alignment BuckleScript Belt

We want a first rough stylistic review for the Belt documentation to make it easier on the eyes early on.
Goals:

[ ] Search component
[x] Module API Layout (such as Belt.List)
[x] Prose Layout (such as Belt Overview)
[x] Sidebar navigation (mobile support?)

The design should be provided via public URL.

I will close this for now since this is an ongoing process. The search component will be tracked in separate tasks later on.


Make Logo

Logo is made, looks awesome, and is on the readme and the main site banner
Test Checklist:

[x] Test Analysis & discussion with developer
[ ] Write Test Cases / Charters
[ ] Test Cases & Charters Reviewed
[ ] Test Cases Executed
[ ] Test Charters Executed
[x] Regression tests executed
[ ] Automation Tests added to project

Test Analysis

Only automation required is to check banner on both city and summary page to see if logo is visible ✅


Support for MongoDB ids

The following lines won't work with mongo ids since they are strings:
$stateParams.id = _.parseInt($stateParams.id);
if (!_.isNaN($stateParams.id)) {
    $scope.<%=id%> = _.find(<%=resourcePluralCap%>, {
        id: $stateParams.id
    });
}

https://github.com/chiefy/sails-generate-controller-angular/blob/master/templates/angular/controller.ejs#L36-L41
_.parseInt('53b3d2dd47fc86fa30a11d80') -> 53

Anyway thanks for the great generator!

I wish I read this before finding it out the hard way :)


Send X% of users from LMS to ViaHTML

... when the feature flag is on
We need that feature flag to be a ratio as well, so we can start redirecting a small amount of traffic first and then observe the effect.
This needs to happen in Via 3 only I think. LMS can switch content to original Via for PDFs + HTML, or selectively to Via 3 for PDFs, but I don't think it can do it for HTML content selectively.

The PR that does this is merged and deployed, but it's not enough, as Cloudflare caches the redirect and therefore it will only get sampled every X minutes.

I'd say this is done. We're still keeping an eye on it, but 100% of requests we're aware of are now being routed through ViaHTML.
There's a path in LMS I'm a bit nervous of and would like to check.


feat(rules): disallow inapplicable lifecycles

closes #126

Thanks for the PR! There are some corner cases which we should discuss. The first one (implementing an interface in a base class), is not something which can be solved trivially.


The info endpoint should export networking information

Currently, the /info endpoint exports compute and storage information, but no networking information. It should export all available network configurations like name of the bridge, CIDR being used etc. These should also be printed in the docker info command. A networking solution on top of Docker might find this information useful.

closing as duplicate of #3909, please continue the conversation there


Review & merge Completed tasks

These are the items Karen indicated were "Completed" in her notes

[x] Refactor show_hide_frequency_fields function (indicator_common_form_js.html) so form field are not displayed based on string comparison but based on value comparison. — Merged in #507
[x] Javascript file for French datepicker has been added to js folder. — Merged in #512
[x] Settings in base.py have been changed to localization is turned on according to user’s language preference. (Maybe this branch) — Merged in #506
[x] Rewrote datepicker code for target_frequency_start, so datepickers display the date according to the user’s language/locale preference. — Merged in #509

There are a few additional branches I need to review & merge:

[ ] localized-datepicker-reportingperiod
[ ] manual-input-target-datepicker


Make CallEntryPoint from blockifier derive Serialize and Deserialize

Which components does the task require to be changed? (think hard pls)
snforge
Description
So we can remove crates/cheatnet/src/blockifier_structs.rs, see #1549

We don't need to do so. Profiler will expose those strucutres as a package to simplfy meeting a contract. Relying on blockifier format in such communication protocol (which cannot have any breaking changes) is a bad idea.


SwipeMenuListView new Row added is showing First item data

When i'm adding an item to the adapter and call notifydatasetchanged, the item added is showing data of the First item in the list.
Even though getView is showing correct info.
Why is the listview not updating correctly?

I tested the code with a regular Listview and it works fine.

i'm also having this issue

I guess this is some of the reasons this is deprecated now, it looks like the library doesn't know how to handle the new adapter implementation for android new apis


Swipe Feature similar to system notifications

Closes #10

@nhdang103, I have added the swiping feature same as iOS System's. Please check out, and merge it if you think it is worth it.

Thanks for your support.


libbpf tests should test both JIT and interpret mode

libbpf tests should test both JIT and interpret mode
We currently only have tail call coverage in the libbpf test. Given that the paths for JIT and interpreter are different, it would make sense to test both.

Note: Support for program_type specific helpers in interpreter mode.


Use Java 21 as minimum runtime for jhipster-lite engine

See #7568

Good idea for jLite assistant 🐸
Will generated java code also require Java 21 ?

Good idea for jLite assistant 🐸 Will generated java code also require Java 21 ?

There's a discussion about that starting from that comment: https://github.com/jhipster/jhipster-lite/issues/7568#issuecomment-1786828602

cc @jdubois as it will probably impact your deployment


Need a way to specify Snappy install path

Original issue 26 created by electrum on 2011-08-01T00:06:28.000Z:
There doesn't seem to be a way to tell the build system that Snappy is installed in a non-standard location (e.g. in /opt/local using MacPorts).

Not currently. Please send pull request for consideration.


atf.shutdown() does not shutdown all testblocks

this is a bug :)
atf sm blockes forever if one testblock is not stopped when calling atf.shutdown()
also, I need to call atf.stop(testblock) for testblocks that have not even started (no atf.start(testblock) called before)

fixed in #130
@HannesBachter please test


[Metamask]

YNC: (Internal Use Only - Ignore)
URLs:

Primary URL:
Figma URL:

Details:
Describe the feature/enhancement/idea
Screenshots
Additional context

Issue is empty


Checkpoint moving a lot of graph into ingestor who uses it the most.

Yes, it's large and I apologize. And actually churned up more things I'd like to clean up, but outside of the scope of this particular PR.


Space Shooter: Game Over screen with game summary

Game summary results (score, time played, etc.) when the game is over

we did some of this!


Apache Lucene Renovation

Hello!
updated apache lucene from 4.x to 8.1.x which required some code changes. Since lucene can only read indexes which are not older than 1-2 major versions (according to the exception i got), I added a simple check which causes a rebuild task if the index is unreadable. (first commit)
The second commit removes usages of the deprecated RAMDirectory. I decided to not migrate it to MMapDirectory because the code path isn't used anywhere (or tested). Furthermore: MMapDirectory extends FSDirectory (which is currently used), so it wouldn't use the old code in any case.
tests are green and i also deployed a build to my blog and tested the index rebuilding once.

the only change i am not sure about is: https://github.com/mbien/roller/commit/10370c129dd5d5cb906095fc23be41bb69014179#diff-afa10aab8f67b8be187418bf4264950dR140
Since the search results are sorted by pubdate, lucene 8 wants this field to be a DocValue of type SORTED instead of NONE and throws a IllegalStateException. So i changed it to SortedDocValuesField which made lucene happy. This field type does not have the stored yes/no property which the StringField had. Javadoc recommends to add another StoredField if storage is required - I just don't know if its needed for roller so I left it out.

@mbien Wow this looks great. I will review and hope to merge this week.

let me know if you need any changes or a rebase etc

Thanks @mbien!


EISDIR Errors with pigment migration when using transformLibraries

Steps to reproduce
Follow the the migration to pigment css example with a basic Next.js project.
Current behavior
Adding in a basic  component from  @mui/material/button casues the below error
    unhandledRejection: Error: EISDIR: illegal operation on a directory, read
    at readFileSync (node:fs:448:20)
    at get code [as code] (/node_modules/@wyw-in-js/transform/lib/transform/Entrypoint.helpers.js:111:99)
    at new Entrypoint (/node_modules/@wyw-in-js/transform/lib/transform/Entrypoint.js:41:30)
    at Entrypoint.innerCreate (/node_modules/@wyw-in-js/transform/lib/transform/Entrypoint.js:129:27)
    at /node_modules/@wyw-in-js/transform/lib/transform/Entrypoint.js:85:47
    at EventEmitter.perf (/node_modules/@wyw-in-js/transform/lib/utils/EventEmitter.js:45:20)
    at Entrypoint.create (/node_modules/@wyw-in-js/transform/lib/transform/Entrypoint.js:84:25)
    at Entrypoint.createChild (/node_modules/@wyw-in-js/transform/lib/transform/Entrypoint.js:176:23)
    at BaseAction.processImports (/node_modules/@wyw-in-js/transform/lib/transform/generators/processImports.js:22:44)
    at processImports.next (<anonymous>)
    at /node_modules/@wyw-in-js/transform/lib/transform/actions/BaseAction.js:66:78
    at EventEmitter.action (/node_modules/@wyw-in-js/transform/lib/utils/EventEmitter.js:25:22)
    at BaseAction.emitAction (/node_modules/@wyw-in-js/transform/lib/transform/actions/BaseAction.js:131:39)
    at nextFn (/node_modules/@wyw-in-js/transform/lib/transform/actions/BaseAction.js:66:32)
    at processNext (/node_modules/@wyw-in-js/transform/lib/transform/actions/BaseAction.js:111:28)
    at Object.next (/node_modules/@wyw-in-js/transform/lib/transform/actions/BaseAction.js:120:9)
    at asyncActionRunner (/node_modules/@wyw-in-js/transform/lib/transform/actions/actionRunner.js:39:102)
    at asyncActionRunner (/node_modules/@wyw-in-js/transform/lib/transform/actions/actionRunner.js:46:28)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async asyncActionRunner (/node_modules/@wyw-in-js/transform/lib/transform/actions/actionRunner.js:46:22)
    at async asyncActionRunner (/node_modules/@wyw-in-js/transform/lib/transform/actions/actionRunner.js:46:22)
    at async asyncActionRunner (/node_modules/@wyw-in-js/transform/lib/transform/actions/actionRunner.js:46:22)
    at async asyncActionRunner (/node_modules/@wyw-in-js/transform/lib/transform/actions/actionRunner.js:46:22)
    at async asyncActionRunner (/node_modules/@wyw-in-js/transform/lib/transform/actions/actionRunner.js:46:22)
    at async Object.transform (/node_modules/@wyw-in-js/transform/lib/transform.js:107:20)
    at async Object.transform (/node_modules/@pigment-css/unplugin/build/index.js:273:24)
    at async Object.transform (/node_modules/unplugin/dist/webpack/loaders/transform.js:108:15)

Seeing that the error is coming from "transform", I comment out the below line in the next.config.mjs file and then the application builds.
 transformLibraries: ['@mui/material'],
Expected behavior
The above error doesn't occur when  transformLibraries: ['@mui/material'], is part of the next.config.mjs file.
Context
For now I'll continue on with my project with the transformLibraries commented out, but I don't actually understand how this is going to affect my project. It seems to work with it uncommented.
Your environment

npx @mui/envinfo
System:
    OS: macOS 13.4.1
  Binaries:
    Node: 20.15.1 - ~/.nvm/versions/node/v20.15.1/bin/node
    npm: 10.7.0 - ~/.nvm/versions/node/v20.15.1/bin/npm
    pnpm: Not Found
  Browsers:
    Chrome: 127.0.6533.122
    Edge: Not Found
    Safari: 16.5.2
  npmPackages:
    @emotion/react:  11.13.3
    @emotion/styled:  11.13.0
    @mui/core-downloads-tracker:  6.0.0-rc.0
    @mui/material: ^6.0.0-rc.0 => 6.0.0-rc.0
    @mui/material-nextjs: ^6.0.0-beta.6 => 6.0.0-dev.240424162023-9968b4889d
    @mui/material-pigment-css: ^6.0.0-rc.0 => 6.0.0-rc.0
    @mui/private-theming:  6.0.0-rc.0
    @mui/styled-engine:  6.0.0-rc.0
    @mui/system:  6.0.0-rc.0
    @mui/types:  7.2.15
    @mui/utils:  6.0.0-rc.0
    @types/react: latest => 18.3.4
    react: latest => 18.3.1
    react-dom: latest => 18.3.1
    typescript: latest => 5.5.4

Search keywords: pigment transformLibraries EISDIR

From some more fiddling it looks like this cryptic error message is a result from providing a custom theme object that might not be valid to the createTheme function in next.config.mjs

Actually now that I removed the erroneous theme config that was causing a simple button to not work, I attempted to add a basic Autocomplete straight from the documentation, and I'm getting a very similar error to above. Again, commenting out  transformLibraries: ['@mui/material'] causes the error to go away,
      <Autocomplete
        disablePortal
        options={top100Films}
        sx={{ width: 300 }}
        renderInput={(params) => (
          <TextField
            {...params}
            label="Movie"
          />
        )}
      />

The error
<EMAIL_ADDRESS>Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at iterateAndReplaceFunctions (/new/node_modules/@pigment-css/react/processors/chunk-RCGCH7H3.js:138:10)
    at/node_modules/@pigment-css/react/processors/chunk-RCGCH7H3.js:142:9
    at Array.forEach (<anonymous>)
    at iterateAndReplaceFunctions (/new/node_modules/@pigment-css/react/processors/chunk-RCGCH7H3.js:138:21)
    at/node_modules/@pigment-css/react/processors/chunk-RCGCH7H3.js:142:9
    at Array.forEach (<anonymous>)
    at iterateAndReplaceFunctions (/new/node_modules/@pigment-css/react/processors/chunk-RCGCH7H3.js:138:21)
    at Object.cssFnValueToVariable (/new/node_modules/@pigment-css/react/processors/chunk-RCGCH7H3.js:196:3)
    at StyledProcessor.processCss (/new/node_modules/@pigment-css/react/processors/styled.js:385:34)
    at StyledProcessor.processStyle (/new/node_modules/@pigment-css/react/processors/styled.js:306:31)
    at/node_modules/@pigment-css/react/processors/styled.js:209:12
    at Array.forEach (<anonymous>)
    at StyledProcessor.build (/new/node_modules/@pigment-css/react/processors/styled.js:208:20)
    at/node_modules/@wyw-in-js/transform/lib/plugins/collector.js:26:17
    at/node_modules/@wyw-in-js/transform/lib/utils/getTagProcessor.js:384:5
    at Array.forEach (<anonymous>)
    at applyProcessors (/new/node_modules/@wyw-in-js/transform/lib/utils/getTagProcessor.js:375:10)
    at/node_modules/@wyw-in-js/transform/lib/plugins/collector.js:25:42
    at EventEmitter.perf (/new/node_modules/@wyw-in-js/transform/lib/utils/EventEmitter.js:45:20)
    at collector (/new/node_modules/@wyw-in-js/transform/lib/plugins/collector.js:24:16)
    at PluginPass.pre (/new/node_modules/@wyw-in-js/transform/lib/plugins/collector.js:51:26)
    at transformFile (/new/node_modules/@babel/core/lib/transformation/index.js:73:27)
    at transformFile.next (<anonymous>)
    at run (/new/node_modules/@babel/core/lib/transformation/index.js:24:12)
    at run.next (<anonymous>)
    at/node_modules/@babel/core/lib/transform-ast.js:23:33
    at Generator.next (<anonymous>)
    at evaluateSync (/new/node_modules/gensync/index.js:251:28)
    at sync (/new/node_modules/gensync/index.js:89:14)
    at stopHiding - secret - don't use this - v1 (/new/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js:47:12)
    at Object.transformFromAstSync (/new/node_modules/@babel/core/lib/transform-ast.js:43:83)
    at BaseAction.collect (/new/node_modules/@wyw-in-js/transform/lib/transform/generators/collect.js:50:24)
    at collect.next (<anonymous>)
    at/node_modules/@wyw-in-js/transform/lib/transform/actions/BaseAction.js:66:78
    at EventEmitter.action (/new/node_modules/@wyw-in-js/transform/lib/utils/EventEmitter.js:25:22)
    at BaseAction.emitAction (/new/node_modules/@wyw-in-js/transform/lib/transform/actions/BaseAction.js:131:39)
    at nextFn (/new/node_modules/@wyw-in-js/transform/lib/transform/actions/BaseAction.js:66:32)
    at processNext (/new/node_modules/@wyw-in-js/transform/lib/transform/actions/BaseAction.js:111:28)
    at Object.next (/new/node_modules/@wyw-in-js/transform/lib/transform/actions/BaseAction.js:120:9)
    at asyncActionRunner (/new/node_modules/@wyw-in-js/transform/lib/transform/actions/actionRunner.js:39:102)
    at asyncActionRunner (/new/node_modules/@wyw-in-js/transform/lib/transform/actions/actionRunner.js:46:28)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Object.transform (/new/node_modules/@wyw-in-js/transform/lib/transform.js:107:20)
    at async Object.transform (/new/node_modules/@pigment-css/unplugin/build/index.js:273:24)
    at async Object.transform (/new/node_modules/unplugin/dist/webpack/loaders/transform.js:108:15)

And the stack trace I posted in the original report proceeds after the above stack trace.


Deprecated use of CREATE DATABASE in a read only context, use a POST …

…request instead
Required for all non-trivial PRs

[x] Rebased/mergable
[x] Tests pass
[x] CHANGELOG.md updated
[x] Sign CLA (if not already signed)

Required only if applicable
You can erase any checkboxes below this note if they are not applicable to your Pull Request.

Thanks!


Typeorm can't find a connection

Summary
I have a side project currently using this library. I set-up auth through the Github provider 🐈 ( so far so good ).
Not so long ago I raised an issue on how to retrieve the access token provided by Github to be able to call its API.
@LoriKarikari pointed me on this other issue: https://github.com/iaincollins/next-auth/issues/128, which explained a way to do this, here is my code for it:
// pages/api/github/get-token.ts
import { getConnection } from 'typeorm'
import Adapters from 'next-auth/adapters'
import * as NextAuth from 'next-auth/client'
import { NextApiRequest, NextApiResponse } from 'next'

interface SessionConnection {
  userId: string
}

export default async function getToken(
  req: NextApiRequest,
  res: NextApiResponse
) {
  let account = null,
    error = null

  try {
    const connection = getConnection()
    const session = await NextAuth.getSession({ req })
    const { model: accountModel } = Adapters.TypeORM.Models.Account
    const { model: sessionModel } = Adapters.TypeORM.Models.Session

    const sessionConnection = await connection
      .getRepository(sessionModel)
      .findOne({ accessToken: session?.accessToken })

    account = await connection
      .getRepository(accountModel)
      .findOne({ userId: (sessionConnection as SessionConnection).userId })
  } catch (e) {
    error = e.message
  }

  res.status(200).send({ account, error })
}

It's called client-side when the application loads, so calls to the Github API can be formed.
So far it was working so good until recently where this line:
const connection = getConnection()

blows up 💥 😢 , having the following set-up for NextAuth:
{
  site: process.env.NEXTAUTH_SITE,
  providers: [
    Providers.GitHub({
      clientId: process.env.GITHUB_ID,
      clientSecret: process.env.GITHUB_SECRET,
      scope:
        'user public_repo repo repo_deployment repo:status read:repo_hook read:org read:public_key read:gpg_key',
    }),
  ],
  database: process.env.DATABASE_URL,
}

When calling getConnection() server-side I noticed ( through the debugger ) that there's no active connections on TypeORM's connection pool:

and hence and error is thrown preventing to initialise the app ( "Connection 'default' was not found" ).
Any help with this highly appreciated ❤

Have retagged this as it's not a bug in NextAuth.js but rather a question about TypeORM.
That approach looks good to me (RE: how the models are handled). Reliable connection handling with TypeORM can be tricky, especially with serverless and/or the behaviour of clients in development mode (like Hot Module Reloading).
I was just mentioning the complexity of this in #385 as it happens, I think a lot of folks underestimate it.
This is really a question for the TypeORM forum, but as an example, the logic that the TypeORM adapter in NextAuth.js uses to check a connection is valid is something like this:
async function _connect () {
  // Get current connection by name
  connection = getConnection(config.name)

  // If connection is no longer established, reconnect
  if (!connection.isConnected) { connection = await connection.connect() }
}

if (!connection) {
  // If no connection, create new connection
  try {
    connection = await createConnection(config)
  } catch (error) {
    if (error.name === 'AlreadyHasActiveConnectionError') {
      // If creating connection fails because it's already
      // been re-established, check it's really up
      await _connect()
    } else {
      logger.error('ADAPTER_CONNECTION_ERROR', error)
    }
  }
} else {
  // If the connection object already exists, ensure it's valid
  await _connect()
}

We do this before making any call, because we don't know how long a process has been idle and if the connection has dropped on if the function has been suspended or restarted recently.

Thanks @iaincollins for the explanation ❤ 🎊
I have enhanced the getConnection() logic as you suggested to check if one is present and if not create one.
I think though the issue is deeper in my app:
const sessionConnection = await connection
  .getRepository(sessionModel)
  .findOne({ accessToken: session?.accessToken })

as it now doesn't seem to relate the existing session to the new connection:

I wonder if we could expose a declarative API in next-auth to retrieve access_token from the providers easily:
import { getProviderAccessToken } from 'next-auth'

I'm more than happy to contribute to this 🤞🏻 🙃

I advanced a bit more on this 💪🏻
Basically I had to call in my API route:
NextAuth.setOptions({ site: process.env.NEXT_AUTH_SITE })

as documented here for NextAuthClient.getSession() to work.
The last step for me is to learn and how to create a new TypeORM connection properly, as I'm doing:
async function connectToDb() {
  // ...
  if (!connection) createConnection(
    // I need to pass the correct options here...
  )
}

@lluia Yeah sorry needing to call NextAuth.setOptions() here is annoying - this is fixed in v3 as it uses an environment variable to configure it everywhere in the app once, instead of needing to set the site option in multiple places!
The example site at https://next-auth-example.now.sh is actually doing this running v3 beta if you'd like an example :-)
RE: TypeORM connection - We should have a tutorial for how to do things like this for sure!
I was really surprised how much custom connection handling code was required with NextAuth.js and would be interested to hear from TypeORM folks on their opinion on the approach we have taken, and if they can suggest ways it could be simplified, without triggering some of the issues we saw that lead to us taking the approach we currently have.

Reliable connection handling with TypeORM can be tricky, especially with serverless and/or the behaviour of clients in development mode (like Hot Module Reloading).

I've opened an issue in TypeORM repo some time ago: https://github.com/typeorm/typeorm/issues/6241
There is a working example of how to handle HMR (it should work for serverless also) with TypeORM: https://github.com/typeorm/typeorm/issues/6241#issuecomment-643690383

@iaincollins
Regarding this code: https://github.com/iaincollins/next-auth/blob/d38cd54deeb225774c016407e80444ff206a4273/src/adapters/typeorm/index.js#L52-L68
You cannot rely on your connection var here since in serverless mode this var can become completely different (on some particular function (I mean FAAS) execution). But you can try to retrieve existing connection by using TypeORM getConnection() by connectionManager.get() function:
if (connectionManager.has(name)) {
  return connectionManager.get(name);
}

return connectionManager.create().connect();

Also try...catch method you use didn't work well for me (at least in HMR mode, I didn't check it in real serverless), but if has() then get() else create() works well.
One more point is about this line you use:
  // If connection is no longer established, reconnect
  if (!connection.isConnected) { connection = await connection.connect() }

Probably it does nothing because... look at the code of TypeORM Connection: https://github.com/typeorm/typeorm/blob/ed75d59f27e673c58c4c7bfef85835c132ac5836/src/connection/Connection.ts
You will not find where isConnected variable is set to false. If the connection is no longer established, it is probably handled under the hood, TypeORM doesn't handles this and doesn't reflect the status of the connection.

Ah I'm sorry I'm so inattentive. You firstly try to create connection and then, if there is an error, you try to get an existing.

That code could probably use more comments to explain why some of that logic exists. Some of the handling was issues I only saw on some scenarios (I think at least some of it was specific to handling an issue I only encountered with SQLite).

You cannot rely on your connection var here since in serverless mode this var can become completely different (on some particular function (I mean FAAS) execution).

The connection is scoped to the encapsulating function (Adapter) there isn't a problem with the approach here.

But you can try to retrieve existing connection by using TypeORM getConnection() function or connectionManager.get() method:

I would love to remove some of this logic and just do this, but unfortunately using the connection manager alone that comes with TypeORM doesn't seem to be reliable enough.
Using the built in connection manager to handle this was the very first thing I tried, and it had to be refactored out because it didn't work well enough in practice (e.g. connections would go stale, because they existed but didn't work because it seemed like they timed out and that wasn't being checked for by the connection manager).
The approach we have ended up with comes from real-world cross database testing, with some insights from Stack Overflow from folks who had run into similar problems with TypeORM and had to write their own connection handlers. If you'd like to raise a PR to suggest any specific improvements for folks to test out and to feedback on, that is always welcome.

Also try...catch method you use didn't work well for me for some reason (at least in HMR mode, I didn't check it in real serverless), but if has() then get() else create() works well.

Can you elaborate on what you mean by "didn't work well" for you?
Do have a replicable problem or get an error message?
After several hours of running locally with Postgres, MySQL, MongoDB and SQLite databases I haven't run into any issues (touch wood), but if you are getting an error or encountering a recurring problem we can replicate that's something we might be able to help with.

For me, now I'm getting this error on any API route 🤯
(node:8400) UnhandledPromiseRejectionWarning: TypeError: Cannot read property '0' of undefined
    at /Users/lluis.agusti/Code/hip-hub/node_modules/next-auth/dist/server/index.js:63:28
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (/Users/lluis.agusti/Code/hip-hub/node_modules/next-auth/dist/server/index.js:44:103)
    at _next (/Users/lluis.agusti/Code/hip-hub/node_modules/next-auth/dist/server/index.js:46:194)
    at /Users/lluis.agusti/Code/hip-hub/node_modules/next-auth/dist/server/index.js:46:364
    at new Promise (<anonymous>)
    at /Users/lluis.agusti/Code/hip-hub/node_modules/next-auth/dist/server/index.js:46:97
    at /Users/lluis.agusti/Code/hip-hub/node_modules/next-auth/dist/server/index.js:312:22
    at new Promise (<anonymous>)
    at /Users/lluis.agusti/Code/hip-hub/node_modules/next-auth/dist/server/index.js:53:12
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (/Users/lluis.agusti/Code/hip-hub/node_modules/next-auth/dist/server/index.js:44:103)
    at _next (/Users/lluis.agusti/Code/hip-hub/node_modules/next-auth/dist/server/index.js:46:194)
    at /Users/lluis.agusti/Code/hip-hub/node_modules/next-auth/dist/server/index.js:46:364
    at new Promise (<anonymous>)
    at /Users/lluis.agusti/Code/hip-hub/node_modules/next-auth/dist/server/index.js:46:97
(node:8400) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3)

Happens in both 3.0.0-beta, 2.2.0 and 2.2.1-beta.
I simplified my route to the simplest ( and moved to try to read the session from JWT to discard issues with TypeORM )
// pages/api/github/get-token
import { setOptions, getSession } from 'next-auth/client'
import { NextApiRequest, NextApiResponse } from 'next'

setOptions({ site: process.env.NEXTAUTH_URL })

export default async function getToken(
  req: NextApiRequest,
  res: NextApiResponse
) {
  const session = await getSession({ req })
  console.log('>>>>>>>>> session', session)
  res.end()
}

with this config:
{
  site: process.env.NEXTAUTH_URL!,
  providers: [
    Providers.GitHub({
      clientId: process.env.GITHUB_ID!,
      clientSecret: process.env.GITHUB_SECRET!,
      scope:
        'user public_repo repo repo_deployment repo:status read:repo_hook read:org read:public_key read:gpg_key',
    }),
  ],
  secret: process.env.JWT_SECRET,
  session: {
    jwt: true,
  },
  callbacks: {
    jwt: async (token, oAuthProfile) => {
      console.log('>>>>>>', token)
      console.log('>>>>>>', oAuthProfile)
    },
  },
}

but the server blows-up 💥  with the strange error above.
My project is running on TS, so maybe is something related to it... I noticed @arnodel was pointing a similar issue here.

@lluia Yup, getting the same issue now that I've updated to 2.2.0

So ive run into the same problem (https://github.com/iaincollins/next-auth/issues/467) in regards to  https://github.com/iaincollins/next-auth/issues/390#issuecomment-654160452 around HMR and TypeORM. This effectively makes dev unusable since changing any file basically causes a connection issue. Has anyone managed to find a workaround to this problem? I am using typescript with next and not js.


Audit findings

Hi thank you very much for your modifications
For the solidity version (CVF 21), -Why use the version 0.8.12 ? -Why not use the same version and notation than for DVP.sol ?

All contracts now use 0.8.17

@veorq Please accept PL now. We are fine with the generic ERC20 error messages separately handling insufficient allowance and balance, instead of explicit testing within DvP and therefore additional gas costs. (as mentioned in the security audit)


Add an option to set temporary redirect code

I've currently just manually modified the file doing this, but as I'm setting this up in Docker, I'd like to use your repo as the source (rather than my own)
Hopefully this is acceptable :]

You're doing it wrong, there is a plugin api just for this kind of behavior. I'm sure there is even a plugin for this already.
As a general rule, there should be LESS options rather than more.


Error thrown when Enum is used as parameter.

While this plugin displays schema as expected,

it's not displaying an API's parameters if one of those parameters is an enum.

And it's throwing errors in developer tools console.

The screenshot below is the API without the plugin, I'm expecting that with the help of the plugin, the dropdown would list the enum's name instead of the values.

@DamienLaw Would you provide a spec json/yaml that reproduces the error?
Does it happen from 4.1.0? I guess it doesn't happen with 4.0.1.

I'm using<EMAIL_ADDRESS>and<EMAIL_ADDRESS>Even the latest version 4.14.3 and 4.1.0 respectively have this issue.
You can refer to the swagger UI at
https://bankbot.bytedash.my/swagger
A sample of the yaml can be found here
https://bankbot.bytedash.my/swagger/v1/swagger.yaml
Take a look at the GetAll apis of BankAccount, BankTransaction or BankLog

That was fast. Thanks a lot.
I've tested it and it's working fine. There's a suggestion on multi-selectable enums that I would like to put forth.
I'll open a new issue for that.


Mitigation for US-CERT VU#797896

US-CERT VU#797896 (and others) describes an attack where an end-user is capable of overriding the proxy setting for multiple FastCGI backends.
I propose we help mitigate this attack by removing the variable before reaching the backend as proposed by multiple vendors and industry players.
Sources:
https://www.kb.cert.org/vuls/id/797896
https://httpoxy.org/
https://www.nginx.com/blog/mitigating-the-httpoxy-vulnerability-with-nginx/
Relevant CVEs:
CVE-2016-5385: PHP
CVE-2016-5386: Go
CVE-2016-5387: Apache HTTP Server
CVE-2016-5388: Apache Tomcat
CVE-2016-1000109: HHVM
CVE-2016-1000110: Python

This doesn't cover the case, where you proxy the request to another server, e.g. if you use nginx only for ssl termination and the actual execution of any application is made internally by Apache or another nginx server or whatever crazy setups there're used in the wild. So I would propose to set
proxy_set_header Proxy "";
just in case, too (in templates/vhost/locations/proxy.erb).  There is nearly no reason I can imagine, where you would need this header and if so, we probably can make it configurable but enabled by default.

I think this is better solved by #835 - I'll close this PR.


Does KubeShare work well on cuda 11.0+?

Hello,
I run kubeshare on cuda 11.6 with NVIDIA GeForce RTX 3090 Ti (24GiB). It seems to be well that I create sharepod. But some limitations can't take effect. For example, I set the gpu_limit  to 0.5, but after running， I found the actual GPU core usage more than the gpu_limit, may be 0.7.

Hi, Kubeshare works on cuda11+, but please use our 2.0 version.


fix: process activity result that are relevant

Thanks for submitting a PR! Please read these instructions carefully:

[x] Explain the motivation for making this change.
[x] Provide a test plan demonstrating that the code is solid.
[x] Match the code formatting of the rest of the codebase.
[x] Target the master branch, NOT a "stable" branch.

Motivation (required)
Verifying seedless backup flow on Android, we found a crash when the user taps on the backup verification link. Error stack trace indicates that NullPointerException error occurs on getAbsolutePath() on this line. The [onActivityResult()](https://github.com/ExodusMovement/react-native-image-picker/blob/exodus/android/src/main/java/com/imagepicker/ImagePickerModule.java#L359) was triggered although user didn't interact with any image picker features.
The solution written here was inspired by a PR from upstream. We stop further execution on onActivityResult() if the request code is invalid.
See the following screencast for details: https://www.loom.com/share/3080911fd3cd46f5b9dabed248d55797
closes: https://app.asana.com/0/1202170937152401/1203667658145392/f
Test Plan (required)
Setup
(simulate deep link click via adb shell won't reproduce crash, hence need to run seedless backup workflow)

Use Android emulator with API 13.0 with Google Play
Ensure emulator has Google Play Service
Login to your Google account on android emulator
Setup and run seedless server locally, see https://github.com/ExodusMovement/seedless for instructions
on exodus-mobile, apply the following diff:

diff --git a/src/_local_modules/seedless/selectors/is-ready.js b/src/_local_modules/seedless/selectors/is-ready.js
index 03a36a5dc..7fdd851c2 100644
--- a/src/_local_modules/seedless/selectors/is-ready.js
+++ b/src/_local_modules/seedless/selectors/is-ready.js
@@ -1,5 +1,5 @@
 import { get } from 'lodash'

-const isReadySelector = (state) => get(state, 'seedless.loaded') || false
+const isReadySelector = (state) => true // get(state, 'seedless.loaded') || false

 export default isReadySelector

diff --git a/src/constants/seedless.js b/src/constants/seedless.js
index e528d0aa2..6649e5b49 100644
--- a/src/constants/seedless.js
+++ b/src/constants/seedless.js
@@ -4,7 +4,7 @@ import { enableSeedlessLocalTimelockServer, isIos, enablePrivateFeatures } from
 export { enableSeedless } from '~/constants/env'

 const TIMELOCK_SERVER_DEV_URL = enableSeedlessLocalTimelockServer
-  ? `http://${getPackagerHost()}:5330/api`
+  ? `http://<IP_ADDRESS>:5330/api`    // connect to local server correctly
   : 'https://watermelon-d.exodus.io/api'

 const TIMELOCK_SERVER_PROD_URL = 'https://watermelon-p.exodus.io/api'

ensure local seedless server is running
run command on exodus-mobile:

ENABLE_SEEDLESS=true LOCAL_SEEDLESS_SERVER=true yarn metro
yarn android:genesis

to reproduce crash => install react-native-image-picker of "exodus" branch locally on exodus-mobile
to resolve crash => install react-native-image-picker of "nafis/filter-request-code" branch locally on exodus-mobile
Resolve crash
Given the user open Profile > Security > Backup > Keyless Backup
and they enter google email
and they tap create keyless backup button
and app shows Check Your Email page
When they receive email containing the backup verification link
and they tap the link
expected: Then app able to complete the backup process
actual: Then app crash

@nafisholeh the PR template is from the original repo, not from us, so you needn't have followed it. That said we will want to issue the same fix on the main repo, let's capture that.

postMerge utACK, nice finding


[MRESOLVER-258] Collapse collectors

As DF (original) and BF (added in 1.8) started as copy-paste of each other, they
share a LOT. This PR tries to minimize redundancy, still, not loosing clarity,
so leaving inner Args class for each of them.

https://issues.apache.org/jira/browse/MRESOLVER-258

@caiwei-ebay2 @caiwei-ebay can you have a look also?

and @weibo1995

@cstamas merge ahead!


feat(cacheDir): Add ability to cache optimized images

a la https://github.com/Klathmon/imagemin-webpack-plugin#optionscachefolder

cc @anncwb for vis/review


Blog posts unable to add modules or edit current modules on blog post

This does not apply for blog posts with sidebar, however blog posts with sidebar also behave weirdly.
For Blog posts with sidebar, you can add modules, but only within an allocated space for content.

there was no issue, all works as expected


[feat] Use ad-hoc code signing on macOS if no certificate is provided

Describe the problem
adhoc code signing the app will result in aarch64 binaries behaving like x86_64. This means you'll get rid of the "app is damaged" dialog and then proceed to open the app via right click -> open (double click still won't work without a proper cert)
Describe the solution you'd like
codesign -s - appname
Alternatives considered
None, we should just do it 🤷
Additional context
No response

Hmm.. I think it could be done by setting "signingIdentity": "-" in tauri.config.json?

Hmm.. I think it could be done by setting "signingIdentity": "-" in tauri.config.json

It works! Very useful for simple projects that don't intend to sign it with an Apple certificate, as otherwise, the aarch64 binary won't open at all.

good to know! Maybe we should change the template to include an empty string for that then? Or well, i'd still prefer to do that in tauri directly if no config is provided.

I see that doing it in Tauri directly is fine since it's already an ad-hoc signature by default; just maybe increasing the build time?

You can apply it only if ARCH is aarch64 because on x86_64 it's not neccesery

@pewsheen

Hmm.. I think it could be done by setting "signingIdentity": "-" in tauri.config.json?
Updated A quick test on my MacBook without specifying signingIdentity. Looks like it signs with ad-hoc by default?

I found that if I include frameworks in the bundle for macOS while use signingIdentity: "-" then the signature of the binary is different from the frameworks, as a result the program crash with error:

crash.log
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process:               vibe [9728]
Path:                  /private/var/folders/*/vibe.app/Contents/MacOS/vibe
Identifier:            github.com.thewh1teagle.vibe
Version:               0.0.7 (20240331.130136)
Code Type:             ARM-64 (Native)
Parent Process:        launchd [1]
User ID:               501

Date/Time:             2024-03-31 17:32:41.6653 +0300
OS Version:            macOS 14.2.1 (23C71)
Report Version:        12
Anonymous UUID:        7A186555-****-****-****-8A9E775EA360

Sleep/Wake UUID:       9F619295-****-4F84-****-B8A41CF97584

Time Awake Since Boot: 54000 seconds
Time Since Wake:       509 seconds

System Integrity Protection: enabled

Crashed Thread:        0

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000

Termination Reason:    Namespace DYLD, Code 1 Library missing
Library not loaded: @rpath/libavcodec.60.dylib
Referenced from: <77478CF6-E9C0-3A8B-ABAC-C2A865347C92> /private/var/folders/*/vibe.app/Contents/MacOS/vibe
Reason: tried: '/private/var/folders/sz/4_ymp61s34jdxsgqgtbrs3vh0000gn/T/AppTranslocation/8332B0A9-7A6C-4F94-8342-6D9F8D2C6B89/d/vibe.app/Contents/Frameworks/libavcodec.60.dylib' (code signature in <58B6E688-46CD-3B8B-ABCD-648EDE79FFA5> '/private/var/folders/sz/4_ymp61s34jdxsgqgtbrs3vh0000gn/T/AppTranslocation/8332B0A9-7A6C-4F94-8342-6D9F8D2C6B89/d/vibe.app/Contents/Frameworks/libavcodec.60.dylib' not valid for use in process: mapping process and mapped file (non-platform) have different Team IDs), '/private/var/folders/sz/4_ymp61s34jdxsgqgtbrs3vh0000gn/T/AppTranslocation/8332B0A9-7A6C-4F94-8342-6D9F8D2C6B89/d/vibe.app/Contents/Frameworks/libavcodec.60.dylib' (code signature in <58B6E688-46CD-3B8B-ABCD-648EDE79FFA5> '/private/var/folders/sz/4_ymp61s34jdxsgqgtbrs3v
(terminated at launch; ignore backtrace)

action log

hey there. I just went through tauri hello world and built aarch64 in github actions... And get that "app is damaged message" and landed here. Everything was running so smoothly before that.

@laduke
See https://github.com/Martichou/rquickshare/commit/44de621f0d752c78e60a94b5bdb3298355e1eff7


[webapi] Sync WebStorage upstream tests

Impacted tests(approved): new 4, update 23, delete 1
Unit test platform: Crosswalk Project for Android 19.49.508.0
Unit test result summary: pass 128, fail 2, block 4
BUG=https://crosswalk-project.org/jira/browse/XWALK-6729
https://crosswalk-project.org/jira/browse/XWALK-4595

Any reason for the failures?

These failure and block tests need server.

We have a tinyweb service, only need to set "hosted-app": "true" in suite.json, see  tct-xmlhttprequest-w3c-tests for instance, or you can ask @haoxli for help.

but webstorage test suite also have bdd cases, if i add the test suite into all-in-one, it can't run.

@Honry , webstorage test suite has been added into allinone list, and the bdd cases also can run. please review!

Thanks, LGTM


Amend NEP6 for NEO3

Now the script it's in base 64 format
Based in my conversation with guil from neow3j

The address format should be changed too.

The implementation link to the NEP6Wallet.cs in this NEP is invalid
Both linked implementations are now invalid due to this change

NEP6Wallet.cs from neo3? what it's wrong?

NEP6Wallet.cs from neo3? what it's wrong?

The link gets a 404.
You're right on the latest implementation of NEP6Wallet.cs to correctly support it. Was watching at an old copy 😑


about arch

Hi,
I am wondering if you could share the arch/model?
Or I'm trying to implement it myself and have some problems. If you can help me, it will be great.

the dynamic weight part of MHDLSA. from eq. 1, I refer to https://github.com/Atten4Vis/DemystifyLocalViT/blob/master/models/dwnet.py
maybe a pool use first?
in eq. 1, the num of squeeze factor?
in eq. 1, the num of the kernel size?
I refer to FFN in https://github.com/swz30/Restormer/blob/main/basicsr/models/archs/restormer_arch.py.
maybe ffn_expansion_factor is 1?
some help for test TLC ?

if you can share a onnx model file with like onnx.save(onnx.shape_inference.infer_shapes(onnx_model), model_file), it will help me to refer to the arch structure in ntron.app.
Anyway, I'm still looking forward to the official arch‘s release.
Thx!

😬hiii

There is no pooling operation in MHDLSA since doing so would result in some information loss for SR tasks.
Due to the comparable parameter count with MHSA, the squeeze factor number is 4.
The num of kernel size is 7, compares to the 8 window size of MHSA.
The fnn_expansion_factor is 2, compares to the SwinIR.
The kernel size of TLC is set to 48 (the training patch size) for the x4 upscale factor.

Tips: We reconstruct the https://github.com/Atten4Vis/DemystifyLocalViT/blob/master/models/dwnet.py into MHDLSA, as indicated in the paper. We are grateful for the excellent work done by the https://github.com/Atten4Vis/DemystifyLocalViT/
🙏: We apologize for not extending our work to the onnx model for mobile devices.
TODO: Soon, we'll make the archs file available with more information about the network architecture.
We admit that our work has advanced significantly as a result of our completion of several details during the network structure design phase. I do, however, hope that it might help you in applying the methods that we proposed.

😬hiii

There is no pooling operation in MHDLSA since doing so would result in some information loss for SR tasks.
Due to the comparable parameter count with MHSA, the squeeze factor number is 4.
The num of kernel size is 7, compares to the 8 window size of MHSA.
The fnn_expansion_factor is 2, compares to the SwinIR.
The kernel size of TLC is set to 48 (the training patch size) for the x4 upscale factor.

Tips: We reconstruct the https://github.com/Atten4Vis/DemystifyLocalViT/blob/master/models/dwnet.py into MHDLSA, as indicated in the paper. We are grateful for the excellent work done by the https://github.com/Atten4Vis/DemystifyLocalViT/
🙏: We apologize for not extending our work to the onnx model for mobile devices.
TODO: Soon, we'll make the archs file available with more information about the network architecture.
We admit that our work has advanced significantly as a result of our completion of several details during the network structure design phase. I do, however, hope that it might help you in applying the methods that we proposed.

thx your quick replay.

no pool seems the dim do not mach? how to get that work? maybe I just miss this part in the whole implemente.
2-5.  fine

onnx just request for more detiles of arch. if official arches will release soon. onnx is not needed.
thx your good work!

😬hiii

There is no pooling operation in MHDLSA since doing so would result in some information loss for SR tasks.
Due to the comparable parameter count with MHSA, the squeeze factor number is 4.
The num of kernel size is 7, compares to the 8 window size of MHSA.
The fnn_expansion_factor is 2, compares to the SwinIR.
The kernel size of TLC is set to 48 (the training patch size) for the x4 upscale factor.

Tips: We reconstruct the https://github.com/Atten4Vis/DemystifyLocalViT/blob/master/models/dwnet.py into MHDLSA, as indicated in the paper. We are grateful for the excellent work done by the https://github.com/Atten4Vis/DemystifyLocalViT/
🙏: We apologize for not extending our work to the onnx model for mobile devices.
TODO: Soon, we'll make the archs file available with more information about the network architecture.
We admit that our work has advanced significantly as a result of our completion of several details during the network structure design phase. I do, however, hope that it might help you in applying the methods that we proposed.

thx your quick replay.

~no pool seems the dim do not mach? how to get that work? the Reshape() in eq.1 combine H*W to 1? how? and what is G mean? maybe I just miss this part in the whole implemente. thx ~
seems I miss the line x denotes the pixel index. have a clue thx, so it is idynamic? G head use? and maybe a code example for  The detailed network of the dynamic weight generation is shown in Figure 2. Similar to the multi-head selfattention methods [21, 23, 31], we divide the number of feature channels into G heads and learn separate dynamic weights in parallel
2-5.  fine

onnx just request for more detiles of arch. if official arches will release soon. onnx is not needed.
thx your good work!

Literally, the brilliant work of idyanamic from Atten4vis is the foundation for our proposed MHDLSA. We devoted a lot of effort to reconstructing the DemystifyLocalViT, though, because it was designed for high-level computer vision tasks. Ultimately, we proposed our MHDLSA for SR tasks. As pointed out in the paper, in order to provide a more relevant attention map for dynamic convolution, we remove the redundant normalization layer and non-linear activation and add a depth-wise convolution.  (L262-L270 in Section 3.1 in the manuscript).

😬hiii

There is no pooling operation in MHDLSA since doing so would result in some information loss for SR tasks.
Due to the comparable parameter count with MHSA, the squeeze factor number is 4.
The num of kernel size is 7, compares to the 8 window size of MHSA.
The fnn_expansion_factor is 2, compares to the SwinIR.
The kernel size of TLC is set to 48 (the training patch size) for the x4 upscale factor.

Tips: We reconstruct the https://github.com/Atten4Vis/DemystifyLocalViT/blob/master/models/dwnet.py into MHDLSA, as indicated in the paper. We are grateful for the excellent work done by the https://github.com/Atten4Vis/DemystifyLocalViT/
🙏: We apologize for not extending our work to the onnx model for mobile devices.
TODO: Soon, we'll make the archs file available with more information about the network architecture.
We admit that our work has advanced significantly as a result of our completion of several details during the network structure design phase. I do, however, hope that it might help you in applying the methods that we proposed.

thx your quick replay.

~no pool seems the dim do not mach? how to get that work? the Reshape() in eq.1 combine H*W to 1? how? and what is G mean? maybe I just miss this part in the whole implemente. thx ~
seems I miss the line x denotes the pixel index. have a clue thx, so it is idynamic? G head use? and maybe a code example for  The detailed network of the dynamic weight generation is shown in Figure 2. Similar to the multi-head selfattention methods [21, 23, 31], we divide the number of feature channels into G heads and learn separate dynamic weights in parallel
2-5.  fine

onnx just request for more detiles of arch. if official arches will release soon. onnx is not needed.
thx your good work!

Literally, the brilliant work of idyanamic from Atten4vis is the foundation for our proposed MHDLSA. We devoted a lot of effort to reconstructing the DemystifyLocalViT, though, because it was designed for high-level computer vision tasks. Ultimately, we proposed our MHDLSA for SR tasks. As pointed out in the paper, in order to provide a more relevant attention map for dynamic convolution, we remove the redundant normalization layer and non-linear activation and add a depth-wise convolution. (L262-L270 in Section 3.1 in the manuscript).

class IDynamicDWConv(nn.Module):

    def __init__(self,
                 channels,
                 kernel_size,
                 group_channels):
        super(IDynamicDWConv, self).__init__()
        self.kernel_size = kernel_size
        self.channels = channels
        reduction_ratio = 4
        self.group_channels = group_channels
        self.groups = self.channels // self.group_channels
        self.conv1 = nn.Sequential(
            nn.Conv2d(channels, channels // reduction_ratio, 1),
            # nn.BatchNorm2d(channels // reduction_ratio),
            # nn.ReLU()
            # As mentioned, remove redundant normalization and activation, add depth-wise convolution
            nn.Conv2d(channels // reduction_ratio, channels // reduction_ratio,  self.kernel_size, padding=self.kernel_size//2, groups=channels // reduction_ratio),
        )
        self.conv2 = nn.Sequential(
            nn.Conv2d(channels // reduction_ratio, kernel_size**2 * self.groups, 1)
        )

    def forward(self, x):
        weight = self.conv2(self.conv1(x))
        b, c, h, w = weight.shape
        weight = weight.view(b, self.groups, self.kernel_size, self.kernel_size, h, w)
        out = _idynamic_cuda(x, weight, stride=1, padding=(self.kernel_size-1)//2)
        return out

😬hiii

There is no pooling operation in MHDLSA since doing so would result in some information loss for SR tasks.
Due to the comparable parameter count with MHSA, the squeeze factor number is 4.
The num of kernel size is 7, compares to the 8 window size of MHSA.
The fnn_expansion_factor is 2, compares to the SwinIR.
The kernel size of TLC is set to 48 (the training patch size) for the x4 upscale factor.

Tips: We reconstruct the https://github.com/Atten4Vis/DemystifyLocalViT/blob/master/models/dwnet.py into MHDLSA, as indicated in the paper. We are grateful for the excellent work done by the https://github.com/Atten4Vis/DemystifyLocalViT/
🙏: We apologize for not extending our work to the onnx model for mobile devices.
TODO: Soon, we'll make the archs file available with more information about the network architecture.
We admit that our work has advanced significantly as a result of our completion of several details during the network structure design phase. I do, however, hope that it might help you in applying the methods that we proposed.

thx your quick replay.

~no pool seems the dim do not mach? how to get that work? the Reshape() in eq.1 combine H*W to 1? how? and what is G mean? maybe I just miss this part in the whole implemente. thx ~
seems I miss the line x denotes the pixel index. have a clue thx, so it is idynamic? G head use? and maybe a code example for  The detailed network of the dynamic weight generation is shown in Figure 2. Similar to the multi-head selfattention methods [21, 23, 31], we divide the number of feature channels into G heads and learn separate dynamic weights in parallel
2-5.  fine

onnx just request for more detiles of arch. if official arches will release soon. onnx is not needed.
thx your good work!

Literally, the brilliant work of idyanamic from Atten4vis is the foundation for our proposed MHDLSA. We devoted a lot of effort to reconstructing the DemystifyLocalViT, though, because it was designed for high-level computer vision tasks. Ultimately, we proposed our MHDLSA for SR tasks. As pointed out in the paper, in order to provide a more relevant attention map for dynamic convolution, we remove the redundant normalization layer and non-linear activation and add a depth-wise convolution. (L262-L270 in Section 3.1 in the manuscript).

class IDynamicDWConv(nn.Module):

    def __init__(self,
                 channels,
                 kernel_size,
                 group_channels):
        super(IDynamicDWConv, self).__init__()
        self.kernel_size = kernel_size
        self.channels = channels
        reduction_ratio = 4
        self.group_channels = group_channels
        self.groups = self.channels // self.group_channels
        self.conv1 = nn.Sequential(
            nn.Conv2d(channels, channels // reduction_ratio, 1),
            # nn.BatchNorm2d(channels // reduction_ratio),
            # nn.ReLU()
            # As mentioned, remove redundant normalization and activation, add depth-wise convolution
            nn.Conv2d(channels // reduction_ratio, channels // reduction_ratio,  self.kernel_size, padding=self.kernel_size//2, groups=channels // reduction_ratio),
        )
        self.conv2 = nn.Sequential(
            nn.Conv2d(channels // reduction_ratio, kernel_size**2 * self.groups, 1)
        )

    def forward(self, x):
        weight = self.conv2(self.conv1(x))
        b, c, h, w = weight.shape
        weight = weight.view(b, self.groups, self.kernel_size, self.kernel_size, h, w)
        out = _idynamic_cuda(x, weight, stride=1, padding=(self.kernel_size-1)//2)
        return out

that's clear. thx

one more thing the group_channels setting to?

While setting the inhomogeneous=True, the heads is set to 6 (compares to SwinIR) in the DWBlock-> https://github.com/Atten4Vis/DemystifyLocalViT/blob/master/models/dwnet.py
maybe the paper https://github.com/Atten4Vis/DemystifyLocalViT/ will help you understand the key designs of inhomogeneous DWConvolution and our proposed MHDLSA.
class DWBlock(nn.Module):

    def __init__(self, dim, window_size, dynamic=False, inhomogeneous=False, heads=None):
        super().__init__()
        self.dim = dim
        self.window_size = window_size  # Wh, Ww
        self.dynamic = dynamic
        self.inhomogeneous = inhomogeneous
        self.heads = heads

       # remove the BatchNorm according to the research of EDSR.
       # remove the redundant activation.

        # pw-linear
        self.conv0 = nn.Conv2d(dim, dim, 1, bias=False)
        # self.bn0 = nn.BatchNorm2d(dim)

        if dynamic and not inhomogeneous:
            self.conv = DynamicDWConv(dim, kernel_size=window_size, stride=1, padding=window_size // 2, groups=dim)
        if dynamic and inhomogeneous:
            print(window_size, heads)
            self.conv = IDynamicDWConv(dim, window_size, heads)
        else :
            self.conv = nn.Conv2d(dim, dim, kernel_size=window_size, stride=1, padding=window_size // 2, groups=dim)

        # self.bn = nn.BatchNorm2d(dim)
        # self.relu=nn.ReLU(inplace=True)

        # pw-linear
        self.conv2=nn.Conv2d(dim, dim, 1, bias=False)
        self.bn2 = nn.BatchNorm2d(dim)

one more thing the group_channels setting to?

While setting the inhomogeneous=True, the heads is set to 6 (compares to SwinIR) in the DWBlock-> https://github.com/Atten4Vis/DemystifyLocalViT/blob/master/models/dwnet.py
maybe the paper https://github.com/Atten4Vis/DemystifyLocalViT/ will help you understand the key designs of inhomogeneous DWConvolution and our proposed MHDLSA.
class DWBlock(nn.Module):

    def __init__(self, dim, window_size, dynamic=False, inhomogeneous=False, heads=None):
        super().__init__()
        self.dim = dim
        self.window_size = window_size  # Wh, Ww
        self.dynamic = dynamic
        self.inhomogeneous = inhomogeneous
        self.heads = heads

       # remove the BatchNorm according to the research of EDSR.
       # remove the redundant activation.

        # pw-linear
        self.conv0 = nn.Conv2d(dim, dim, 1, bias=False)
        # self.bn0 = nn.BatchNorm2d(dim)

        if dynamic and not inhomogeneous:
            self.conv = DynamicDWConv(dim, kernel_size=window_size, stride=1, padding=window_size // 2, groups=dim)
        if dynamic and inhomogeneous:
            print(window_size, heads)
            self.conv = IDynamicDWConv(dim, window_size, heads)
        else :
            self.conv = nn.Conv2d(dim, dim, kernel_size=window_size, stride=1, padding=window_size // 2, groups=dim)

        # self.bn = nn.BatchNorm2d(dim)
        # self.relu=nn.ReLU(inplace=True)

        # pw-linear
        self.conv2=nn.Conv2d(dim, dim, 1, bias=False)
        self.bn2 = nn.BatchNorm2d(dim)

that's clear, thx!


typescript support

Hi,
working with typescript I have written a simple file definition for this library, with the following content:

declare function aprMd5(password: string, salt?: string): string;

export default aprMd5;

I believe it could be nice to add it it in the package, for other users.
It suffices to add an apache-md5.d.ts file inside the src directory.
Best regards.

@FStefanni thanks, please open PR and I will publish new version.

PR done (#11)


Consider caching algorithmic improvement

A novel lightweight but efficient caching algorithm:
https://www.usenix.org/publications/loginonline/sieve-cache-eviction-can-be-simple-effective-and-scalable
OpenSSL has quite a number of caches all over the place and we might gain some benefits from this.
It also ought to be possible to implement this in a lockless fashion using atomic operations.

This is talking about cache eviction for old entries that no longer fit into the cache - the caches we have currently do not have any size limits so there is no eviction implemented.

The property query cache is flushed based on size.
Not sure if we've any others or not.

So, from my read of this, we have 1 cache that ever does any level of eviction, the QUERY cache, and by the looks of it, it does cache eviction randomly based on a threshold size.
Given that the cache is implemented as a hash table, I'm not sure theres a great way to create any ordinality to the table (to support the concept of promotion or demotion), unless we want to move the QUERY cache to be a STACK_OF type structure, which I think would likely sacrifice lookup time in exchange for cache eviction time.
I think to do this, we would need to have some evidence that the savings in eviction time over any impact to lookup time was a net benefit.

It would be possible to have a hash table of entries that are also in another data structure.  It requires links from one to the other.  Our priority queue does something akin to this to allow fast deletions O(log n) instead of O(n).
Yes, we'd need some evidence of performance gain.  It's difficult to see how this could be measured without at least a basic implementation.

We might be able to add such a feature to the new  hashtable, though we would have to limit eviction candidates to those that exist in the same neighborhood that the new entry hashes to.

I'm not sure the new hash table is the right place for this universally.  It might be better introducing a different abstraction that includes the new hash table + something extra.  As a rule, most hash tables will not want the additional functionality.  It is, however, relevant for hash tables that can be partially flushed (i.e. a cache in the purest form).  It might also be relevant for hash tables where we use the iterate over all elements APIs.  Our current lhash is actually decent in this regards because it maintains a high load factor (i.e. most table entries will have sub-entries).
I believe that there are caches beyond the property query cache that we don't want growing forever in OpenSSL.  TLS sessions is one and there are likely more.
There is some good fairly recent research on cache flushing.  LRU isn't ideal but it's a decent first step.  The property query uses a stochastic approach, which also isn't ideal but was reasonable at the time.


Fix mentions of source *cargo/env to use $CARGO_HOME

Changed in https://github.com/veracruz-project/veracruz-docker-image/pull/2, Docker now uses /usr/local/cargo/env. Using $CARGO_HOME should make this future proof.
With help from @ShaleXIONG

AWS CodeBuild CI Report

CodeBuild project: Veracruz
Commit ID: d00409b1d409b11bf95131315c1b5765a4d34740
Result: SUCCEEDED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

AWS CodeBuild CI Report

CodeBuild project: Veracruz
Commit ID: d00409b1d409b11bf95131315c1b5765a4d34740
Result: SUCCEEDED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

Have +1, was suggested to go ahead and merge this, so going ahead and merging this

Have +1, was suggested to go ahead and merge this, so going ahead and merging this


Enhanced ts-jest cli to fix warning message.

Summary

Before this patch, when I run jest test with jest.config.js generated
ts-jest config:init, it shows below warning message:
ts-jest[config] (WARN) Unable to find the root of the project where ts-jest has been installed.

This patch addresses the issue https://github.com/kulshekhar/ts-jest/issues/959
Test plan

A test case in src/cli/cli.spec.ts is updated to reflect this changes.
Does this PR introduce a breaking change?

[ ] Yes
[x] No

Pull Request Test Coverage Report for Build 6106

5 of 5 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.003%) to 93.209%

Totals

Change from base Build 6104:
0.003%

Covered Lines:
1108

Relevant Lines:
1142

💛  - Coveralls

I think this doesn’t fix the actually problem. The problem comes from https://github.com/kulshekhar/ts-jest/blob/82a930b34e92d595bae3e65a13c1241dcf94fe02/src/config/config-set.ts#L118
I think instead of this fix, you should provide a fallback mechanism for that piece of codes.


Relai: User can't create invoice

NodeID: 02fcc5bfc48e83f06c04483a2985e1c390cb0f35058baa875ad2053858b8e80dbd
https://github.com/breez/breez-sdk-relai/issues/9

After debugging this further we see that it is an instance of https://github.com/Blockstream/greenlight/issues/431, closing as a duplicate, we'll continue tracking it internally too :+1:

What can I say to the user?


Fix api url

API is currently using collections.library.nd.edu for things like showcases/items parts of collections, should be using honeycomb.library.nd.edu

:+1:

:+1: