Support automatic pack namespaces

This is a rework of https://github.com/rubyatscale/stimpack/pull/37 based on feedback from @ngan.
This PR supports automatic pack namespaces! Check out the README.md change for more information.

Hi @fxn! I have some questions for you about some things we are trying to do with zeitwerk. I thought it could be easier to chat over slack, so I've invited you to a shared slack channel in the Gusto org, but we can chat here too.
What we are trying to do in this PR is allow stimpack, a gem for allowing libraries of code with fuzzy boundaries (i.e. not gems) to live in packs/* (see https://github.com/rubyatscale/stimpack for the file structure), while integrating seamlessly into Rails.
We want to allow stimpack users to use the custom root namespaces feature of zeitwerk. We are running into two major roadblocks:
1) Rails doesn't support configuring custom root namespaces when adding load paths
TLDR: When adding to load paths, rails calls push_dir and there is no API available, as far as we can tell, to allow you to add to autoload paths and define a custom root namespace at the same time. To get around this, we are basically monkey patching the rails autoloader by defining a ZeitwerkProxy, which calls push_dir with a given namespace when applicable. We don't believe this is a great solution and would love to be able to do this in a more supported way, either with a proper Rails or a proper Zeitwerk API.
More info here: https://github.com/rubyatscale/stimpack/pull/38/files#diff-fdf4ab10aa75775534c8300ff2e842841eac9949d95b8ed3cf21f3fb5293f86dR10
2) Zeitwerk doesn't allow the top-level module to have properly reloaded methods defined on it
At Gusto, we often recommend public APIs in the form of MyNamespace.my_public_api. The advantage here is that it's very simple – the top-level namespace holds all/most of the public API. However, per the note in the docs, "the given root namespace must be non-reloadable."
We tried getting around this by recommending a user eagerly load a file that reopens the top-level module, but is an unsatisfactory user experience, since besides being awkward, those methods will not be auto-reloaded.
Can you help me understand this technical limitation and if there is any way we can allow zeitwerk to allow defining + auto-reloading top-level modules? I understand that zeitwerk needs to define the module (via implicit namespaces) when a user is using custom root namespaces, but I'm wondering if after defining it, it can see if the user has also defined, and if so, allow it to be auto-reloaded (ideally its definition file path can follow some convention where zeitwerk doesn't assume that file path is pre-namespaces, e.g. instead of MyPublicApi::MyPublicApi, it just reads it as MyPublicApi).
Thank you!!

Hi @alexevanczuk! Thanks very much for the Slack invitation. Since I am normally consulting, a synchronous chat is something that it is difficult to fit in my day. Let's discuss async for now!
Rails API is not on par with Zeitwerk, and that is on purpose. Before, Rails had its own autoloader and it was natural that the framework had config points for it. Now, the autoloader is external and the instances are public interface. So, by now we keep backwards compatibility, but we don't plan to replicate the rest (ignore, collapse, etc.).
Regarding custom namespaces, I plan to something about this for Rails 7.2. Before Rails 7.2, you need to manually remove the directory Rails automatically assumes is an autoload path:
# config/initializers/zeitwerk.rb

require 'my_custom_namespace'

path = "#{Rails.root}/app/foo" # has to be a string
ActiveSupport::Dependencies.autoload_paths.delete(path) # won't be needed it 7.2
Rails.autoloaders.main.push_dir(path, namespace: MyCustomNamespace)

The reason MyCustomNamespace cannot be reloadable is that we need the class or module object before the autoloader is ready to autoload.
As you probably know, Zeitwerk sets autoload calls on your behalf. For example, when setup works, if it sees app/models/user.rb, it does the following:
Object.autoload(:User, "#{Rails.root}/app/models/user.rb")

In the example setup above, if you have app/foo/x.rb, it does
MyCustomNamespace.autoload(:X, "#{Rails.root}/app/foo/x.rb"

See? We need the module object while we are setting things up, too early to autoload.

Thank you @fxn for your prompt response!
Your explanation about Rails and Zeitwerk makes sense. It sounds like to support this feature, we basically need to basically put something like Stimpack.enable_automatic_namespaces! in config/initializers/zeitwerk.rb with the implementation that you described. That actually sounds pretty simple! Does push_dir overwrite previous pushes without an issue?

We need the module object while we are setting things up, too early to autoload.

Yep – that makes sense. Would it be possible that after things are set up, we then go back to those custom root namespaces and autoload them, or some other similar implementation? Is there any conceptual or mechanical reason why we couldn't or shouldn't attempt to do that? I figure you've probably already thought of this, but just trying to see if there is any path forward with this pattern.
Thank you again!

@alexevanczuk hey!

Does push_dir overwrite previous pushes without an issue?

Yes. And the delete call in Rails < 7.2 is needed precisely because Rails performs the push_dir calls later. If we don't delete, it overrides. In Rails 7.2 I plan to modify Rails initialization so that push_dir is invoked for a given autoload path unless the user already did (this is not yet written).

Would it be possible that after things are set up, we then go back to those custom root namespaces and autoload them, or some other similar implementation?

No. The problem is that you cannot load anything during setup, because things are precisely not yet ready to work. And setting autoloads in the root namespaces is what setting things up is all about. Summary:

Zeitwerk needs the root namespaces during setup.
You need setup finished in order to autoload code.
Therefore, you cannot have a root namespace that has to be autoloaded.

And that is why the interface requires a class or module object, you need to have it already instantiated when push_dir is executed.
If you want the namespace to be reloadable, you can do it, but cannot be a custom namespace, needs to live in its own reloadable explicit file.

Awesome, thanks so much for all of the detailed context and explanation @fxn! Really appreciate it.

@fxn I tried your recommended approach, and think it's working! @alexevanczuk is going to help me to explore extracting the solution to something we can share with others. Kudos! 🥇 🥳 🎉

@fxn Actually.... I have to take back those kudos (temporarily)...  Although the recommended approach works (Zeitwerk can load classes and recognize they exist in namespaces, even though namespace directories are missing in the directory tree), it seems to make every directory non-reloadable. That is, a change in a controller isn't in-use until the running bin/dev server is restarted.
Is this behavior what you expected?
If so, are there any approaches that would leave the application directories (controller, models, etc) reloadable, even if the module file (eg packs/inventory/public/inventory.rb) is not?
If not, would you be willing to look at my solution and help me understand what I did that made the result deviate from your expectations?
I put this file in config/initializers/automatic_namespaces.rb:
require 'yaml'

class StimpackExtension
  def enable_automatic_namespaces
    namespaced_packages.each do |package_file|
      pack_root_dir = File.dirname(package_file)
      package_namespace = define_namespace(pack_root_dir)
      pack_directories(pack_root_dir).each do |pack_dir|
        set_namespace_for(pack_dir, package_namespace)
      end
    end
  end

  private

  def set_namespace_for(pack_dir, package_namespace)
    Rails.logger.debug { "Associating #{pack_dir} with namespace #{package_namespace}" }
    ActiveSupport::Dependencies.autoload_paths.delete(pack_dir)
    Rails.autoloaders.main.push_dir(pack_dir, namespace: package_namespace)
  end

  PACK_SUBDIRS = [
    'app/components',
    'app/controllers',
    'app/event_handlers',
    'app/events',
    'app/models',
    'app/public',
    'app/services',
    'app/views'
  ]

  def pack_directories(pack_root_dir)
    PACK_SUBDIRS.map {|subdir| Dir.glob("#{pack_root_dir}/#{subdir}") }
                .flatten
                .select { |pack_dir| File.exist?(pack_dir) }
  end

  def define_namespace(pack_root_dir)
    package_directory = File.basename(pack_root_dir).to_s
    package_name = package_directory.camelize
    Object.const_set(package_name, Module.new)
    package_name.constantize
  end

  def namespaced_packages
    # assuming that packages are nested under organizing directory, like "subsystem" or "component"
    Rails.root.glob('packs/*/*/package.yml').select { |package_file| has_automatic_namespace?(package_file) }
  end

  def has_automatic_namespace?(package_file)
    package_description = YAML.load_file(package_file)
    metadata = package_description["metadata"]
    metadata && metadata["automatic_pack_namespace"]
  end
end

StimpackExtension.new.enable_automatic_namespaces

Oh, quick followup to clarify.
Zeitwerk does not monitor the file system, the library provides a reload method, and the parent application is responsible for invoking it. In this case, the parent application is the Rails framework.
Rails has a file watcher, and from memory there are two types, a simple one that scans, and an evented one. Those watchers get passed directories to watch, and probably nowadays they get what is in autoload_paths, but these directories are not there. That's, I think, why you don't see reloads happening.
Later I'll dig into this.

Confirmed, those directories are not being watched and therefore Rails does not know it has to reload if you edit a pack.
Fortunately, there is public interface to get reloading working, just execute
Rails.application.config.watchable_dirs[pack_dir] = [:rb]

in set_namespace_for.
In the next version of Rails this won't be needed either, but this will work in both versions.

@fxn Brilliant. That worked wonderfully.


Struggles are currently broken in latest update; the buttons are present, but don't actually roll the move.

Struggles are currently broken in latest update; the buttons are present, but don't actually roll the move.

Fixed in https://github.com/caffyn/PTUMoveMaster/commit/dd6a76b3c5f8dafd2b4acc25185bc2d50355101d


Doesn't work on latest npm

 Click to expand
/home/quantum/.npm/_npx/e31027f3785124a8/node_modules/gluegun/build/index.js:13
    throw up;
    ^
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving<EMAIL_ADDRESS>npm ERR! Found<EMAIL_ADDRESS>npm ERR! node_modules/react
npm ERR<EMAIL_ADDRESS>from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer<EMAIL_ADDRESS>from<EMAIL_ADDRESS>npm ERR! node_modules/@react-native-community/masked-view
npm ERR<EMAIL_ADDRESS>from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /home/quantum/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/quantum/.npm/_logs/2021-08-24T14_57_43_808Z-debug.log

(Use `node --trace-uncaught ...` to show where the exception was thrown)

~/Desktop/projects took 2s ✗  npm -v
7.21.0

0 verbose cli [
0 verbose cli   '/home/quantum/.fnm/node-versions/v16.7.0/installation/bin/node',
0 verbose cli   '/home/quantum/.fnm/node-versions/v16.7.0/installation/bin/npm',
0 verbose cli   'install'
0 verbose cli ]
1 info using<EMAIL_ADDRESS>2 info using<EMAIL_ADDRESS>3 timing npm:load:whichnode Completed in 0ms
4 timing config:load:defaults Completed in 0ms
5 timing config:load:file:/home/quantum/.fnm/node-versions/v16.7.0/installation/lib/node_modules/npm/npmrc Completed in 1ms
6 timing config:load:builtin Completed in 1ms
7 timing config:load:cli Completed in 0ms
8 timing config:load:env Completed in 1ms
9 timing config:load:file:/home/quantum/Desktop/projects/PizzaApp/.npmrc Completed in 0ms
10 timing config:load:project Completed in 1ms
11 timing config:load:file:/home/quantum/.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:/home/quantum/.fnm/node-versions/v16.7.0/installation/etc/npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:credentials Completed in 1ms
17 timing config:load:setEnvs Completed in 0ms
18 timing config:load Completed in 4ms
19 timing npm:load:configload Completed in 4ms
20 timing npm:load:setTitle Completed in 0ms
21 timing npm:load:setupLog Completed in 0ms
22 timing config:load:flatten Completed in 2ms
23 timing npm:load:cleanupLog Completed in 1ms
24 timing npm:load:configScope Completed in 0ms
25 timing npm:load:projectScope Completed in 0ms
26 timing npm:load Completed in 8ms
27 timing arborist:ctor Completed in 0ms
28 timing arborist:ctor Completed in 0ms
29 timing idealTree:init Completed in 7ms
30 timing idealTree:userRequests Completed in 0ms
31 silly idealTree buildDeps
32 silly fetch manifest<EMAIL_ADDRESS>33 http fetch GET 200 https://registry.npmjs.org/@react-native-async-storage%2fasync-storage 789ms (cache miss)
34 silly fetch manifest<EMAIL_ADDRESS>35 http fetch GET 200 https://registry.npmjs.org/react-native 199ms (cache revalidated)
36 silly fetch manifest<EMAIL_ADDRESS>37 http fetch GET 200 https://registry.npmjs.org/react 191ms (cache revalidated)
38 silly fetch manifest<EMAIL_ADDRESS>39 http fetch GET 200 https://registry.npmjs.org/@react-native-community%2fmasked-view 242ms (cache miss)
40 silly fetch manifest<EMAIL_ADDRESS>41 timing idealTree Completed in 1452ms
42 timing command:install Completed in 1462ms
43 verbose stack Error: unable to resolve dependency tree
43 verbose stack     at Arborist.[failPeerConflict] (/home/quantum/.fnm/node-versions/v16.7.0/installation/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:1274:25)
43 verbose stack     at Arborist.[loadPeerSet] (/home/quantum/.fnm/node-versions/v16.7.0/installation/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:1241:34)
43 verbose stack     at async Arborist.[buildDepStep] (/home/quantum/.fnm/node-versions/v16.7.0/installation/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:877:11)
43 verbose stack     at async Arborist.buildIdealTree (/home/quantum/.fnm/node-versions/v16.7.0/installation/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:206:7)
43 verbose stack     at async Promise.all (index 1)
43 verbose stack     at async Arborist.reify (/home/quantum/.fnm/node-versions/v16.7.0/installation/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:147:5)
43 verbose stack     at async Install.install (/home/quantum/.fnm/node-versions/v16.7.0/installation/lib/node_modules/npm/lib/install.js:150:5)
44 verbose cwd /home/quantum/Desktop/projects/PizzaApp
45 verbose Linux 5.11.0-7620-generic
46 verbose argv "/home/quantum/.fnm/node-versions/v16.7.0/installation/bin/node" "/home/quantum/.fnm/node-versions/v16.7.0/installation/bin/npm" "install"
47 verbose node v16.7.0
48 verbose npm  v7.21.0
49 error code ERESOLVE
50 error ERESOLVE unable to resolve dependency tree
51 error
52 error While resolving<EMAIL_ADDRESS>52 error Found<EMAIL_ADDRESS>52 error node_modules/react
52 error<EMAIL_ADDRESS>from the root project
52 error
52 error Could not resolve dependency:
52 error peer<EMAIL_ADDRESS>from<EMAIL_ADDRESS>52 error node_modules/@react-native-community/masked-view
52 error<EMAIL_ADDRESS>from the root project
52 error
52 error Fix the upstream dependency conflict, or retry
52 error this command with --force, or --legacy-peer-deps
52 error to accept an incorrect (and potentially broken) dependency resolution.
52 error
52 error See /home/quantum/.npm/eresolve-report.txt for a full report.
53 verbose exit 1

I had this issue while installing into project using yarn workspaces. Installation is successful outside of them.

@shirshak55 Could you post the results of your npx ignite-cli doctor, please? I'm having trouble recreating this.

   Join our Slack community at http://community.infinite.red.

    ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving<EMAIL_ADDRESS>npm ERR! Found<EMAIL_ADDRESS>npm ERR! node_modules/@types/jest
npm ERR!   dev<EMAIL_ADDRESS>from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional<EMAIL_ADDRESS>from<EMAIL_ADDRESS>npm ERR! node_modules/ts-jest
npm ERR!   dev<EMAIL_ADDRESS>from the root project
npm ERR!
npm ERR! Conflicting peer dependency<EMAIL_ADDRESS>npm ERR! node_modules/@types/jest
npm ERR!   peerOptional<EMAIL_ADDRESS>from<EMAIL_ADDRESS>npm ERR!   node_modules/ts-jest
npm ERR!     dev<EMAIL_ADDRESS>from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /Users/andrew/.npm/eresolve-report.txt for a full report.

npm ERR!      /Users/andrew/.npm/_logs/2021-09-14T12_41_35_544Z-debug.log

For npm install I got around the error by using npm install --force. However when I tried to run ignite create AppName, I got the same error and couldn't override the npm install step to use the --force flag. I think some of the following dependencies are the ones I suspect needing to be upgraded or downgraded to resolve the version conflicts.

@types/jest
ts-jest

Environment:
System
  platform           darwin
  arch               x64
  cpu                24 cores     Intel(R) Xeon(R) CPU           X5680  @ 3.33GHz
  directory          Dev          /Users/andrew/Dev

JavaScript (and globally-installed packages)
  node               14.17.1      /Users/andrew/.nvm/versions/node/v14.17.1/bin/node
  npm                7.23.0       /Users/andrew/.nvm/versions/node/v14.17.1/bin/npm
    appium-doctor    1.16.0
    firebase-tools   9.18.0
    mjpeg-consumer   2.0.0
    npm              7.23.0
  yarn               -            not installed

Ignite
  ignite-cli         7.5.0        /Users/andrew/.npm/_npx/e31027f3785124a8/node_modules/.bin/ignite
  ignite src         build        /Users/andrew/.npm/_npx/e31027f3785124a8/node_modules/ignite-cli/build

Android
  java               16.0.2       /usr/local/opt/openjdk/bin/java
  android home       -            /Users/andrew/Library/Android/sdk

iOS
  xcode              12.5.1
  cocoapods          1.10.1       /Users/andrew/.rvm/gems/ruby-3.0.0/bin/pod

@Andrewngabriel Are you for sure running ignite create? Because the proper command should be npx ignite-cli new MyApp.
If you're using the latter, someone in the Infinite Red Community reported that this command fixed it for them...oddly.
npx @react-native-community/cli doctor

I don't know why. :shrug:
Link to comment (will expire): https://infiniteredcommunity.slack.com/archives/C41PK1LAY/p1631412151028900

I was trying to run ignite new AppName when I got the error mentioned above.
Interesting enough, I just tried to run npx @react-native-community/cli doctor and got the following output:
⠸ Running diagnostics...
warn We couldn't find a package.json in this directory. Android SDK checks may fail. Doctor works best in a React Native project root.
Common
 ✓ Node.js
 ✖ yarn
   - Version found: N/A
   - Version supported: >= 1.10.x
 ✓ npm
 ✖ Watchman - Used for watching changes in the filesystem when in development mode
   - Version found: 2<IP_ADDRESS>
   - Version supported: 4.x

Android
 ✓ JDK
 ✓ Android Studio - Required for building and installing your app on Android
 ✖ Android SDK - Required for building and installing your app on Android
   - Versions found: 28.0.3, 29.0.2, 29.0.3, 30.0.2, 30.0.3, 31.0.0
   - Version supported: Not Found
 ✓ ANDROID_HOME

iOS
 ✓ Xcode - Required for building and installing your app on iOS
 ✓ CocoaPods - Required for installing iOS dependencies
 ✓ ios-deploy - Required for installing your app on a physical device with the CLI

Errors:   3
Warnings: 0

I pressed e to let the tool try and fix all the errors it flagged and it was able to fix obtaining yarn and Watchman but had some trouble with Android SDK
Attempting to fix 3 issues...

Common
 ✔ yarn
 ✔ Watchman

Android
 ✖ Android SDK
   Read more about how to update Android SDK at https://developer.android.com/studio

Afterwards everything magically started working again though when I tried installing dependencies for this repo by running npm install, I got the following warning while installing packages.
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving<EMAIL_ADDRESS>npm WARN Found<EMAIL_ADDRESS>npm WARN node_modules/@types/jest
npm WARN   dev<EMAIL_ADDRESS>from the root project
npm WARN
npm WARN Could not resolve dependency:
npm WARN peerOptional<EMAIL_ADDRESS>from<EMAIL_ADDRESS>npm WARN node_modules/ts-jest
npm WARN   dev<EMAIL_ADDRESS>from the root project
npm WARN deprecated<EMAIL_ADDRESS>babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.

added 953 packages, and audited 1211 packages in 49s

100 packages are looking for funding
  run `npm fund` for details

6 vulnerabilities (2 low, 2 moderate, 2 high)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.

I think this issue might be caused due to not having a package-lock.json file so npm users fetch dependencies fresh each time they run npm install whereas with yarn, because you have a lock file, it can fetch packages in a more stable approach. Is there a reason for not having a package-lock.json?

Is there a reason for not having a package-lock.json?

Yeah -- it's because we only use yarn at Infinite Red. :-) (blog post)
I suppose we could detect whether yarn is available and include a package-lock.json if not, but I'm not a big fan of that. I'd prefer to not ship a lockfile at all, if we can help it.

Probably makes sense to just use yarn if the boilerplate you're relying on prefers it :).

New to ignite here, ran into the same issue, and I agree with your statement. Seems like ignite looks for yarn and uses it if available. I think suggesting to install via npx might throw people off. Maybe something like the following would be beneficial?
# recommend you have yarn installed
npx ignite-cli new IgniteTrivia  # yarn 1
 - or -
yarn dlx ignite-cli new IgniteTrivia # yarn 2

Also works if you have npm@6 installed instead of latest.

Duplicate of #1661

This is not a duplicate of 1661 if you look at the error closely. Closing this

Wait, I'm confused. 😕  If you think it's not a duplicate, why was it closed? This issue is still occurring to me, that's why I'm here in the first place.

@niieani the project doesn't seem to be active and it's already been more than 4 months so I don't want to pressure the maintainer.

@shirshak55 While I understand your frustration with an issue that hasn't been resolved in four months, I do take issue with the idea that the project isn't active. We've been working on it as time allows, and I have a PR in-progress that addresses both the NPM issue and also supports PNPM as well as Yarn and NPM.
https://github.com/infinitered/ignite/pull/1847

Taking a step back, my philosophy on open source is that I will try to review and merge/release PRs in a timely manner. But issues (especially problems with tools that I don't use myself) are generally on the community to figure out and solve. If you have a PR that solves your issue and it's been a while, I never mind you pinging me on Twitter and asking me to review it, etc.

i am not frustrated but delighted to hear the project is active. When i saw there are workarounds I closed it. As it is an open source it doesn't impact me if its not maintained due to various cirmstance s. I made spurious assumption so i take my words back regarding maintenance
Sent from ProtonMail mobile
-------- Original Message --------
On Dec 28, 2021, 1:24 AM, Jamon Holmgren < @.***> wrote:

Reopened #1777.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you were mentioned.Message ID: @.***>

I should have updated this thread, to be fair!

As an OSS maintainer myself, I know the struggle.
Thank you is the word we don't hear enough, so: thank you!

There has been a lot of changes since this issue last had activity. This is going to be closed for now, but please re-open if this still needs attention.


Only drag rows not single imagges

Turned out to be way simpler than I thought.
https://user-images.githubusercontent.com/3683420/187698877-142aa90a-d740-4fe1-ab5d-0985774d13bc.mov

👍🏻


Fix code scanning alert no. 4: Use of externally-controlled format string

Fixes https://github.com/Dargon789/safe-apps-sdk/security/code-scanning/4
To fix the problem, we should ensure that the untrusted input (msg.origin) is properly handled before being included in the log message. The best way to do this is to use a %s specifier in the format string and pass the untrusted data as a corresponding argument. This approach ensures that the untrusted data is treated as a string and not as a format specifier.

Modify the console.info call on line 36 to use a %s specifier for msg.origin.
Pass msg.origin as an additional argument to the console.info function.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.
Summary by Sourcery
Bug Fixes:

Ensure untrusted input in log messages is handled safely by using a format specifier.

Fix code scanning alert no. 4: Use of externally-controlled format string #11


variable 'cloudant' re-use in admin.js

Defined as a module on line 6 then as a database on line 39. Even if this works ok it could be confusing.

Fixed in 3fbf2d7d48a936e59b2cc2d907d05493b52c4794.


Is it possible to remove the perturbation for amplified frame?

Hi Tiam @12dmodel ,
I'm wondering if there is a way to remove/revert the perturbation for frameB and amplified?
Best,
Sheng

Unfortunately, you would need to regenerate the dataset. I won't have time
to do that in the near future, but I will be happy to answer any questions
you have about data generation.
On Sat, Nov 3, 2018, 4:17 PM Sheng Wang<EMAIL_ADDRESS>wrote:

Hi Tiam @12dmodel https://github.com/12dmodel ,
I'm wondering if there is a way to remove/revert the perturbation for
frameB and amplified?
Best,
Sheng
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/12dmodel/deep_motion_mag/issues/3, or mute the thread
https://github.com/notifications/unsubscribe-auth/ABtIV-OxP5Wt4yCui3IdunKckvoFHlWBks5urfnbgaJpZM4YM-tO
.

That would be great! Thanks!
Another question is that in your training, did you use all the 100K images?

Yes, we did. It is possible that you can use less images. If I remember
correctly, we had experiments where things worked on easy cases (e.g. the
baby video) with just 10k training images. However, this is not what we
extensively explored so it is safer if you can afford disk space/memory to
handle 100k.
On Mon, Nov 5, 2018 at 11:50 AM Sheng Wang<EMAIL_ADDRESS>wrote:

That would be great! Thanks!
Another question is that in your training, did you use all the 100K images?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/12dmodel/deep_motion_mag/issues/3#issuecomment-435947638,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABtIV86lLfJTQWPTjUjuVMPKO0r5gEPwks5usGxCgaJpZM4YM-tO
.

I got it. And how many epochs did you use for this network training?

Sorry I missed this message. We trained for about 260k iteration at a batch size of 4, so that would be about 10-11 epochs.


Cobranded footer

Cobranding in footer
NEW PR: https://github.com/ZopaPublic/react-components/pull/1146

NEW PR: #1146


[patch] Extend @samwaseda's good idea to add colours

For a node that has successfully run and will (with caching) re-run super fast (green), and for a node that is still running (orange).

Pull Request Test Coverage Report for Build<PHONE_NUMBER>2
Details

0 of 0   changed or added relevant lines in 0 files are covered.
1 unchanged line in 1 file lost coverage.
Overall coverage decreased (-0.02%) to 91.564%

Files with Coverage Reduction
New Missed Lines
%

draw.py
1
92.11%

Totals

Change from base Build<PHONE_NUMBER>1:
-0.02%

Covered Lines:
3039

Relevant Lines:
3319

💛  - Coveralls


Updating the release for S.A.C #43

Updating the release for S.A.C

Had to create a branch of this due to different history lines
moved https://github.com/SolaceLabs/solace-ai-connector/pull/45


Icon size token changes

Deprecated --salt-size-icon-base, replaced with --salt-icon-size-base (aligns with design, and follows pattern of starting with foundation name)
Added --salt-icon-size-status-adornment

DRAFTED: Pending whether this will be used for Checkbox/Switch/Dialog close button, which will require a rename


EIO createDirectoryRecursively() errors if it exists

When I'm using the EIO driver, calling yield filesystem()->createDirectoryRecursively("/tmp"); errors out, while the BlockingDriver returns new Success(). It would be nice if they behave identical, so we don't have to wrap our calls in exists-checks.
On a related note, it took me very long to find this error, because the EIO error-messages seem to get mixed up. The actual error I got was 'No such file or directory', but when trying to reproduce the problem, I got the correct 'File exists' error. I will try to find a minimum example to reproduce this.

Thanks for reporting and sorry for responding so late. This has now been fixed in https://github.com/amphp/file/commit/b8e3314417404e4e710ad4ab869e50ec3e5f0999.


MVP: Architectural sketch

This is based on @alex's original sketch: https://gist.github.com/alex/fdb067c3f424a62975df79f5e044005d
Some initial thoughts:

What is the "unit of work" in the suite? Is it a top-level limbo.json (or whatever) file with testcases: list[Testcase], or are there expected to be multiple of those files with disjoint (?) testcases?
A big JSON file will eventually become tedious to edit. Another testvector design that I'm familiar with is to have a bunch of separate descriptions that get "compiled" into the big limbo.json (or whatever) file (with CI checking this)

#4 includes pieces of this, like the JSON Schema.

The initial version of this is merged, so closing in favor of iterative issues.


Other ways to incorporate the model in production

Hi. Thank you for your innovative work.
Looks like you finally used HLLM to pre-compute embeddings for the online scenario.
 Like using it as a teacher model to distill existing online models.

Hi. Sorry that we have not attempted this yet.


Adding BitcoinVoucherBot no-kyc purchase bot

I just added the @BitcoinVoucherBot telegram bot, which allows purchase of bitcoin redeemable vouchers by telegram with great degree of privacy. The purchase procedure is without the web. No-kyc required, amounts less than 1000 eur.

closing because no answer

Sorry for being very late in addressing your Pull request.
I've added BitcoinVoucherBot to the Vouchers entry.


Remove the reactify transform from package.json

Since I replaced reactify by babelify, I get the following error when I try to browserify my project using your module:
Error: Cannot find module 'reactify' from '/Users/mvila/Projects-next/avc-online/node_modules/react-visibility-sensor'
I think you should remove the reactify transform from your package.json and find another way to reactify your tests/examples.

Hi @mvila, thanks for the heads-up.  I believe this is due to the browserify field in package.json, which instructs browserify what transforms to use: https://github.com/joshwnj/react-visibility-sensor/blob/master/package.json#L34-L40
In the most recent version I've moved reactify from devDependencies to dependencies, meaning that reactify is guaranteed to be available when needed.  Could you please upgrade to the latest version of react-visibility-sensor and let me know if the problem is still occurring?

I have not tested yet but I think it should work. However, this is not great to include reactify in dependencies. Since it is only used by examples and tests, it should be in devDependencies. I think the solution is to leave reactify in devDependencies and remove the browserify field in package.json. Since you explicitly specify the reactify transform in build-exampleand build-test scripts, you don't need the browserify field.

Sure, I'll have a look at what some other react components are doing and see if there's a "best practice" to adopt here.
The advantage of including reactify in the package.browserify field (and I believe, the reason they recommend it) is that package authors can ensure their packages are bundled with whatever dependencies are necessary to browserify them, and package consumers don't need to have any special knowledge about what transforms they need to install.

I understand the advantage of the browserify field in package.json but it is not appropriate in your case since reactify is used for tests and examples.

@mvila sorry for the delay - you make a good point and we'll be removing the package.browserify field in the next release (arriving very soon).

This is resolved in v3.0.0


Add permission used by helm to update its secret

Issue #, if available: helm silently ignored the error of updating its secret.
Description of changes: "helm upgrade" invoked by the eksa reconciler  returns nil error, but in fact the release's status stuck at "pending-installation" as it fails to update the release status stored in secret.
Error is shown when "--debug" option is turned on for 'helm upgrade' command
sh.helm.release.v1.eks-anywhere-packages-workload-0.v1" is forbidden: User "system:serviceaccount:eksa-system:eksa-controller-manager" cannot update resource "secrets" in API group "" in the namespace "eksa-packages"

Testing (if applicable): 1. Manually reproduced the error with `kubectl exec eksa-controller helm ...." 2. Verified the issue is fixed when the missing permission is added manually.
Documentation added/planned (if applicable):
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/lgtm
/approve


Error: 'videos'

[-] Error: 'videos'
<IP_ADDRESS> - - [01/Feb/2024 11:49:43] "POST /api/generate HTTP/1.1" 200 -
the directory may be missing

Python-dotenv could not parse statement starting at line 4

Serving Flask app 'main'
Debug mode: on
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
Running on all addresses (<IP_ADDRESS>)
Running on http://<IP_ADDRESS>:8080
Running on http://<IP_ADDRESS>:8080
Press CTRL+C to quit
Restarting with stat
Python-dotenv could not parse statement starting at line 4
Debugger is active!
Debugger PIN:

<IP_ADDRESS> - - [01/Feb/2024 12:20:39] "POST /api/generate HTTP/1.1" 200 -
<IP_ADDRESS> - - [01/Feb/2024 12:20:55] "OPTIONS /api/generate HTTP/1.1" 200 -
[+] Cleaned ./temp/ directory
[+] Cleaned ./subtitles/ directory
[Video to be generated]
Subject: pizza
Pizza Video Script
Today, we're diving into the world of pizza. From its origins in Italy to its status as a beloved global dish, pizza has captured the hearts and taste buds of people everywhere. Let's explore the art of making the perfect pizza, from the dough to the toppings, and uncover the secrets behind this iconic culinary delight.  Join us on this delicious journey as we celebrate the magic of pizza!
["pizza video", "pizza making", "pizza toppings", "perfect pizza", "pizza journey"]
Generated 5 search terms: pizza video, pizza making, pizza toppings, perfect pizza, pizza journey
[-] Error: 'videos'
<IP_ADDRESS> - - [01/Feb/2024 12:21:12] "POST /api/generate HTTP/1.1" 200 -
IMAGEMAGICK_BINARY="C:\Program Files\ImageMagick-7.1.1-Q16-HDRI" # Download from https://imagemagick.org/script/download.php

Do you have python-dotenv installed? Also, your .env file should be located in the root directory of the project.

Also, imagemagick binary is the location to magick.exe.

dotenv
Requirement already satisfied: python-dotenv in c:\users\seo\appdata\roaming\python\python311\site-packages (1.0
yes .env is in the root

imagemagick binary is the location
C:\Program Files\ImageMagick-7.1.1-Q16-HDRI\ or C:\Program Files\ImageMagick-7.1.1-Q16-HDRI\

C:\\Program Files\\ImageMagick-7.1.1-Q16-HDRI\\magick.exe is the path

Also, could you please execute tree command so I can see your folder structure...

C:\Program Files\ImageMagick-7.1.1-Q16-HDRI\magick.exe is the path
That was the problem


Update 'publicly_available' and 'status' default values.

Description
Update the default values of status and publicly available feeds to be "Approved" and "Yes",
respectively. This was just a simple change to the generateProps function in editor/util/gtfs.js to assign a value of 1 to publicly_visible, and 2 to status. This should better conform to user expectations for a new route.
resolves #589
Checklist

[x] Appropriate branch selected (all PRs must first be merged to dev before they can be merged to master)
[x] Any modified or new methods or classes have helpful JSDoc and code is thoroughly commented
[x] The description lists all applicable issues this PR seeks to resolve
[x] The description lists any configuration setting(s) that differ from the default settings
[x] All tests and CI builds passing

New defaults:

Codecov Report

Merging #590 into dev will decrease coverage by 28.08%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##              dev     #590       +/-   ##
===========================================
- Coverage   43.89%   15.80%   -28.09%
===========================================
  Files         315      315
  Lines       17270    16100     -1170
  Branches     5269     4896      -373
===========================================
- Hits         7581     2545     -5036
- Misses       8443    11570     +3127
- Partials     1246     1985      +739

Flag
Coverage Δ

#end_to_end_tests
?

#unit_tests
15.80% <ø> (ø)

Impacted Files
Coverage Δ

lib/editor/util/gtfs.js
20.19% <ø> (-29.81%)
:arrow_down:

lib/manager/components/validation/TripsChart.js
0.00% <0.00%> (-80.40%)
:arrow_down:

...nager/components/validation/ServicePerModeChart.js
0.00% <0.00%> (-78.27%)
:arrow_down:

lib/common/util/map-keys.js
25.00% <0.00%> (-75.00%)
:arrow_down:

lib/manager/components/HomeProjectDropdown.js
0.00% <0.00%> (-72.73%)
:arrow_down:

lib/editor/util/objects.js
14.89% <0.00%> (-72.35%)
:arrow_down:

lib/editor/components/map/TextPath.js
0.00% <0.00%> (-70.00%)
:arrow_down:

...b/manager/containers/ActiveFeedVersionNavigator.js
0.00% <0.00%> (-70.00%)
:arrow_down:

lib/editor/components/timetable/HeaderCell.js
0.00% <0.00%> (-68.97%)
:arrow_down:

lib/manager/components/DeploymentPreviewButton.js
15.78% <0.00%> (-68.43%)
:arrow_down:

... and 260 more

Continue to review full report at Codecov.

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

I will cherish this PR forever


Generalize hard fork ledger view

The goal of this PR is to define
hardforkForecast :: SListI xs
                 => HardForkState_ g g xs
                 -> Exactly xs EraParams
                 -> InPairs (Translate f) xs
                 -> NP (g -.-> Maybe :.: (Forecast :.: HardForkEraLedgerView_ f)) xs
                 -> WithOrigin SlotNo
                 -> Maybe (Forecast (HardForkLedgerView_ f xs))

which can then be used in the definition of ledgerViewForecastAt for HardForkBlock, but, crucially, is entirely independent from CanHardFork, and is entirely polymorphic in the types of the various ledgers. This will then make it easier to test this as part of the HF history tests.

bors merge

bors merge


[Azure Search] SearchClient.Search method does not have the right set of parameters in the documentation

Incorrect documentation for the method SearchClient.Search https://azuresdkdocs.blob.core.windows.net/$web/python/azure-search-documents/latest/azure.search.documents.html#azure.search.documents.SearchClient.search

@pallavit I have interest in this issue, and I'm trying to write a PR.
But I am having trouble understanding what the exact difference between the code and documentation. Thank you!

@wonhyeongseo, the documentation comes from our code.
https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/search/azure-search-documents/azure/search/documents/_search_client.py#L161-L282

Hey @xiangyan99,
from what I see the documentation/example is wrong (not even valid python code; see https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/maps/azure-maps-search#search-for-an-address-or-point-of-interest ).
fuzzy_search_result = client.fuzzy_search(query: "pizza", country_filter: "fr" );

First, to pass parameters to a function, use '=' instead of ':'.
Second, the parameter country_filter needs to be a list of strings, not a string (or comma separated string).
Additionally, the doc string is inconsistent:
:keyword country_filter:
    Comma separated string of country codes, e.g. FR,ES. This will limit the search to the specified countries.

:paramtype country_filter:
    list[str]

Correct would be:
fuzzy_search_result = client.fuzzy_search(query= "pizza", country_filter= ["fr"] );

Tested this with the most recent version from pypi (1.0.0b2)

@TKlerx Thank you for the information. The code you shared is maps search client rather than document search client. :)
If you don't mind, please open a new issue to better track the problem.

Sure, will do so.


ZeroMQ/zmq support

Describe the feature
Add ZeroMQ/zmq support.
I actually started looking at mpd > ffmpeg > zmq > ffplay > pulseaudio > alsa > speaker very early in my search for a network streaming solution to replace mpd > icecast > browser > pulseaudio > alsa > speaker.  ffmpeg's libzmq implementation was broken and so I found MediaMtx and have been using it for the last 3-4 weeks.
The patch came through yesterday: https://trac.ffmpeg.org/ticket/11134 and it's been fantastic.  I opened an ssh tunnel from behind t-moble cgnat (no public ip, no ports, no router control whatsoever) and it's just worked since then.
Seems to be a very solid protocol (in 12 hours of using it), low latency, uses websockets, seems pretty well suited for mediamtx actually.

ZeroMQ (also spelled ØMQ, 0MQ or ZMQ) is a high-performance asynchronous messaging library, aimed at use in distributed or concurrent applications. It provides a message queue, but unlike message-oriented middleware, a ZeroMQ system can run without a dedicated message broker.


Spec's opinion on custom functions: special error messages?

Could this issue be more elaborated?

The spec currently doesn't support "custom functions". Is the question whether support for "custom functions" should be added?

Custom functions can be useful, for instance to convert data from one format to another.
But this could raise a new issue on how to support custom functions and portability.
Perhaps introducing a new metatype could be a solution, e.g. the following snipnet
functions:
MyFunction:
description: This is my custom function
inputs:
p1:
type: integer
...
result:
type: string
implementation: MyFunction.py
defines a custom function taking an integer parameter, returning a string and implemented by the MyFunction.py script.

I think it's hard or even impossible to declare signatures. For example, even something like get_property has dynamic argument types that depend on the path (sometimes they are strings, sometimes they are integers i.e. for list indexes). Even the return type is highly dynamic: get_property's return type depends on the value you are getting. But this does raise the bigger question as to how to validate return types for functions. It ends up being particular to the function.
What I suggested is that we use a prefix (something like &) for function calls. What happens to an unknown function depends on the implementation. They can emit a warning, fail, or just not do anything if that function call never happens.

See also #70

I agree that a signature declarative approach should not be appropriated for declaring functions like get_property and get_attribute. But these functions are already built-in functions. We should collect concrete use cases for custom functions in order to identify requirements. Perhaps other functions similar to get_property will be required, perhaps only functions with a static typed signature will be required.

It's not hard to come up with use cases for functions similar to get_property in that they accept dynamic arguments and return dynamic values.
Generally speaking function signatures are a rather weak validation. All they can do is check the types, but they can't check values and the relationship between values, which is unique to each function's semantics. Importantly, these semantics can depend on the runtime environment, so Day 0 tools wouldn't be able to do much with them anyway. I believe these would be the main use for custom functions: allowing users to interact with (usually to extract data from) their special dev, deployment, and runtime environment.
Languages like Haskell do have contracts that go way beyond signatures, but I see no value in TOSCA pursuing such strict validation.
In my opinion TOSCA functions should be more like functions in dynamic languages: Python, Ruby, JavaScript, etc.. They have a name, they accept one or more arguments, and return one value (which could be of a complex data type). This is a paradigm that is familiar to everyone.
If we absolutely want functions to be declared (I'm not sure we have to) then I suggest nothing more then declaring their name.

At a minimum, TOSCA parsers should check whether the type of the return value of the function is compatible with the type of the parameter to which the function value is assigned.
From: Tal Liron @.>
Sent: Sunday, March 13, 2022 10:14 PM
To: oasis-open/tosca-community-contributions @.>
Cc: Chris Lauwers @.>; Comment @.>
Subject: Re: [oasis-open/tosca-community-contributions] Spec's opinion on custom functions: special error messages? (Issue #68)
It's not hard to come up with use cases for functions similar to get_property in that they accept dynamic arguments and return dynamic values.
Generally speaking function signatures are a rather weak validation. All they can do is check the types, but they can't check values and the relationship between values, which is unique to each function's semantics. Importantly, these semantics can depend on the runtime environment, so Day 0 tools wouldn't be able to do much with them anyway. I believe these would be the main use for custom functions: allowing users to interact with (usually to extract data from) their special dev, deployment, and runtime environment.
Languages like Haskell do have contracts that go way beyond signatures, but I see no value in TOSCA pursuing such strict validation.
In my opinion TOSCA functions should be more like functions in dynamic languages: Python, Ruby, JavaScript, etc.. They have a name, they accept one or more arguments, and return one value (which could be of a complex data type). This is a paradigm that is familiar to everyone.
If we absolutely want functions to be declared (I'm not sure we have to) then I suggest nothing more then declaring their name.
—
Reply to this email directly, view it on GitHubhttps://github.com/oasis-open/tosca-community-contributions/issues/68#issuecomment-1066357125, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AASPLIIOI477LAYE3JM35VTU73KIVANCNFSM5QNLLTBA.
Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you commented.Message ID<EMAIL_ADDRESS>

Custom functions (and associated signatures) are now supported and documented in https://docs.oasis-open.org/tosca/TOSCA/v2.0/csd05/TOSCA-v2.0-csd05.html#_Toc125468802.


Are Tooltips supported?

Hi!  Is it possible to include tooltips in the schema, so that an end user can figure out more about the form values by hovering their mouse?

@FilmCoder you can add a description field. That gets rendered as a help text.

This css can also help keep things clean:
#some-container-element input+p{display:none}
#some-container-element input:focus+p{display:block}


Replace npm usage with yarn

What's Changing and Why
Seems this project uses yarn for package management
So I replaced some npm usages with yarn in documentation to avoid 'side effects', because other parts of the file already calls yarn and not npm
What else might be affected
Nothing
Tasks

[ ] Add tests
[X] Update Documentation
[ ] Update jimp.d.ts
[ ] Add SemVer Label

:rocket: PR was released in v0.6.5 :rocket:


[DDW-1014] Implement search logic

This PR implements the searching logic (actions, store, api) that will be used by the UI to interact with the GraphQL API.
Implemented:

[x] Moved the existing block search related code from features/blocks to features/search (we can also change that - i thought it makes more sense if the search is its own feature)
[x] Integration test setup with Jest + Wallaby setup for fast interactive API testing
[x] First passing test case which uses the searchBlockById action to retrieve a block and check the result on the store.

Todo:

[ ] Searching for transactions + providing the result on the store
[ ] Searching for epochs + providing the result on the store

@DeeJayElly @rhyslbw i have added the work in progress label only because this PR does not yet implement the complete search logic - if you think that it would still be benefitial to merge this (so that other work can be based on this) feel free to merge this and i can setup another PR for continued work!


Fix Loading - without load in an external file

Fixes Discord
To help everyone out, please make sure your PR does the following:

[x] Update the first line to point to the ticket that this PR fixes
[x] Add a message that clearly describes the fix
[x] If applicable, add a test that would fail without this fix
[x] Make sure the unit and integration tests pass locally with pnpm run tests and cd integration && pnpm run tests
[x] Includes a changeset if your fix affects the user with pnpm changeset

Heya 👋
Any ETA on this? We'd like to push another release to prod but we can't roll back to 1.2.0 since we rely on the bugfix in 1.2.2.

Finding the right heuristic to always have the correct initial value is proving to be kind of tricky. In order to unblock your deploy @SeppahBaws I propose that we add a fetching argument to the query store constructor that you can use to set the initial value. I know it's not ideal but it seems like something that we would always regardless of having a smart default and it removes some of the pressure so we can think carefully here. How does that sound @jycouet?

I'm not really in favor of a fetching argument in the query store constructor.

It's introducing a new thing for users and putting the responsibility on them.
It will be hard to remove. (Breaking change?)

This PR is trying to fix a regression from https://github.com/HoudiniGraphql/houdini/pull/1068 (that fixed https://github.com/HoudiniGraphql/houdini/issues/1066)
Right now, the PR

Fixes The fetching issue
Keep https://github.com/HoudiniGraphql/houdini/issues/1066 working
But, a new problem showed up: https://github.com/HoudiniGraphql/houdini/blob/667b8407e1090ba004787506e7d5410a31e5b1b2/e2e/kit/src/routes/stores/mutation-update/+page.svelte#L8-L10 I will dig on it this morning.

@SeppahBaws, to unblock you, can't you put the query in the Svelte file directly? So that you can roll out your release?
Let us know.

@SeppahBaws, to unblock you, can't you put the query in the Svelte file directly? So that you can roll out your release?
That would work as a workaround, but in some of our components we mix and match up to 5 different query stores, which would result in adding +-200 extra LOC in that component, something I'm a bit reluctant to do.

I'll have a stab at rewriting the logic in these components to compensate for the fact that those stores will be fetching = true by default, I'll let you know how it goes.

Update:
The fix @jycouet shared with me in Discord did the trick, without bloating my component file 🥳
For anyone else running into the same issue:
If you have query file like this: MyQuery.gql:
query MyQuery {
  me {
    name
  }
}

simply change it to this: MyQuery.svelte:
<script lang="ts">
  import { graphql } from "$houdini";
  graphql(`
    query MyQuery {
      me {
        name
      }
    }
  `);
</script>

Since it's now in a svelte file, the store will have the correct fetching state by default, and I don't have to mess around in my component itself :)


Does try_send for mpsc::Sender need to require &mut self?

Looking at the details of how it's implemented, shouldn't interior mutability suffice?

No, this isn't possible-- it calls SenderInner::try_send which calls functions that mutate the maybe_parked field.


param of action should before state in Destructuring assignment ，I think

bug or advice
in redux/examples/counter/src/reducers/index.js, param of action should before state in Destructuring assignment

solved


warn: parse failure: valkey.io

i have this error when running pkgx commands on the terminal.  (pkgx 1.1.6 on macox sonoma 14.5)
for example:
$ node -v

then i run it with x command i get:
env +node && node -v
warn: parse failure: valkey.io
v22.3.0

it doesn't happen if i run pkgx node -v however if i install node with pkgx it happens every time i run node commands.

Usually this is a minor file corruption in your local pantry. If so, pkgx --sync should fix it.

Usually this is a minor file corruption in your local pantry. If so, pkgx --sync should fix it.

solve it! thanx. great bot, btw!


Added render prop

Added render prop that absolutely allows making Instagram Login using their custom component.

sorry never saw this, going to close for now but if you fix missing buttonText then this can be merged


[Suggestion] Allow to force transition on dynamic components

Related to #2633. Sometimes we need to force apply transition when switching dynamic components. Example: https://jsfiddle.net/Lnnju3ej/5/ When click to button 3 transition not apply because of the same component.

I think forcing transition in this case doesn't quite make sense because the component did not really change.
What you are really trying to achieve is dynamically switching between content with transitions rather than components. In 1.1 we will probably come up with a new mechanism specifically to deal with this scenario, and in the meanwhile you can somewhat simulate it with a v-for with just a single item.

In 1.1 we will probably come up with a new mechanism specifically to deal with this scenario, and in the meanwhile you can somewhat simulate it with a v-for with just a single item.

Hey @yyx990803 was this ever implemented?

If anyone stumbles upon this I solved it by simply adding a dynamic key to the component so that a data change would remount it.
<component :is="componentType" :key="somethingThatChanges"/>

Not sure if this is the most elegant way to solve it.

@PierBover thank you for sharing the hint about :key.


Patch to support OpenVAS 8 XML

Just a quick patch to make it work with OpenVAS 8 XML.
Thanks for sharing the original code!
This patch is not backwards compatible with older OpenVAS XML and also not heavily tested.

Thanks for your issue :)


make loading, results and input text field visible

There was an issue in nextjs examples ( in both  server and client) that we cannot able to see the text for loading, results and what we type in input field. Its due to there white text color, so to make it visible I make in black.

Please review the changes

Hi there 👋 Could you send a screenshot of what you were seeing?
This is what it shows for me:

Perhaps this is an issue with a browser extension, or maybe a default colour scheme?

Don't know why, for me its working like this (with default code)...
https://github.com/xenova/transformers.js/assets/63542485/ecb6863d-9332-4980-9670-c8db65002228

This appears to be an issue with either your browser or system being dark mode by default. Your fix won't affect the light mode version, so if you'd like to reopen, I'd be happy to merge 👍

Sure! Thanks,
Actually, I want to apologise, because I created next app use create-next-app and then copy and paste the components.
So default theme of next app is dark, so that is why, it's happening.
But if this fix doesn't effect the light mode version, then please merge it, because If someone else repeat the same path, he may encounter with same issue.
BTW Thanks for your response. 👍


DSO missing from command line?

Without this, throws an error:
System: WSL, Ubuntu 20.04
user@DESKTOP:/mnt/c/Users/User/Mujoco/simulate$ make
g++ -O2 -I../include -L../lib -pthread -Wl,-no-as-needed -Wl,-rpath,'$ORIGIN'/../lib -std=c++17 -c simulate.cc
cc  -O2 -I../include -L../lib -pthread -Wl,-no-as-needed -Wl,-rpath,'$ORIGIN'/../lib -std=c11   -c uitools.cc
cc1plus: warning: command line option ‘-std=c11’ is valid for C/ObjC but not for C++
g++ -O2 -I../include -L../lib -pthread -Wl,-no-as-needed -Wl,-rpath,'$ORIGIN'/../lib -std=c++17 main.cc simulate.o uitools.o -lmujoco -lglfw -o ../bin/simulate
main.cc:190:67: warning: ignoring attributes on template argument ‘int (*)(void*) noexcept’ [-Wignored-attributes]
  190 |   using unique_dlhandle = std::unique_ptr<void, decltype(&dlclose)>;
      |                                                                   ^
/usr/bin/ld: /tmp/ccL62ELj.o: undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
/usr/bin/ld: /lib/x86_64-linux-gnu/libdl.so.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** [Makefile:14: all] Error 1

These Makefiles really aren't being maintained. Does your workflow critically depend on them? We'd prefer to remove them entirely and ask everyone to depend on CMake.

@saran-t , no. I was just figuring out the build system for my own projcet. After looking at CMake's implementation, it is clear that makefiles are not necessary.
Ona side note, let's say if I were to use mujoco in a project, would passing the path of the top level CMakeLists.txtlike
set(MUJOCO_PATH external/mujoco)

to my  project's CMakeLists.txtdirectly be able to detect #include <mujoco.h>? (in Visual studio or VS code)


Update dependencies

Today clippy showed me following error:
error: multiple versions for dependency `cfg-if`: 0.1.10, 1.0.0
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_crate_versions

traversing the dependency graph I noticed that the problems stems from the term-painter crate still using version 0.6.1 of the term crate.
├── term-painter v0.3.0
│   └── term v0.6.1
│       └── dirs v2.0.2
│           ├── cfg-if **v0.1.10**

Would it be possible to upgrade to version 0.7 of the term crate?

Updated to term 0.7, released as term-painter 0.4.


Add type annotations to utils

I've added LuaLS (LuaCATS) type annotations to the methods in utils.lua, because those are the methods contributors will be using the most.
This should make it much easier for users and developers to get their head around the API and codebase sooner.
This pull request only adds type annotations, no code.

Fantastic thanks


links for label containing slash not working

Pre-requisites

[X] I have double-checked my configuration
[X] I can confirm the issues exists when I tested with :latest
[ ] I'd like to contribute the fix myself (see contributing guide)

What happened/what you expected to happen?
using links: in wfcontroller configmap:
for a label key not containing slash it works, ie this works:
label=s3-folder%3D${workflow.metadata.labels.s3-folder}
for a label key containing dot slash it returns null in the generated link url:
label=workflows.argoproj.io%2Fworkflow-template%3D${workflow.metadata.labels.workflows.argoproj.io/workflow-template}
below also returns null
label=workflows.argoproj.io%2Fworkflow-template%3D${workflow.metadata.labels.workflows.argoproj.io%2Fworkflow-template}
Version
3.4.8
Paste a small workflow that reproduces the issue. We must be able to run the workflow; don't enter a workflows that uses private images.
n/a

Logs from the workflow controller
kubectl logs -n argo deploy/workflow-controller | grep ${workflow}

Logs from in your workflow's wait container
kubectl logs -n argo -c wait -l workflows.argoproj.io/workflow=${workflow},workflow.argoproj.io/phase!=Succeeded

If this is a UI-only error, this function may need updating to handle this.
Is it slashes specifically that fail, or the fact that the label has dots in it?
This line in the example configmap works, but that's a static link, not a templated link

my guess is that it doesn't know how to reference label key with dot because it might be searching for a key of 'workflows'

Yea it's definitely the dot. It's used as a delimiter. The slash shouldn't matter since it uses bracket notation.
This would need a more complicated regex to solve. Either the user input would have to be in bracket notation or could specifically check for labels and annotations and stop delimiting at the end. Bracket notation would be more consistent with expr on the backend and JS bracket notation, so I'd probably opt for that.
We'd need a new example for the docs of this as well. And tests would be good to have too.

i tried bracket notation but still no luck

Correct, it is not currently supported. That was just one option / proposal I wrote if a fix were to be implemented.

Oh right, figured I'd mention that the workaround would be to not use a dot in the label.

maybe https://github.com/argoproj/argo-workflows/pull/13752 will help

it seems like with the merged PR there would still be an issue getting labels/annotations from podMetadata
ex:
${workflow.spec.podMetadata.annotations.workflows.argoproj.io/something}

wouldn't work because the logic is only limited to workflow.metadata.labels or workflow.metadata.annotations


Refactors

This is all I can think of for now, feel free to comment any possible additions / changes


Reverse animation

I know there is an option to reverse animation but I want to animate text path from end to start. Please make that changes I can start animation from right to left in synctextpathview

感谢您的关注,我会尽快给您答复


copyright notice/disclaimer at the top of every source code file

I'm in favor of getting rid of those, since they are not required. Unless someone thinks we need it.

If the source code file is or can be distributed alone then the notice should be there.
If the source code file is always distributed with a LICENSE file, etc. then the notice can be removed.
@LourensVeen what do you think?

if i remember correctly, they are not (legally) necessary
How about only leaving them in if the license is not our preferred license, and redistribution is likely?

I agree with @sverhoeven on that, if the files are likely to be distributed separately they should have notice on top, otherwise not.

It's not legally necessary. When you create a work you get to own the copyright, whether you put any notices on it or not (according to the Berne convention, which almost all nations are signatory to). If you don't have a statement in every file and somehow a file gets separated from the rest, then whoever gets it would not know that it's licensed, and therefore should not distribute it. If they can somehow ascertain that it's ASLv2, then they can safely distribute it, as long as they put the license notice back in, since the license requires that.
Of course, having such a notice prevents a lot of hassle in such a case, but I agree that in practice this probably doesn't happen often, and especially in short files it's not nice to have such a big block of text repeated everywhere.
Both the FSF and the ASF recommend putting a rather lengthy notice into every file, with a restatement of the warranty disclaimer. I've never heard of anyone suing anyone over a warranty issue with free software however, and I can't imagine a judge ruling that we're responsible for warranty on a free-of-cost piece of software licensed under a license that explicitly disclaims warranty, just because it wasn't restated in every single file. (If someone pays us to develop software for them, then we will probably be required to provide warranty regardless of what the license says, but that's a separate issue.)
Perhaps we can use a shortened version, something like this:
Copyright 2014, 2016 Netherlands eScience Center.
Licensed under the Apache License, version 2.0. See LICENSING for details.
The LICENSING file could then contain the longer statement, together with the actual license text, or something more complicated if the program consists of multiple modules with different licenses.
Anyone wanting to reuse a single file from our program would then be responsible for doing so according to the license, e.g. by having their own LICENSING file that explains that we own that particular file and contains the license, or by adding the longer statement to the file, or in some other way that the license we used allows.
Since there is at least a statement of who owns the copyright, if someone happens to come across a single file, they at least know that it's copyrighted (and can't claim they thought it was public domain) and they can contact us if there's any doubt as to what happened and what they are and aren't allowed to do.

Agree with @LourensVeen on including that short notice. Program modules get copied around when users want only part of the functionality.

What will we do in case of files with external contributions. We'd have to ask people to transfer their copyrights to NLeSC. We should have some standard form for that too

Not necessarily, the copyright could be shared. The contributors do have to explicitly contribute under Apache 2.0, but the license already contains language that says that all contributions are considered to be under Apache 2.0 as well.
Of course, this will make it more difficult to relicense the code, because all contributors have to give permission. This is more of a governance matter than a licensing matter though.

migrated to https://github.com/NLeSC/guide/issues/8


Add video search

Add video search
This adds full reverse video search with the same interface as we
already had for images. From the user's standpoint it's the same, but
the backend is all sorts of new things.
This utilizes a new gem I created: zelkova Which builds the search tree. Feel free to include the gem in this review if you'd like, or just for reference.
To test:
rails db:migrate
rails db:reset
rails t
start the server, click "media search" and then upload a video to see if
anything shows up. You may consider archiving a youtube video, and then
searching using the same video file to make sure it returns stuff.

@cguess if you can merge the latest upstream in here, I can finish testing it out!

I'm running into the following two reproducible issues:
1. Duplicate search results

rails db:reset (for a clean database)
youtube-dl https://t.co/It4oIhHk2C to download the Lumberjack clip from Twitter
Perform a media search with the resulting download

What should happen: you get a search result!
What does happen: you get two search results:

2. YouTube search fails on missing template

Add a YouTube video to the archive (example)
youtube-dl -f 22 https://www.youtube.com/watch?v=Df7UtQTFUMQ to download it (in MP4 format, since the default is MKV which we don't support)
Perform a media search with the resulting download

What should happen: you get a search result!
What does happen: you get a Rails error about the missing YouTube post template:

Linking this here: https://github.com/TechAndCheck/zenodotus/issues/213


bump<EMAIL_ADDRESS>

Updates go-mobile with a fix for https://github.com/textileio/textile-go/issues/283

nope, no API changes.


soc: arm: nordic: fix GPIO pin forwarder initialization

nRF5340 application core should not attempt to pass control over any
pins to the nRF5340 network core if the latter is disabled.
This commit fixes https://github.com/zephyrproject-rtos/zephyr/issues/43476.
Signed-off-by: Jedrzej Ciupis<EMAIL_ADDRESS>

I can confirm that it fixes https://github.com/zephyrproject-rtos/zephyr/issues/43476

@anangl the commit that introduced the regression described in #43476: https://github.com/zephyrproject-rtos/zephyr/commit/81c48c3e684f1277b89e711b72366a5a676bc880 accidentally enabled forwarding of UART pins to the network core in cases that had it disabled before. This PR aligns the behavior, so that pins are forwarded to the network core only when it is actually enabled.
However, as @joerchan has found out in parallel, even with this accidentally enabled forwarding, the expected outcome is different from what was observed in #43476. We're currently working on preparing a follow-up PR that will fix the wrong behavior that was brought to daylight when https://github.com/zephyrproject-rtos/zephyr/commit/81c48c3e684f1277b89e711b72366a5a676bc880 was merged.

@carlescufi Can you merge this one? It fixes a regression breaking nrf53_ns output. I run a test suite on this PR and with it nrf53_ns is again passing tests.


document Random.sample

Currently:
    // For lodash interoperability, but with seeded random
    sample: function( array ) {

If I'm new to this, then:
(1) I need to guess which lodash functionality this is interoperable with.  That may be simple, unless I've already had to deal with randomIntegerBetween, whose name has no correspondence to lodash _.random.  So why not just say "This is a replacement for lodash _.sample" ?
(2) Then I need to go find the documentation for lodash sample. That makes me unhappy, because it wastes my time.
So please, let's give this function proper documentation (as should be the case with all common code).

Random.sample should have proper documentation by now, @pixelzoom can you please review?

👍 Closing.


New step-functions-workflows-collection -  s3-highthroughput-ditributed-map

Issue: #340
Description of changes:
This Pattern helps to increase the parallelism level of distributed map when reading the large s3 buckets and the rapidity of treatment is a desired argument.
Actually to achieve this goal today, we mostly use the lambda to achieve higher parallelism level that actually put a new lambda concurrency constraint on the table to aligne with distribution. this makes often things more complicated, including, long running functions , function Concurrency level, S3 connection handling and etc.
This pattern removes the need of batch and paralelism need at function level , and let achieve that parallelism without a single line of code.

hello, please can you explain how this workflow helps to increase the parallelism level of distributed map state?

hello, please can you explain how this workflow helps to increase the parallelism level of distributed map state?

It actually use the Distributed map to increase paralelism level by using Nested Distributed Map,
The Original Distributed Map Reads the S3 whole bucket and dispatches the batch of events ( 300 par example ) into a nested distributed map that will rebatch the 300 batch into 30 of 10 events and treat them in paralel
The patterns represents no advantage for low volume of files but has a significant improvement for a higher volume of objects in s3 bucket ( based on tests using nested 10K of objects was treated in 10 seconds vs not nested in 40 seconds)


Spacy Featurizer does not set word embeddings as features

Rasa Open Source version
2.7.2
Rasa SDK version
No response
Rasa X version
No response
Python version
3.6
What operating system are you using?
Linux
What happened?
I am using the following pipeline to train an Italian NLU model.
language: "it"

pipeline:
  - name: SpacyNLP
    model: "it_core_news_sm"
  - name: SpacyTokenizer
  - name: SpacyFeaturizer
    pooling: "mean"
  - name: DIETClassifier
    epochs: 1
  - name: EntitySynonymMapper
  - name: ResponseSelector
    epochs: 100
  - name: FallbackClassifier
    threshold: 0.7

When I run rasa train nlu, I obtain the following error in the DIET training step:
TFLayerConfigException: The attribute signature must contain some sequence-level feature signatures but none were found.
Going into the code of the spacy_featurizer:
    def _set_spacy_features(self, message: Message, attribute: Text = TEXT) -> None:
        """Adds the spacy word vectors to the messages features."""
        doc = self.get_doc(message, attribute)

        if doc is None:
            return

        # in case an empty spaCy model was used, no vectors are present
        if doc.vocab.vectors_length == 0:
            logger.debug("No features present. You are using an empty spaCy model.")
            return

        sequence_features = self._features_for_doc(doc)
        sentence_features = self._calculate_sentence_features(
            sequence_features, self.pooling_operation
        )

        final_sequence_features = Features(
            sequence_features,
            FEATURE_TYPE_SEQUENCE,
            attribute,
            self.component_config[FEATURIZER_CLASS_ALIAS],
        )
        message.add_features(final_sequence_features)
        final_sentence_features = Features(
            sentence_features,
            FEATURE_TYPE_SENTENCE,
            attribute,
            self.component_config[FEATURIZER_CLASS_ALIAS],
        )
        message.add_features(final_sentence_features)

I saw that doc.vocab.vectors_length = 0 even if the spacy model has computed the word embeddings.
Therefore, no features are set in the message for the following components.
It sounds like a bug, doesn't it?
Command / Request
No response
Relevant log output
No response

In my case, I solved modifying the function in the following way:
    def _set_spacy_features(self, message: Message, attribute: Text = TEXT) -> None:
        """Adds the spacy word vectors to the messages features."""
        doc = self.get_doc(message, attribute)

        if doc is None:
            return

        sequence_features = doc.tensor # (num_tokens, dim_features)
        sentence_features = np.expand_dims(np.mean(doc.tensor,0),0) # (1, dim_features)

        final_sequence_features = Features(
            sequence_features,
            FEATURE_TYPE_SEQUENCE,
            attribute,
            self.component_config[FEATURIZER_CLASS_ALIAS],
        )
        message.add_features(final_sequence_features)
        final_sentence_features = Features(
            sentence_features,
            FEATURE_TYPE_SENTENCE,
            attribute,
            self.component_config[FEATURIZER_CLASS_ALIAS],
        )
        message.add_features(final_sentence_features)

Thanks for raising this issue, @erohmensing will get back to you about it soon✨
Please also check out the docs and the forum in case your issue was raised there too 🤗

Hey @robertanto, this looks like a bug indeed, thanks for spotting it and digging into the code! I'll try to reproduce it first.

Alright, I've been able to reproduce this very easily -- by creating a default project (rasa init) and replacing the config with the one provided above.

I'm moving this along to our inbox to be picked up soon.
As far as I can see, rasa train nlu has been breaking on this thing for quite some time now. With 2.5.x (i.e. after we upgraded to Spacy 3.0) I'm seeing the error reported above. With 2.4.x, I see an older error which, however, seems to be due to the same thing -- features not being present where we expect them to be after Spacy featurisation. I think this deserves a deeper exploration and tests to see if the above fix is sufficient or if we need to do more.

Could you try using the md model instead of the sm one? The sm models in spaCy don't always have proper vectors if I recall correctly.

Per docs, here:

Also here.

If I understand, there are context vectors representative of the word's meaning in the sentence and un-contextualized word embeddings representative of the word itself. Is it right?
Even if it is not a bug, it may be useful to give the possibility to the user to select which embeddings to use (or eventually use both) as input to DIET.

Even if it is not a bug, it may be useful to give the possibility to the user to select which embeddings to use (or eventually use both) as input to DIET.

I agree with you @robertanto. I guess the first step is to fix the issue with sm models so that Rasa gives users a meaningful warning or an error. The next step would be thinking about vectors vs tensors provided by Spacy and how we could use either of those or both combined... For whoever picks up this latter issue, there's some inspiration from @koaning in this Slack thread.


Allowing berwyn to access all of the profile apart from visits section

Context
Adding the profile to berwyn but without the visits row
Intent
https://trello.com/c/TRCiCgJ2
Now no longer representing personalisation as a distinct feature - we want this to be present across all prisons.
As part of this we've also decided to remove the coronavirus section from popular topics and rename music and talk to NPR - to match the renaming of content done the other week
Considerations
We could have represented showing visits as a separate feature to enable of disable at an establishment. Decided not to do this as we don't have any intention of supporting this in the future. Berwyn is just the odd one out in this case.
Checklist

[ ] This PR contains only changes related to the above card
[ ] Tests have been added/updated to cover the change
[ ] Documentation has been updated where appropriate
[ ] Tested in Development

it doesn't allow for other establishments opting for a diminished functionality, Although I think I object to us catering
for this level of selective degradation more

Yes, this is precisely how I feel about it


#39 Module Split and JUnit 5 support

Description

Split S3Mock server and JUnit rule into different modules to reduce runtime dependencies. (saves 5 MB, yay!)
Update base image and dependencies to latest (except spring boot, which is updated to latest path-release)
Refactor configuration and initialization of the App, make the builder in S3MockRule usable and use random ports in the S3MockRule by default.
Extract a common base for different test frameworks
Add JUnit5 Extension
Update README to add more documentation for different methods to use the mock

The version was bumped to 2.0.0 because of the following (breaking) changes:

S3MockRule was moved to another package (com.adobe.testing.s3mock to com.adobe.testing.s3mock.junit4) and its own Maven module (s3mock-junit4).
The S3MockRule now uses random ports by default instead of 9090/9191.

The rest of the changes are expected to be compatible with regards to API and behavior.
Related Issue
See #39.
Tasks

[x] I have signed the CLA.
[x] I have written tests and verified that they fail without my change.

@timoe please review. After this PR, I'll update to Spring Boot 2 - do you think we should wait with the 2.0.0 release for that to be included as well?

Wanna squash?

I've squashed the requested change into the right commit and would leave the others as they are, as they contribute separate steps to the whole story.


403 error when trying to use UserDelegationKey

Which service(blob, file, queue, table) does this issue concern?
blob
Which version of the Azurite was used?
3.30.0 (VsCode extension)
Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)
VS Code
What's the Node.js version?
What problem was encountered?
Trying to test GetUserDelegationKeyAsync I get this error:
Azure.RequestFailedException : Server failed to authenticate the request. Make sure the value of the Authorization header is formed correctly including the signature.
RequestId:2b581db8-bdf9-4ff5-a5e9-b334aa1faf52
Time:2024-05-09T00:33:06.607Z
Status: 403 (Server failed to authenticate the request. Make sure the value of the Authorization header is formed correctly including the signature.)
ErrorCode: AuthenticationFailed
Steps to reproduce the issue?
Azure SDK (12.14.1)
var blobServiceClient = new BlobServiceClient(@"DefaultEndpointsProtocol=https;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=https://localhost:10000/devstoreaccount1;QueueEndpoint=https://localhost:10001/devstoreaccount1;");
var userDelegation = await blobServiceClient.GetUserDelegationKeyAsync(DateTimeOffset.UtcNow, DateTimeOffset.UtcNow.AddMinutes(30), default);

VSCode settings: (cert created w/ dotnet tool)
{
    "azurite.cert": "D:\\storage-test\\cert.pfx",
    "azurite.pwd": "<omitted>",
    "azurite.oauth": "basic",
}

I followed the directions I could find to setup oauth and https for azurite. I tested that I am able to create containers and blobs.
If possible, please provide the debug log using the -d parameter, replacing <pathtodebuglog> with an appropriate path for your OS, or review the instructions for docker containers:
-d "<pathtodebuglog>"

Please be sure to remove any PII or sensitive information before sharing!
The debug log will log raw request headers and bodies, so that we can replay these against Azurite using REST and create tests to validate resolution.
Have you found a mitigation/solution?

@juliusl
"getUserDelegationKey" only support Oauth (Microsoft Entra ID) authentication. This is same in both product Azure and Azurite.
However, you are trying to call it with sharedkey authentication.
See more details in the rest API doc and feature doc:
https://learn.microsoft.com/en-us/rest/api/storageservices/get-user-delegation-key#authorization
https://learn.microsoft.com/en-us/rest/api/storageservices/create-user-delegation-sas

@blueww

BTW, to enable Oauth authentication with Azurite, you need to start Azurite with https and Oauth configuration, see https://github.com/Azure/Azurite?tab=readme-ov-file#oauth-configuration
And for Oauth, Azurite will do basic authentication, like validating incoming bearer token, checking issuer, audience, expiry. But Azurite will NOT check token signature and permission.

Can you give me an example of how to create a test blob client w/ oauth instead of using the emulator connection string?

I ended up w/ this, is this what you meant?
// See https://aka.ms/new-console-template for more information
using Azure.Core;
using Azure.Storage.Blobs;

Console.WriteLine("Hello, World!");

var client = new BlobServiceClient(new Uri(@"https://localhost:10000/devstoreaccount1"), new TestTokenCredentials());

var key = await client.GetUserDelegationKeyAsync(DateTimeOffset.UtcNow, DateTimeOffset.UtcNow.AddDays(10));

Console.WriteLine(key);

return;

class TestTokenCredentials : TokenCredential
{
    public TestTokenCredentials()
    {
    }

    public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken)
    {
        return new AccessToken("test", DateTimeOffset.UtcNow.AddDays(1));
    }

    public override ValueTask<AccessToken> GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken)
    {
        return ValueTask.FromResult(new AccessToken("test", DateTimeOffset.UtcNow.AddDays(1)));
    }
}

I ended up w/ this, is this what you meant?
// See https://aka.ms/new-console-template for more information
using Azure.Core;
using Azure.Storage.Blobs;

Console.WriteLine("Hello, World!");

var client = new BlobServiceClient(new Uri(@"https://localhost:10000/devstoreaccount1"), new TestTokenCredentials());

var key = await client.GetUserDelegationKeyAsync(DateTimeOffset.UtcNow, DateTimeOffset.UtcNow.AddDays(10));

Console.WriteLine(key);

return;

class TestTokenCredentials : TokenCredential
{
    public TestTokenCredentials()
    {
    }

    public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken)
    {
        return new AccessToken("test", DateTimeOffset.UtcNow.AddDays(1));
    }

    public override ValueTask<AccessToken> GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken)
    {
        return ValueTask.FromResult(new AccessToken("test", DateTimeOffset.UtcNow.AddDays(1)));
    }
}

We are Azurite owner, but not .net SDK expert, so might not be the best person to give the usage of .net SDK.
Here's a .net SDK example for you reference.
https://learn.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-dotnet?tabs=visual-studio%2Cmanaged-identity%2Croles-azure-portal%2Csign-in-visual-studio%2Cidentity-visual-studio&pivots=blob-storage-quickstart-scratch#sign-in-and-connect-your-app-code-to-azure-using-defaultazurecredential
For your above code, it might not work with Azurite, since Azurite will do some basic validation on the token (see details). So use string like "test" as the token won't pass validation in Azurite.
And you must start Azurite with Oauth configuration to support Oauth credential.


Call i2c_master_cmd_begin after each command? (IDFGH-2188)

It seems that I can't call i2c_master_cmd_begin after each step, I must put the full scenario or data in the queue then call it once, but what I'm trying to do is send each command separately..

Okay from #680 I set timeout using i2c_set_timeout(i2c_master_port, 1048575); because it seems I had problem with timeout and by creating new i2c_cmd_handle_t for each command seems to solve it, I don't know if this is the best way, but it works..

@nagyation Thanks for reporting. Feel free to reopen with more details. Thanks.


ObfuscatePipe is not compatible with java 17

Current Behavior

Expected Behavior
https://medium.com/@agrawalprince617/eliminating-tibcrypt-dependency-for-a-seamless-java-8-to-17-upgrade-23c95c82a8ad
Environment Information
FF! 8.1.1: frank2utility_oauthtokenservice
Running on frank2utility-oauthtokenservice-app-tst using Apache Tomcat/9.0.83
Java Version: OpenJDK Runtime Environment (17.0.12+7-LTS)
Heap size: 448M, total JVM memory: 1006M
Free disk space: 10GB, total disk space: 15GB
Up since: 2024-09-03 11:17:36 (16d)
Steps To Reproduce
No response
Configuration
No response
Input
No response
What database are you using?
No response
What browsers are you seeing the problem on?
No response
Relevant Log Output
No response
Anything else?
No response

some background: the application was using 7.9.3 with a custom ObfuscatePipe. That is why the old package names are visible in the stacktrace. 8.1.1 was reported as FF version in the issue description since ObfuscatePipe was only introduced in 8.1.x versions.
The line numbers in the stacktrace and the code might differ a little but it is basically the same code.
Unfortunately, i can no longer reach the original stacktrace but I found another image that gives the other part(the important part :D ) of the stacktrace.

From the stacktrace the issue seems to happen while decrypting
Moreover, the issue must be reproducible by running the ObfuscatePipeTest class against jdk 17 I think

Thank you for your response!

Tibcrypt library is deprecated/removed and doesn't work well with Java 17 or higher. We need to remove this library and implement an alternative.


Add column for each client's supported platform

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

File
Status
Preview URL
Details

docs/consume-packages/Overview-and-Workflow.md
:white_check_mark:Succeeded
View

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

Docs Build status updates of commit 5caa163:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/consume-packages/Overview-and-Workflow.md
:white_check_mark:Succeeded
View

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

Done! There's quite a few more tweaks I plan to do in this section, but I'll do those in subsequent pull request. Please let me know if there any other changes you'd like as part of this pull request though!

@loic-sharma Cool, merge whenever or i'll get to it after build status & another pass.

@loic-sharma One last check as builds are back. A quick LGTM or feel free to merge :)

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

File
Status
Preview URL
Details

docs/consume-packages/Overview-and-Workflow.md
:white_check_mark:Succeeded
View

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


Speed up tests

Hi @SteveDunn I stumbled across this mention of async handling i xUnit, and thought of the perf issues in the test suite over here.
https://playwright.dev/dotnet/docs/test-runners#xunit-support
it might help switching to NUnit for the integration tests to avoid spawning all the async test runs at once.

Many thanks! I'll take a look and compare.


DioError [DioErrorType.response] v5.0

Package
dio
Version
5.0.0
Output of flutter doctor -v
[✓] Flutter (Channel stable, 3.7.3, on linux 6.1.12-zen1-1-zen, locale en_US.UTF-8)
    • Flutter version 3.7.3 on channel stable at /opt/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision<PHONE_NUMBER> (11 days ago), 2023-02-08 15:46:04 -0800
    • Engine revision 248290d6d5
    • Dart version 2.19.2
    • DevTools version 2.20.1

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    • Android SDK at /opt/android-sdk
    • Platform android-33, build-tools 33.0.1
    • ANDROID_HOME = /opt/android-sdk
    • Java binary at: /usr/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.18+10)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • CHROME_EXECUTABLE = /usr/bin/chromium

[✓] Linux toolchain - develop for Linux desktop
    • clang version 15.0.7
    • cmake version 3.25.2
    • ninja version 1.11.1
    • pkg-config version 1.8.0

[✓] Connected device (2 available)
    • Linux (desktop) • linux  • linux-x64      • linux 6.1.12-zen1-1-zen
    • Chrome (web)    • chrome • web-javascript • Chromium 110.0.5481.100 Arch Linux

[✓] HTTP Host Availability
    • All required HTTP hosts are available

Dart Version
2.19.2
Steps to Reproduce
requests working fine on 4.0.6 but when I upgrade to 5, i got Status: 400 Bad Request https://github.com/cfug/dio/issues/1171
flutter: ║  https://api.********com/graphql
flutter: ╚══════════════════════════════════════════════════════════════════════════════════════════╝
flutter: ╔ Headers
flutter: ╟ content-type: application/json
flutter: ╟ contentType: application/json
flutter: ╟ responseType: ResponseType.json
flutter: ╟ accept: */*
flutter: ╟ followRedirects: true
flutter: ╟ connectTimeout: null
flutter: ╟ receiveTimeout: null
flutter: ╚══════════════════════════════════════════════════════════════════════════════════════════╝

Expected Result
flutter: ║  https://api.********com/graphql
flutter: ╚══════════════════════════════════════════════════════════════════════════════════════════╝
flutter: ╔ Body
flutter: ║
flutter: ║    {
flutter: ║         data: {
flutter: ║             __typename: "Mutation",
flutter: ║             login: {
flutter: ║                 __typename: "Login******",
flutter: ║                 "eyJhbGciOi*********"
flutter: ║                 "eyJhbGciOiJI*************"
flutter: ║            }
flutter: ║        }
flutter: ║    }
flutter: ║
flutter: ╚══════════════════════════════════════════════════════════════════════════════════════════╝

Actual Result
flutter: ║  https://api.********com/graphql
flutter: ╚══════════════════════════════════════════════════════════════════════════════════════════╝
flutter: ╔ DioErrorType.badResponse
flutter: ║ POST body missing, invalid Content-Type, or JSON object has no keys.
flutter: ╚══════════════════════════════════════════════════════════════════════════════════════════╝```

This will be resolved by #1671 once the new version is released.

 As a reference, setting up a test like https://github.com/cfug/dio/blob/265e8964b93c699a12dd875100300402db7d14e0/dio/test/options_test.dart#L220 would be helpful to find the root cause.

Can you simplify your code with some raw requests? More specifically, we don't know what happened with QuertOptions, client.query, Link.from. It would be better of you can reproduce the exception using a minimal example without any business logic.


access: may-start-trybots

Hi,
Could I maybe have Gerrit access for running the TryBots?
I'm trying to fix some bugs such as https://go.dev/cl/628075, having this permission will save Reviewers time.
My Gerrit user ID there is 58123, email address is<EMAIL_ADDRESS>See https://go.dev/wiki/GerritAccess#running-trybots-may-start-trybots
Thanks!
@cagedmantis

Related Issues

access: may-start-trybots #63461 (closed)
access: running TryBots #58946 (closed)
access: may-start-trybots #63724 (closed)
access: may-start-trybots #57164 (closed)
access: may-start-trybots  #63623 (closed)
access: may-start-trybots #49604 (closed)
access: running TryBots #56854 (closed)
access: requesting access for Running TryBots #67577 (closed)
access: may-start-trybots #62550 (closed)
access: may-start-trybots #24604 (closed)

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

Hi Youlin,
Thank you for your contributions, and for requesting trybot access! I've added you to the may-start-trybots group, so you should be able to do so now.
As you've probably seen at https://go.dev/wiki/GerritAccess#running-trybots-may-start-trybots, please be sure to skim CLs before starting a trybot run.
Let us know if you have any questions or issues with it, and thanks again!