FR: Bundle a dart library/snapshot + VM as an exexcutable

Strawman
Builds a.dar, or Dart archive using the program dar, bundled as part of the SDK.
Assume the following program structure:
hello_world/
  bin/
    hello_world.dart
  lib/
    hello_world_lib.dart <-- Imports package:path/path.dart (?)

import 'package:path/path.dart' as p;

// hello_world.dart
void main(List<String> args) {
  print('Hello World');
  print('Your arguments are: $args');
  print('Your CWD is ${p.current}');
  print('Goodbye!');
}

We can run dar build to bundle a package + an entrypoint:
dar build \
  --entrypoint hello_world/bin/hello_world.dart
  --output hello_world.dar

> Archiving package:hello_world as a standalone executable...
> SDK: Dart version 1.20.0-alpha
> Resolving dependencies...
> Building Dart VM snapshot of hello_world/bin/hello_world.dart...
> Wrote hello_world.dar (18619 bytes)

Example use (on BASH compatible OS):
$ ./hello_world.dar --test

> Hello World.
> Your arguemnts are: ['--test']
> Your CWD is: /usr/foo/bar/examples
> Goodbye!

Cross platform support
For (non-bash) windows support, it would be nice to support --output-exe:
dar.exe build \
  --entrypoint hello_world/bin/hello_world.dart
  --output-exe hello_world.exe

hello_world.exe --test

> Hello World.
> Your arguemnts are: ['--test']
> Your CWD is: C:\some_dir\examples
> Goodbye!

Future optimizations and ideas
"Native" compilation
Like used in Flutter, perhaps we could pre-JIT a snapshot for a platform:
dar build \
  --entrypoint hello_world/bin/hello_world.dart
  --output hello_world.dar
  --experimental-pre-compile

In the future future if we support pure dart2native AOT, this could start emitting native code.
Without bundling the VM
For platforms where the Dart VM already exists (certain OSs, but also on a managed VM, etc), we could omit bundling the VM/SDK, and just bundle the Dart files. That would make the "executable" significantly smaller for these systems if we can trust the version.
Tree-shaking and optimizations
Once the Kernel is complete and we have extra cycles - revive dart2dart?
NodeJS support
Similar to work done by @srawlins and @kevmoo - being able to bundle as a NodeJS executable means we could run natively on google cloud functions and other platforms that take NodeJS. This would require use of the dart dev compiler today, maybe dart2js in the future.
Potential stakeholders

@jakemac53 - Can we support a .sar like output for Bazel using this scheme?
@nex3 for a new high-profile tool (see internal discussion)
@srawlins for deployment of dart binaries to cloud VM
@yjbanov for flutter tools (?)

/cc @anders-sandholm @a-siva @floitschG @kevmoo

Would that be a .dar file per platform or would it contain the executable for every supported platform?

We're already doing tree-shaking and a few optimizations as IR-to-IR transformations. I don't see the need for dart2dart in this setup, but maybe I'm missing something.

I'm very excited about this general idea. It would make deploying Dart applications to non-Dart users extremely attractive.

We can run dar build to bundle a package + an entrypoint:
dar build \
  --entrypoint hello_world/bin/hello_world.dart
  --package hello_world
  --output hello_world.dar

> Archiving package:hello_world as a standalone executable...
> SDK: Dart version 1.20.0-alpha
> Resolving dependencies...
> Building Dart VM snapshot of hello_world/bin/hello_world.dart...
> Wrote hello_world.dar (18619 bytes)

What does the --package flag do here?

Cross platform support
For (non-bash) windows support, it would be nice to support --output-exe:
dar.exe build \
  --entrypoint hello_world/bin/hello_world.dart
  --package hello_world
  --output-exe hello_world.exe

hello_world.exe --test

> Hello World.
> Your arguemnts are: ['--test']
> Your CWD is: C:\some_dir\examples
> Goodbye!

Ideally, I'd like to control both the target OS and the target architecture, even if that means downloading a new Dart binary. I'd expect to be able to generate executables for the same targets that Dart itself is distributed for: Linux, Windows, and OS X both ia32 and x64.

Without bundling the VM
For platforms where the Dart VM already exists (certain OSs, but also on a managed VM, etc), we could omit bundling the VM/SDK, and just bundle the Dart files. That would make the "executable" significantly smaller for these systems if we can trust the version.

Isn't this just a snapshot like we have today?

NodeJS support
Similar to work done by @srawlins and @kevmoo - being able to bundle as a NodeJS executable means we could run natively on google cloud functions and other platforms that take NodeJS. This would require use of the dart dev compiler today, maybe dart2js in the future.

If you just mean a JavaScript entrypoint that can be run using node out.js, this is pretty easy to do today with a small amount of scaffolding even on dart2js.

@zoechi:

Would that be a .dar file per platform or would it contain the executable for every supported platform?

I would prefer a .dar file per platform. On windows you might just want to call it an exe.
@kasperl:

We're already doing tree-shaking and a few optimizations as IR-to-IR transformations. I don't see the need for dart2dart in this setup, but maybe I'm missing something.

I realize that the IR/Kernel means dart2dart might not make any sense. My question is that if I have in my bin/hello_world.dart script:
void main() {
  print('Hello World');
}

void intentionallyUnusedFunction() {
  print('Will somebody use me?');
}

And I create a VM snapshot, will intentionallyUnusedFunction remain?
@nex3:

What does the --package flag do here?

I realize you could just assume the package based on bin/path.dart, so I've updated my proposal above to remove this flag.

... Isn't this just a snapshot like we have today?

It is, but the difference here is I'd like it to a simple single file you run, i.e.
$ wget https://some.site/http_server.dar
$ chmod +x http_server.dar
$ ./http_server.dart --port 8080

> Running server at <IP_ADDRESS>:8080...

(There is no abstraction leak that this is even a Dart binary, in this case)

If you just mean a JavaScript entrypoint that can be run using node out.js, this is pretty easy to do today with a small amount of scaffolding even on dart2js.

I imagine it's not a lot of work, but it's the bundling and making it easy/first-class that I'm interested in here. i.e., deploy your package to Google cloud function with a simple script with little or no manual work. (Plus it's important to use DDC because it maps dart:io to NodeJs correctly)

It is, but the difference here is I'd like it to a simple single file you run, i.e.
$ wget https://some.site/http_server.dar
$ chmod +x http_server.dar
$ ./http_server.dart --port 8080

> Running server at <IP_ADDRESS>:8080...

(There is no abstraction leak that this is even a Dart binary, in this case)

So the difference between this and a snapshot is that this looks up the Dart VM on the path? How do you handle version skew between the snapshot and the VM? Historically, each VM version only supports its own snapshot version.

I imagine it's not a lot of work, but it's the bundling and making it easy/first-class that I'm interested in here. i.e., deploy your package to Google cloud function with a simple script with little or no manual work. (Plus it's important to use DDC because it maps dart:io to NodeJs correctly)

I didn't realize DDC had a dart:io wrapper built in. @jmesserly, how/where is that defined? Could we generalize it enough to make it work with dart2js as well? Since DDC is generally dev-mode-focused rather than performance-focused, it seems like dart2js is a better place to focus our efforts to make deployable Node apps.

@nex3:

How do you handle version skew between the snapshot and the VM? Historically, each VM version only supports its own snapshot version.

Good point. Depends how clever we want it to be then, I guess you could deploy as a .dar that does require the Dart SDK, and builds a snapshot on demand (a sort of JIT). Ideally most users would deploy standalone with an SDK included, though.

Could we generalize it enough to make it work with dart2js as well?

I think the Node support was an experimental 20% by @ochafik - not sure though.

It looks like it is defined here: https://github.com/dart-lang/sdk/blob/master/pkg/dev_compiler/tool/input_sdk/patch/io_patch.dart -- looks like just stubs though.

Oh, I see—that's about the same level of support as dart2js.

Cool, then yes dart2js might be a fine target.

We're already doing tree-shaking and a few optimizations as IR-to-IR transformations. I don't see
the need for dart2dart in this setup, but maybe I'm missing something.

I realize that the IR/Kernel means dart2dart might not make any sense. My question is that if I have
in my bin/hello_world.dart script:
...
And I create a VM snapshot, will intentionallyUnusedFunction remain?

@matanlurey: There's a separate IR-to-IR transformation that you can apply before you generate a snapshot: https://github.com/dart-lang/kernel/blob/master/lib/transformations/treeshaker.dart. After running the separate tree shaker on the IR input, the output IR will not contain intentionallyUnusedFunction, so we will never see it when we generate the snapshot.

@kasperl Nice! OK, then sounds at least part of this FR already exists 😅
Does the rest of this sound reasonable?

What's the status of this FR? Is it included into dart?

No I don't believe so, hence why it isn't closed.

+1 and kudos for a self-contained approach, that would make dart deployment much easier.

Doesn't dartaotruntime and dart2aot solve this problem almost completely now? Or is it still difficult to kind of "merge" dartaotruntime plus the main.dart.aot generated by dart2aot into just one main.exe? Generating single binaries like Go would be a killer!

Yes, I'm going to close the current issue. Initial support for native execution landed some months back and is documented here: https://dart.dev/tutorials/server/get-started#8-compile-for-production
Support for single executable is tracked in https://github.com/dart-lang/sdk/issues/36915


📜 Add v6.0.0 contracts documentation version

📜 Documentation update
🎉 A new version of axone-protocol/contracts is available.
This PR add this new v6.0.0 version into the documentation.

Summary by CodeRabbit

New Features

Introduced a sidebar configuration for dynamic generation based on directory content, improving navigation in documentation or user interfaces.
Added a new version entry (v6.0.0) to the version history, allowing better tracking of updates.

Documentation Updates

Updated hyperlinks in the Smart Contracts documentation to reflect current naming conventions, ensuring users access the correct resources.
Modified the dropdown navigation items to direct users to the updated documentation version.

@amimart @ccamel Same here, fix broken link with new contract name


Added CONTRIBUTING guidelines

So here it is... ;-)

Looks good! :+1:

:+1:

:+1:

Can we merge this soon? The number of unjustified issues/PRs grows with every day...

Merged in 20756e3539d6e382ba555b9cdd3777f70df12789 on branch 2.3.x.


Add remaining datasets to /data route

We need info on beetles + daymet datasets added to the table explaining data access on /data
Also need to zero in on the link for ALFRESCO source data, there.

Closed in #581


add stylelint-config-css-modules support

this is to add support for https://www.npmjs.com/package/stylelint-config-css-modules

Merged as 42d9683846b0a96d27fa27f72189dd58b31173b8.


Security Analysis - System Information Leak

Umbrella issue for Code quality improvements related to System Information Leak

Fixed or No longer relevant.


chore(main): release 2.7.1

:robot: I have created a release beep boop
2.7.1 (2024-01-01)
Bug Fixes

drive image src, text fix, rem github footer link (0d9b54f)
drive image src, text fix, rem github footer link (#80) (2b52cd2)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/Hessuew/flamethefreeze/releases/tag/v2.7.1 :sunflower:


Modify class processing logic to handle multiple PageLayers

Refer #42 for further details.

@IanMayo, can we take it that all the tables which are bounded by PageLayer div in country page (like Narnia1.html) are going to be just that of Classes?

No. There is just one table of classes. If there is more than one PageLayer we (I) need to come up with a new way of determining which contains the classes table.

Got it.

Overtaken by events


How to use html files as markup?

Hit there
I'm probably missing something, I can not get the "Markup: file.html" syntax to work, it always displays the text instead of the html from the file.
// Tabs
//
// markup: tabs.html
//
// Styleguide 2.1

The spec says:

Instead of using inline HTML markup, you could point at a separate file that contains your HTML. kss-node supports either a plain *.html file or a Handlebars *.hbs file. The kss-node generator will search for the markup file in any of the --source folders.

Does that mean that I should place the .html file where my sass files are? And then change gulp.src?
Because when I do that the server fails to start.
This is how my generate task currently looks like (coffeescript):
  gulp.src(['./app/styles/**/*.scss', '!./app/styles/helper/*.scss'])
      .pipe(plugins.styleguide.generate(
          title: 'localsearch.ch Styleguide'
          server: true
          port: 3002
          styleVariables: './app/styles/settings/variables.scss'
          rootPath: 'styleguide'
          overviewPath: 'README.md'))
      .pipe gulp.dest('styleguide')

If anyone could shed some light into this I would appreciate it. I'll also gladly write the docs for this as soon as I know how it's supposed to work.
Many thanks.

I am currently having exactly the same problem

Same here! If I add html as a source it says Syntax "html" is not supported yet, sorry

Hi. Inserting html file is not a part of KSS parser, so it did not appear in the SC5 styleguide when we updated it to KSS 2.0. But I implemented this feature as well https://github.com/SC5/sc5-styleguide/pull/721 You need to wait for the PR to be merged and released.
I also created a "refactoring" issue which would let us avoid such situations. https://github.com/SC5/sc5-styleguide/issues/722


Missing issue template

To make it easier for other developers to contribute to the library, it could be beneficial to create an issue template. It could, for example, be based on the structure in #2 (Problem, Advantages, Tasks, Further Development).

I've added default bug reports and features requests, is that enough or do you think another type of issue is needed?

Seems like a great start! Closing the issue.


Security vulnerabilities found in metabase version 2.2.0 images

What
https://artifacthub.io/packages/helm/pmint93/metabase?modal=security-report
Thanks!

@DustyShap  Actually it's vulnerabilities of metabase/metabase:v0.44.3 image, you should fire an issue in there https://github.com/metabase/metabase/issues
This is just a helm chart with YAML templates to deploy that image to kubernetes


S3 User defined metadata key is case-sensitive

Type: Bug
Component:
"S3"
Describe the bug
User defined metadata key is case-sensitive.
Below document say user-defined metadata key is stored in lower-case.

https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingMetadata.html#object-metadata
User-defined metadata is a set of key-value pairs. Amazon S3 stores user-defined metadata keys in lowercase.

Sample
s3Template.upload(
        "bucket",
        "key",
        new ByteArrayInputStream(new byte[] { 0 }),
        ObjectMetadata.builder()
            .metadata("myMetadata", "foo")
            .build());

// ...

S3Client s3Client;

Map<String, String> metadata =
        s3Client.getObject(GetObjectRequest.builder().bucket("bucket").key("key").build())
            .response()
            .metadata();

metadata.get("myMetadata");// null
metadata.get("mymetadata");// "foo"

Can we have metadata as some case-insensitive Map ?
metadata = new TreeMap<String, String>(String.CASE_INSENSITIVE_ORDER);

Regarding first piece of code:
s3Template.upload(
        "bucket",
        "key",
        new ByteArrayInputStream(new byte[] { 0 }),
        ObjectMetadata.builder()
            .metadata("myMetadata", "foo")
            .metadata("mymetadata", "boo")
            .build());

we could change ObjectMetadata class to store in such case only mymetadata property with boo value.
Regarding getting object with S3Client - perhaps it's a good candidate for an issue in AWS SDK itself?

@maciejwalkowiak
Right, it may aws sdk's issue and need to report as aws-java-sdk issue.
Apart from that, it would be nice that we can access user-defined-metadata from S3Resource.

@sis-yoshiday would you like to contribute a PR?

Closing as this is an SDK issue rather than Spring Cloud AWS


Add snippets

Adding snippets for three additional pages of the Firebase Admin Auth guides

/home/travis/build/firebase/snippets-node/auth/email_action_links.js
  40:7  error  Parsing error: Identifier 'email' has already been declared
/home/travis/build/firebase/snippets-node/auth/custom_claims.js
   8:34  error  'uid' is not defined      no-undef
  17:28  error  'idToken' is not defined  no-undef

FYI if you want to run the tests locally rather than having Travis get mad at you, all you need to do is:
Do this once:

Put a service-account.json at the root of the repo
Run npm run lerna-bootstrap

Do this every time

npm run lint && npm run test


Caught exception in Main process: TypeError: Cannot read property 'indices' of undefined

Here is the command and error
node exporter.js --sourceUseSSL true --sourceAuth admin:ZOO --targetAuth admin:JP0k6 --sourceHost essourceclusterdns --targetUseSSL true --targetHost estargetclusterdns -i .sec-data-9 -j .sec-data-9 -T true -U true -V true -p 443 -q 443
TypeError: Cannot read property 'indices' of undefined
at IncomingMessage. (/home/xxxx/opt/elasticsearch-exporter/node_modules/elasticsearch-exporter/drivers/es.js:215:44)
at emitNone (events.js:85:20)
at IncomingMessage.emit (events.js:179:7)
at endReadableNT (_stream_readable.js:906:12)
at nextTickCallbackWith2Args (node.js:475:9)
at process._tickCallback (node.js:389:17)

Yes, a little late, but I've moved on to other projects. Unfortunately, I can't point you to any other repo that forked and continued the work here, so you'll have to look for another solution, although I believe AI will soon make all of these little tools obsolete.
Most functionality was broken when ES moved to v6, and I don't even know what version we're on today, so it's no surprise it's broken. If there's huge demand I may come back to this as I was working on a more generic implementation with drivers for different DBs, a web GUI, and other little improvements. For now, consider this project abandoned 😢. One person can only do so much.


Binary in iree/base cannot depend on iree::testing::benchmark_main when crosscompiling

In https://github.com/google/iree/pull/4364 I'm trying to build a benchmark binary under iree/base/. This works fine in the normal compilation configuration, but fails when cross compiling to android during the host configuration step.
To Reproduce
Steps to reproduce the behavior:
If you believe this is an issue with IREE core (not integrations) please provide a reproduction (including artifacts) that does not require integrations (Instructions for extracting artifacts from TF tests)

Checkout https://github.com/gmngeoffrey/iree/commit/53395229aae5b51818b3405ff361f95daba3bdb2
Configure for android build:

cmake -B ~/build/iree/android -G Ninja \
  -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake \
  -DANDROID_ABI="$ANDROID_ABI" \
  -DANDROID_PLATFORM=android-29 \
  -DIREE_BUILD_COMPILER=OFF \
  -DIREE_BUILD_TESTS=ON \
  -DIREE_BUILD_SAMPLES=OFF \
  -DIREE_HOST_C_COMPILER=$(which clang) \
  -DIREE_HOST_CXX_COMPILER=$(which clang++)

Build the iree_configure_HOST target

cmake --build ~/build/iree/android/ --target iree_configure_HOST

See error

CMake Error at build_tools/cmake/iree_cc_binary.cmake:89 (add_executable):
Target "iree_base_synchronization_benchmark" links to target
"iree::testing::benchmark_main" but the target was not found.  Perhaps a
find_package() call is missing for an IMPORTED target, or an ALIAS target
is missing?
Call Stack (most recent call first):
iree/base/CMakeLists.txt:409 (iree_cc_binary)

With -DCMAKE_VERBOSE_MAKEFILE=ON, I was able to get the command being issued by the configure custom command:
/usr/bin/cmake /usr/local/google/home/gcmn/src/iree -G Ninja -DCMAKE_MAKE_PROGRAM="/usr/bin/ninja" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_C_COMPILER="/usr/bin/clang" -DCMAKE_CXX_COMPILER="/usr/bin/clang++" -DIREE_ENABLE_RUNTIME_TRACING=OFF -DIREE_ENABLE_MLIR=OFF -DIREE_ENABLE_EMITC=OFF -DIREE_BUILD_COMPILER=ON -DIREE_BUILD_TESTS=OFF -DIREE_BUILD_DOCS=OFF -DIREE_BUILD_SAMPLES=OFF -DIREE_BUILD_DEBUGGER=OFF -DIREE_BUILD_PYTHON_BINDINGS=OFF -DIREE_BUILD_JAVA_BINDINGS=OFF -DIREE_BUILD_EXPERIMENTAL_MODEL_BUILDER=OFF -DIREE_BUILD_EXPERIMENTAL_REMOTING=OFF -DIREE_BUILD_TENSORFLOW_COMPILER=OFF -DIREE_HAL_DRIVERS_TO_BUILD="DyLib;VMLA;Vulkan" -DIREE_TARGET_BACKENDS_TO_BUILD="DYLIB-LLVM-AOT;Metal-SPIRV;Vulkan-SPIRV;VMLA" -DIREE_ENABLE_ASAN=OFF -DIREE_ENABLE_MSAN=OFF -DIREE_ENABLE_TSAN=OFF -DIREE_ENABLE_CCACHE=OFF -DLLVM_CCACHE_BUILD=OFF -DCMAKE_VERBOSE_MAKEFILE=ON

So I think the issue is probably that BUILD_TESTS is off. Not sure why this doesn't cause issues for a binary located in vm though. It makes sense that the host build wouldn't enable the VM, but would enable base. I'm guessing that's the issue. The whole cross-compiling setup feels very fragile here though...

With -DCMAKE_VERBOSE_MAKEFILE=ON, I was able to get the command being issued by the configure custom command:
/usr/bin/cmake /usr/local/google/home/gcmn/src/iree -G Ninja -DCMAKE_MAKE_PROGRAM="/usr/bin/ninja" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_C_COMPILER="/usr/bin/clang" -DCMAKE_CXX_COMPILER="/usr/bin/clang++" -DIREE_ENABLE_RUNTIME_TRACING=OFF -DIREE_ENABLE_MLIR=OFF -DIREE_ENABLE_EMITC=OFF -DIREE_BUILD_COMPILER=ON -DIREE_BUILD_TESTS=OFF -DIREE_BUILD_DOCS=OFF -DIREE_BUILD_SAMPLES=OFF -DIREE_BUILD_DEBUGGER=OFF -DIREE_BUILD_PYTHON_BINDINGS=OFF -DIREE_BUILD_JAVA_BINDINGS=OFF -DIREE_BUILD_EXPERIMENTAL_MODEL_BUILDER=OFF -DIREE_BUILD_EXPERIMENTAL_REMOTING=OFF -DIREE_BUILD_TENSORFLOW_COMPILER=OFF -DIREE_HAL_DRIVERS_TO_BUILD="DyLib;VMLA;Vulkan" -DIREE_TARGET_BACKENDS_TO_BUILD="DYLIB-LLVM-AOT;Metal-SPIRV;Vulkan-SPIRV;VMLA" -DIREE_ENABLE_ASAN=OFF -DIREE_ENABLE_MSAN=OFF -DIREE_ENABLE_TSAN=OFF -DIREE_ENABLE_CCACHE=OFF -DLLVM_CCACHE_BUILD=OFF -DCMAKE_VERBOSE_MAKEFILE=ON

So I think the issue is probably that BUILD_TESTS is off. Not sure why this doesn't cause issues for a binary located in vm though. It makes sense that the host build wouldn't enable the VM, but would enable base. I'm guessing that's the issue. The whole cross-compiling setup feels very fragile here though...

Sure enough, marking the binary as TESTONLY fixes the problem.

Sure enough, marking the binary as TESTONLY fixes the problem.

FTR, the reason I hit this was because of missing Bazel -> CMake support, so I missed adding TESTONLY.

FTR, the reason I hit this was because of missing Bazel -> CMake support, so I missed adding TESTONLY.


Update Opendatacam.js

adding another feature on another branch on the same part of the code, so not merging this as the code as changed and the comments typo fix will conflict..
thanks for fixing the typos in the comments..


Print a message if a newer version is available

👋 Thank you for this awesome project 🔥
I found this feature in the GitHub CLI application and npm.
I think it'll be useful for users who install coreutils using cargo.
And this will let them know that a new version is available and it's time to update.
Ready-made crates to implement that:

https://github.com/mgrachev/update-informer
https://github.com/tarikeshaq/update-notifier

Hi! Thanks for the report! It's a very interesting idea, but I don't think we can do this for several reasons.

The first is that we have to be very careful about what output is printed because it might be parsed by other scripts. Consider for example the troubles that would arise if somebody uses sort to sort some lines in a file and suddenly a message shows up saying "you should update uutils" in that file. We could print it to stderr, but that's also not ideal. At the very least, the stderr of a complex script would be polluted with these messages.
The second reason is that we aim to make these utils as small as possible and this feature would require a lot of code to make an http request to crates.io
It would also make the utils slower, because a request has to be made for every call, which again might not be a big deal with interactive use, but does add up in scripts.
We have also just removed an HTTP(S) related dependency from uudoc (ureq, used by the first crate you mentioned) to ensure that uutils builds on more platforms, so we probably cannot provide this feature on all platforms.
Lastly, uutils might be installed in a way that makes an immediate update impossible. For example, it might be packaged by some distribution. The user would then be presented with this message every time, without being able to do something about it.

So, what can we do? We could make an optional (opt-in) check-version command in the multi-call binary. Although I don't think that provides much value over a quick cargo install check. We could also document how to set up a cron job to check the version periodically. Neither option would be automatic though.
If you can think of way of implementing this without these issue, I'd be interested to hear it though!

The first is that we have to be very careful about what output is printed because it might be parsed by other scripts. Consider for example the troubles that would arise if somebody uses sort to sort some lines in a file and suddenly a message shows up saying "you should update uutils" in that file. We could print it to stderr, but that's also not ideal. At the very least, the stderr of a complex script would be polluted with these messages.

As an option, we can add an additional flag --check-updates (or a command check-updates) and start checking updates only if there is this flag. I think it could help in this situation.

It would also make the utils slower, because a request has to be made for every call, which again might not be a big deal with interactive use, but does add up in scripts.

All of crates I mentioned in the issue can configure check frequency and have cache support to avoid a large number of requests. They can check updates once a day for example.

Lastly, uutils might be installed in a way that makes an immediate update impossible. For example, it might be packaged by some distribution. The user would then be presented with this message every time, without being able to do something about it.

An additional flag --check-updates might help in this situation. Another option - use a feature flag to disable check updates in such distributions (enabled by default).

So, what can we do? We could make an optional (opt-in) check-version command in the multi-call binary.

I like this idea 👍

It's been a long time since this was proposed and I think we should close this issue. I think that uutils coreutils should be installed primarily via package managers and that this feature would therefore not be necessary. It would also increase the maintenance burden, the size of the binary and compile times. I appreciate the idea, but ultimately I'm not convinced.


Cannot build a conda package on Python 3.8

I'm reporting this error here, although it might well be an error due to my lack of knowledge about the pyviz-dev tooling, or belong to another repository (e.g. pyctdev).
In the process of releasing nbsmoke I tried to the conda package with Python 3.8, i.e. by setting PYTHON_VERSION to "3.8" and PKG_TEST_PYTHON to "--test-python=py38" in .github/workflows/build.yaml. It failed with the following error:
Leaving build/test directories:
  Work:
 /usr/share/miniconda3/envs/test/conda-bld/work
  Test:
 /usr/share/miniconda3/envs/test/conda-bld/test_tmp
Leaving build/test environments:
  Test:
source activate  /usr/share/miniconda3/envs/test/conda-bld/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p
  Build:
source activate  /usr/share/miniconda3/envs/test/conda-bld/_build_env

Traceback (most recent call last):
  File "/usr/share/miniconda3/envs/test/bin/conda-build", line 11, in <module>
    sys.exit(main())
  File "/usr/share/miniconda3/envs/test/lib/python3.8/site-packages/conda_build/cli/main_build.py", line 481, in main
    execute(sys.argv[1:])
  File "/usr/share/miniconda3/envs/test/lib/python3.8/site-packages/conda_build/cli/main_build.py", line 451, in execute
    action(recipe, config)
  File "/usr/share/miniconda3/envs/test/lib/python3.8/site-packages/conda_build/cli/main_build.py", line 402, in test_action
    return api.test(recipe, move_broken=False, config=config)
  File "/usr/share/miniconda3/envs/test/lib/python3.8/site-packages/conda_build/api.py", line 221, in test
    test_result = test(recipedir_or_package_or_metadata, config=config, move_broken=move_broken,
  File "/usr/share/miniconda3/envs/test/lib/python3.8/site-packages/conda_build/build.py", line 2862, in test
    actions = environ.get_install_actions(metadata.config.test_prefix,
  File "/usr/share/miniconda3/envs/test/lib/python3.8/site-packages/conda_build/environ.py", line 801, in get_install_actions
    actions = install_actions(prefix, index, specs, force=True)
  File "/usr/share/miniconda3/envs/test/lib/python3.8/site-packages/conda/common/io.py", line 88, in decorated
    return f(*args, **kwds)
  File "/usr/share/miniconda3/envs/test/lib/python3.8/site-packages/conda/plan.py", line 466, in install_actions
    specs = tuple(MatchSpec(spec) for spec in specs)
  File "/usr/share/miniconda3/envs/test/lib/python3.8/site-packages/conda/plan.py", line 466, in <genexpr>
    specs = tuple(MatchSpec(spec) for spec in specs)
  File "/usr/share/miniconda3/envs/test/lib/python3.8/site-packages/conda/models/match_spec.py", line 48, in __call__
    parsed = _parse_spec_str(spec_arg)
  File "/usr/share/miniconda3/envs/test/lib/python3.8/site-packages/conda/models/match_spec.py", line 708, in _parse_spec_str
    if build is None and test_str[-1] != '*':
IndexError: string index out of range
TaskFailed - taskid:package_build
Command failed: 'conda build -c pyviz -c bokeh conda.recipe/ -t --append-file conda.recipe//recipe_append--py38-unit-default-pkg.yaml && conda build purge' returned 1

What happens there is that a yaml spec is generated by pyctdev with a requirement set to python = (without any version), which is malformed according to conda's spec and results in that error. That specific requirement (python =) is obtained by pyctdev here:
https://github.com/pyviz-dev/pyctdev/blob/d11c91aaa81c6034bdc42ce547823248acc05efb/pyctdev/util.py#L30
I haven't been able to find why this failed on Python 3.8 and not on Python 3.7 (I didn't spend too much time looking into that, being too happy that it finally worked!).
This issue can be closed in some months/years if the transition to building conda packages on 3.8 goes better than it did for me!

Closing in favor of https://github.com/pyviz-dev/pyctdev/issues/95 that reports the issue appearing in pyctdev.


Allow status code to be configured in shorthand CircuitBreaker filter

Problem Statement
The current Spring Cloud CircuitBreaker filter allows only fallbackUri to forward to if there is any failure with the original requested route. It would be useful to route towards specific fallbackUri based on specific status codes.
Requested Feature
When using the shorthand configuration of a CircuitBreaker filter, statusCode should be allowed as an argument:
spring:
  cloud:
    gateway:
      routes:
      - id: circuitbreaker_route
        uri: lb://backing-service:8088
        predicates:
        - Path=/consumingServiceEndpoint
        filters:
        - name: CircuitBreaker
          args:
            name: notFoundCircuitBreaker
            fallbackUri: forward:/inCaseOfNotFoundUseThis
            statusCode: 404
        - name: CircuitBreaker
          args:
            name: timeoutCircuitBreaker
            fallbackUri: forward:/inCaseOfTimeoutUseThis
            statusCode: 504

since fallbackUri and statusCodes are optional, it doesn't seem like we can use the shortcut.


Upgrade Checkstyle 10.12.6 -> 10.12.7

This PR contains the following updates:

Package
Type
Update
Change

Checkstyle (source)
build
patch
10.12.6 -> 10.12.7

[ ] If you want to rebase/retry this PR, check this box

The Java Platform team wishes you a happy festive period. Here is the suggested commit message:
Upgrade Checkstyle 10.12.6 -> 10.12.7

See:
- https://checkstyle.sourceforge.io/releasenotes.html
- https://github.com/checkstyle/checkstyle/releases/tag/checkstyle-10.12.7
- https://github.com/checkstyle/checkstyle/compare/checkstyle-10.12.6...checkstyle-10.12.7

Renovate be like

Header generated and modified from Sweaterify.

The Java Platform team wishes you a happy festive period. Here is the suggested commit message:
Upgrade Checkstyle 10.12.6 -> 10.12.7

See:
- https://checkstyle.sourceforge.io/releasenotes.html
- https://github.com/checkstyle/checkstyle/releases/tag/checkstyle-10.12.7
- https://github.com/checkstyle/checkstyle/compare/checkstyle-10.12.6...checkstyle-10.12.7

Renovate be like

Header generated and modified from Sweaterify.


add motion physics

You might want to check out http://facebook.github.io/rebound, which the animation library that powers chat heads in Messenger.

current progress is on branch motion_physics

@willbailey this is now implemented (https://github.com/premnirmal/Magnet/pull/20)


fix: redux error on switching menu "non-serializable value was detected"

Calling the function 'showTransferMenu' from clicking on the 'Account.js' + 'SelectToken.js' > backButton was accidentally passing the click-event.
This PR fixes that. Now it's clear that all calls to the function 'showTransferMenu' don't pass the browser event.

This change is

:tada: This PR is included in version 0.1.0-dev.1 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:

:tada: This PR is included in version 1.0.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


bug: API docs refer to nonexistent thermocycler.status property

See https://github.com/Opentrons/opentrons/pull/8444#discussion_r720397697.

This was excised at least as of https://github.com/Opentrons/opentrons/pull/13183.


[feature]: Add more social channels to README and Registration Form

Is there an existing feature request for this?

[x] I have searched the existing issues

Summary
Since this website is particularly for student programs, it should contain the all social channels of Keploy where the engagement can happen and the registration link to the program.
Why should this be worked on?
Adds more navigation and community support.

@nehagup what should I write next to the links....
like - Get connected on linkedin??

@mukul314 this issue is stale now.


Use github.com/klauspost/compress for gzip and zlib

Metrics from a test instance:

name                                 old time/op    new time/op    delta
TargetScraper_Gzip/metrics=1-8         65.4µs ± 5%    65.5µs ± 5%     ~     (p=0.871 n=50+50)
TargetScraper_Gzip/metrics=100-8        199µs ± 1%     193µs ± 2%   -3.23%  (p=0.000 n=42+42)
TargetScraper_Gzip/metrics=1000-8       891µs ±11%     876µs ±13%   -1.76%  (p=0.031 n=47+48)
TargetScraper_Gzip/metrics=10000-8     6.17ms ± 4%    6.02ms ± 2%   -2.51%  (p=0.000 n=46+39)
TargetScraper_Gzip/metrics=100000-8    61.5ms ± 3%    61.4ms ± 3%     ~     (p=0.470 n=47+49)

name                                 old alloc/op   new alloc/op   delta
TargetScraper_Gzip/metrics=1-8         6.61kB ± 0%    6.61kB ± 0%     ~     (p=0.917 n=50+50)
TargetScraper_Gzip/metrics=100-8       80.1kB ± 4%    79.8kB ± 4%     ~     (p=0.327 n=50+49)
TargetScraper_Gzip/metrics=1000-8       584kB ± 2%     584kB ± 2%     ~     (p=0.576 n=50+50)
TargetScraper_Gzip/metrics=10000-8     4.48MB ± 2%    4.48MB ± 1%     ~     (p=0.964 n=50+50)
TargetScraper_Gzip/metrics=100000-8    68.1MB ± 0%    68.1MB ± 0%   -0.04%  (p=0.019 n=50+49)

name                                 old allocs/op  new allocs/op  delta
TargetScraper_Gzip/metrics=1-8           75.0 ± 0%      75.0 ± 0%     ~     (all equal)
TargetScraper_Gzip/metrics=100-8         94.0 ± 0%      90.0 ± 0%   -4.26%  (p=0.000 n=50+50)
TargetScraper_Gzip/metrics=1000-8         112 ± 0%       107 ± 0%   -4.46%  (p=0.000 n=50+50)
TargetScraper_Gzip/metrics=10000-8        214 ± 1%       195 ± 1%   -8.68%  (p=0.000 n=46+49)
TargetScraper_Gzip/metrics=100000-8     1.41k ± 0%     0.96k ± 1%  -31.64%  (p=0.000 n=47+50)

What are the tradeoffs made by the library? Did they submit their changes upstream?

I'm not aware of any trade-offs but I do recall seeing something that main benefits are for amd64 arch.
I know that some changes were merged upstream but that was a while ago, I've raised https://github.com/klauspost/compress/issues/616 to clarify.

See https://github.com/klauspost/compress/discussions/617 for the answer.

Metrics from a test instance:

Can you explain (or point out where I missed the explanation) what these pictures show?
Assume I know nothing about your environment, your dashboards, what you changed, when you changed it, etc.

I had a 2.36.0 running on a biggish Prometheus server scraping ~21M time series.
Then I deployed a 2.36.0 + this patch there. Time of deployment is that gap on both graphs.
As you can see on cpu graph the amount of CPU prometheus uses there dropped from 31 cpu cores to 30 cpu cores.
Memory usage doesn't show much of a difference, so the main gain is that cpu usage drop.
Does that help?

Thanks, that helps a bit.
I am puzzled why your charts don't show a repeating pattern every 2 hours, which is the standard head compaction interval.

We run prometheus with 30m min/max tsdb block range so we can run GC more often.
This was a testing instance and I think it also had #10709 applied.

Also puzzled if your entire Prometheus benefitted by 3.3%, why did your benchmark focused solely on this one improvement show a smaller benefit?

name                                 old time/op    new time/op    delta
TargetScraper_Gzip/metrics=1-8         65.4µs ± 5%    65.5µs ± 5%     ~     (p=0.871 n=50+50)
TargetScraper_Gzip/metrics=100-8        199µs ± 1%     193µs ± 2%   -3.23%  (p=0.000 n=42+42)
TargetScraper_Gzip/metrics=1000-8       891µs ±11%     876µs ±13%   -1.76%  (p=0.031 n=47+48)
TargetScraper_Gzip/metrics=10000-8     6.17ms ± 4%    6.02ms ± 2%   -2.51%  (p=0.000 n=46+39)
TargetScraper_Gzip/metrics=100000-8    61.5ms ± 3%    61.4ms ± 3%     ~     (p=0.470 n=47+49)

It shows 3.23% for a response with 100 metrics. As usual with benchmarking how you run a test influences the outcome, that's why I deployed it to a test instance to see real world results.

I would like to propose a change to your benchmark, to do compression just once outside of the benchmark loop.
This way, the benchmark is more focused on decompression and gives a clearer signal:
name                                old time/op    new time/op    delta
TargetScraperGzip/metrics=1-8         32.5µs ± 4%    31.8µs ± 4%   -2.43%  (p=0.023 n=10+10)
TargetScraperGzip/metrics=100-8       50.0µs ± 2%    45.9µs ± 0%   -8.14%  (p=0.000 n=10+9)
TargetScraperGzip/metrics=1000-8       191µs ± 3%     165µs ± 2%  -13.70%  (p=0.000 n=10+10)
TargetScraperGzip/metrics=10000-8     1.68ms ± 1%    1.37ms ± 1%  -18.72%  (p=0.000 n=9+9)
TargetScraperGzip/metrics=100000-8    16.0ms ± 0%    13.4ms ± 1%  -16.32%  (p=0.000 n=9+8)

name                                old alloc/op   new alloc/op   delta
TargetScraperGzip/metrics=1-8         6.01kB ± 0%    6.03kB ± 0%   +0.30%  (p=0.000 n=9+10)
TargetScraperGzip/metrics=100-8       7.02kB ± 0%    6.86kB ± 0%   -2.25%  (p=0.000 n=10+10)
TargetScraperGzip/metrics=1000-8      8.97kB ± 0%    8.28kB ± 0%   -7.75%  (p=0.000 n=10+10)
TargetScraperGzip/metrics=10000-8     16.8kB ± 0%    15.1kB ± 1%  -10.20%  (p=0.000 n=9+9)
TargetScraperGzip/metrics=100000-8     920kB ± 0%     779kB ± 2%  -15.34%  (p=0.000 n=7+10)

name                                old allocs/op  new allocs/op  delta
TargetScraperGzip/metrics=1-8           71.0 ± 0%      72.0 ± 0%   +1.41%  (p=0.000 n=10+10)
TargetScraperGzip/metrics=100-8         81.0 ± 0%      76.0 ± 0%   -6.17%  (p=0.000 n=10+10)
TargetScraperGzip/metrics=1000-8        92.0 ± 0%      83.0 ± 0%   -9.78%  (p=0.000 n=10+10)
TargetScraperGzip/metrics=10000-8       93.0 ± 0%      91.0 ± 0%   -2.15%  (p=0.000 n=10+10)
TargetScraperGzip/metrics=100000-8       110 ± 0%       135 ± 0%  +22.73%  (p=0.000 n=10+10)

(that last +22% object allocations is from decompression initialization; it is not material overall)
func BenchmarkTargetScraperGzip(b *testing.B) {
	scenarios := []struct {
		metricsCount int
		body         []byte
	}{
		{metricsCount: 1},
		{metricsCount: 100},
		{metricsCount: 1000},
		{metricsCount: 10000},
		{metricsCount: 100000},
	}

	for i := 0; i < len(scenarios); i++ {
		var buf bytes.Buffer
		var name string
		gw := gzip.NewWriter(&buf)
		for j := 0; j < scenarios[i].metricsCount; j++ {
			name = fmt.Sprintf("go_memstats_alloc_bytes_total_%d", j)
			fmt.Fprintf(gw, "# HELP %s Total number of bytes allocated, even if freed.\n", name)
			fmt.Fprintf(gw, "# TYPE %s counter\n", name)
			fmt.Fprintf(gw, "%s %d\n", name, i*j)
		}
		gw.Close()
		scenarios[i].body = buf.Bytes()
	}

	handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		w.Header().Set("Content-Type", `text/plain; version=0.0.4`)
		w.Header().Set("Content-Encoding", "gzip")
		for _, scenario := range scenarios {
			if strconv.Itoa(scenario.metricsCount) == r.URL.Query()["count"][0] {
				w.Write(scenario.body)
				return
			}
		}
		w.WriteHeader(http.StatusBadRequest)
	})

	server := httptest.NewServer(handler)
	defer server.Close()

	serverURL, err := url.Parse(server.URL)
	if err != nil {
		panic(err)
	}

	client, err := config_util.NewClientFromConfig(config_util.DefaultHTTPClientConfig, "test_job")
	if err != nil {
		panic(err)
	}

	for _, scenario := range scenarios {
		b.Run(fmt.Sprintf("metrics=%d", scenario.metricsCount), func(b *testing.B) {
			ts := &targetScraper{
				Target: &Target{
					labels: labels.FromStrings(
						model.SchemeLabel, serverURL.Scheme,
						model.AddressLabel, serverURL.Host,
					),
					params: url.Values{"count": []string{strconv.Itoa(scenario.metricsCount)}},
				},
				client:  client,
				timeout: time.Second,
			}
			b.ResetTimer()
			var buf bytes.Buffer
			for i := 0; i < b.N; i++ {
				buf.Reset()
				_, err = ts.scrape(context.Background(), &buf)
				require.NoError(b, err)
			}
		})
	}
}

Good call, updated, thanks

Given you changed BenchmarkGzip, you should probably state the difference before/after in this PR.
The changes to discovery/xds/kuma_mads.pb.go (annotated DO NOT EDIT) and tsdb/fileutil/flock_js.go do not seem relevant to compression, and I didn't see any explanation in the description or commit message why they are necessary.

Given you changed BenchmarkGzip, you should probably state the difference before/after in this PR.
The changes to discovery/xds/kuma_mads.pb.go (annotated DO NOT EDIT) and tsdb/fileutil/flock_js.go do not seem relevant to compression, and I didn't see any explanation in the description or commit message why they are necessary.

Given you changed BenchmarkGzip, you should probably state the difference before/after in this PR.
The changes to discovery/xds/kuma_mads.pb.go (annotated DO NOT EDIT) and tsdb/fileutil/flock_js.go do not seem relevant to compression, and I didn't see any explanation in the description or commit message why they are necessary.

That was in a commit where I run gofumpt.
Rebased, updated commit message and added a lint check to ensure new code is also using this lib.

Rebased on top of 2.39.0

cc @bboreham can we proceed here?

We have looked at this during our bug scrub. @prymitive are you willing to rebase this? Additionally, given that this library caused a regression in the 2.45 release, we will run prombench on the rebased version before merging it.

Rebased on top of current main branch

/prombench main
Le jeu. 27 juil. 2023, 11:13, Łukasz Mierzwa @.***> a
écrit :

Rebased on top of current main branch
—
Reply to this email directly, view it on GitHub
https://github.com/prometheus/prometheus/pull/10782#issuecomment-1653217458,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AACHHJRYRWKO6SRRF3NXNKLXSIWLFANCNFSM5XM63DAA
.
You are receiving this because you commented.Message ID:
@.***>

This is increasing CPU usage.

The loadgen process is running more queries in a given time, because they are succeeding faster.
So the increased CPU is not a regression.

/prombench cancel

Note I attempted to fix the way Prombench indicates increased CPU usage if your Prometheus runs faster at https://github.com/prometheus/test-infra/pull/618

/prombench main

Prombench shows this is worse on CPU, memory and latency.  Queries are executing at the same rate (IOW this is not the same problem as last time).  I guess it's possible another rebase will improve things.

(During Prometheus bug scrub meeting)
Looks like this PR was superseded by https://github.com/prometheus/prometheus/pull/13330/
Closing this one.

Looks like this PR was superseded by #13330 Closing this one.

That PR is for using github.com/klauspost/compress is different places so I don’t think ot supersedes this one.

I'll rebase this one, unless someone objects soon.

Sorry, I was on a leave.
Rebased this branch on top of latest main.

/prombench main

Showing a little bit lower latency on query-range; memory and CPU much the same.
I think we're good to go.

/prombench cancel


Contain the versionlock subclass to help with ordering around package resources

Fixes #43

I think this causes dependency cycles when using versionlock in more than one profile where the role orders those profiles.
eg.
class profile::foo {
  yum::versionlock { '0:bash-4.1.2-9.el6_2.*':}
}

class profile::bar {
  yum::versionlock { '2:vim-enhanced-7.4.629-6.el7.x86_64':}
}

include profile::foo
include profile::bar

Class['profile::foo'] -> Class['profile::bar']

fails with
Error: Found 1 dependency cycle:
(Augeas[yum.conf_plugins] => Yum::Config[plugins] => Yum::Plugin[versionlock] => Class[Yum::Plugin::Versionlock] => Yum::Versionlock[0:bash-4.1.2-9.el6_2.*] => Class[Profile::Foo] => Class[Profile::Bar] => Yum::Versionlock[2:vim-enhanced-7.4.629-6.el7.x86_64] => Class[Yum::Plugin::Versionlock] => Yum::Plugin[versionlock] => Package[yum-plugin-versionlock] => Yum::Plugin[versionlock])\nTry the '--graph' option and opening the resulting '.dot' file in OmniGraffle or GraphViz
Error: Failed to apply catalog: One or more resource dependency cycles detected in graph


[BUG] - DDB-to-Opensearch Readme missing a parameter

The module modules/integration/ddb-to-opensearch is missing a parameter in the README - the PRIVATE_SUBNET_IDS (aka private-subnet-ids) is a required parameter but is not denoted.
Please add this parameter definition to the README of the module

This has been fixed internally. I will be bringing this change soon!


update login page

Related Issue
[Cite any related issue(s) this pull request addresses. If none, simply state "None”]
Description
[Please include a brief description of the changes or features added]
Type of PR

[ ] Bug fix
[x] Feature enhancement
[ ] Documentation update
[ ] Other (specify): _______________

Screenshots / videos (if applicable)
[Attach any relevant screenshots or videos demonstrating the changes]
Checklist:

[x] I have performed a self-review of my code
[x] I have read and followed the Contribution Guidelines.
[x] I have tested the changes thoroughly before submitting this pull request.
[ ] I have provided relevant issue numbers, screenshots, and videos after making the changes.
[x] I have commented my code, particularly in hard-to-understand areas.

Additional context:
[Include any additional information or context that might be helpful for reviewers.]

which types of changes is done by plz describe.
There have a conflict issue plz check it once

login and signup page


how can i get city name and cordinates of each tweet?

@afzal646, do you see a location info near tweets in a browser?

yes like i this lib using .setnear this tells tweets within given location but how they tell us that these tweets are from this certain portion
can you tell whats the logic behind setnear(i know it gives tweets from given location but how they extract these tweets whats the logic behind?)
i want to print out city name or coordinates of each tweet?

@Mottl do you think it's possible to get city names or state in a specific column?


Missing case studies

Currently the GoRemote and Gemini case study are missing. WIP obviously but leaving this here to serve as a to-do.

They should have been there but could just be a typo or page not being made.

Has been fixed


[5.2] --queue= required on queue:listen

Our listener quit working when updating to 5.2, and now requires specifying the --queue=name option to run any jobs.
php artisan queue:listen

This command does nothing but used to run all queues. However if we change to
php artisan queue:listen --queue=name_of_queue

Now runs jobs but only for this one queue, and we have multiple queues so this is pretty annoying. I don't see anything in the docs about requiring the name of a queue always, and its certainly not in artisan help queue:listen as being requried.

This is happening to me too.  Please help!

This command does nothing but used to run all queues.

That's not true. It never did. It's always just run jobs from the "default" queue.

That's not true. It never did. It's always just run jobs from the "default" queue.

We have always used OnQueue($queue_name) and never has $queue_name == 'default', but have never had to use the --queue argument before?

Also note, that there is no default value in the help text as with the other options, so I wouldn't expect it to default to a specific queue if the option is not provided.

Our listener quit working when updating to 5.2, and now requires specifying the --queue=name option to run any jobs.

I can't replicate this.

Can you show me why this doesn't work please?

Sure, let me figure out how to recreate what we saw before (not even sure what version we were on).
OTOH if you say it never did this, maybe we had a bug before that managed to put everything in the default queue, and we never noticed?
PS. My apologies for being short in my replies, it took quite a while to figure out to add the flag, and I was just annoyed. Didn't meant to take it out on your here...

My apologies for being short in my replies

Don't worry about it. I'm not easily offended, and tbh, I prefer short replies. Makes reading them easier. ;)

Ok, I've reverted to when this was "working" and you are correct, we had a bug that called OnQueue with an empty string. I believe this caused it to end up in the default queue and hence it was working without the --queue argument. Closing as not an issue, but I have a question now - Is there a way to have it listen on all queues, without having to specify the list of all available queues? IE something like --queue=* instead of --queue=backups,reminders,etc..

Is there a way to have it listen on all queues, without having to specify the list of all available queues?

Sorry, but no such feature exists atm.

Ok, thank you for all the quick responses!


use temp image file in cacheDir to allow picking from remote resources

imagePicker caused flutter app to crash when picking image from a remote source.
Using a temp file to store the inputStream obtained from the content provider solve the problem.
It actually use a temp file in the cachedDir named cachedImage.jpg.

I signed it!

I signed it!

Da: googlebot<EMAIL_ADDRESS>Inviato: lunedì 30 aprile 2018 18:50
A: flutter/plugins
Cc: gbaccetta; Author
Oggetto: Re: [flutter/plugins] use temp image file in cacheDir to allow picking from remote resources (#513)
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login herehttps://cla.developers.google.com/ to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again. If the bot doesn't comment, it means it doesn't think anything has changed.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/flutter/plugins/pull/513#issuecomment-385458705, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ANXrKigEKAWGStsDCnYugJ4sUqdLie1mks5tt0DigaJpZM4Tsj7s.

The commit appears to have been made using a different author name or email than that used for CLA signing. You probably have to amend your commit.

@mravn-google @gbaccetta This PR breaks two tests (found in example/android/app/src/test).
There's no CI integration for running these tests just yet; @goderbauer requested me to modify the Travis script in this comment in #461. I haven't had time to look into it, and honestly have no idea how to do / test it.
(The tests can be run from the command line by running cd packages/image_picker/example/android && ./gradlew testDebugUnitTest.)

@roughike Travis ran the image_picker java tests on this PR and they're still passing. Is that unexpected?

@goderbauer Java tests should now pass.
The Java tests failed when there was only the first commit, c808da73cfd, on this PR. The later commit, 036ccdf1f04,  fixed the failing tests, making all test cases pass again. Just confirmed this locally to be extra sure.
So everything is working as expected!

@gbaccetta Does this by any chance also fix https://github.com/flutter/flutter/issues/17165?

@goderbauer yes it fix also that problem, that's why I looked for this solution. For the formating problem I could not change my Android studio indentention from 4 to 2 characters... sorry about that

ok, I should have fixed the formatting in last commit

@gbaccetta You can format all Dart, Java and Objective C files by running pub global run flutter_plugin_tools format in the plugins directory.
See here: https://github.com/flutter/plugins/blob/master/CONTRIBUTING.md

Check still failed even after correcting the format. Could not understand why this time. I'm sorry this is the first time I 'm trying to contribute to Google Open Source.
@roughike  that command for me fails with this from the plugin directory:
Error: Cannot find a "packages" sub-directory
pub finished with exit code 1

and with this from the root directory:
Error: No pubspec.yaml file found.
This command should be run from the root of your Flutter project.

I actually could not solve the problem coming from autotesting. I sorta of did not try again. I can check tomorrow if I can fix it and try to submit a new commit. I'll keep you updated by tomorrow
On Wed, May 30, 2018, 12:24 AM Ian Hickson <notifications<EMAIL_ADDRESS>wrote:
@gbaccettahttps://github.com/gbaccetta What is the status of this PR?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/flutter/plugins/pull/513#issuecomment-392967131, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ANXrKmKOhzvhmdnZ91uV2Cru5EpAm2dZks5t3cqGgaJpZM4Tsj7s.

@gbaccetta I made an attempt at fixing the formatting errors on your behalf.

@gbaccetta It appears your branch needs a rebase to master to pick up changes needed to make unit
tests run successfully.

Finally starting from scratch ( new branch from actual master + force push to clean all the mess)  seems to have worked. Anyway formatting is really hard to achieve since pub global run flutter_plugin_tools format does not seem to work on my pc.

@gbaccetta Do you want to work on the last review comment, or would you prefer us taking it from here?

@mravn-google you can take over. However, as I see it, in case of exception the code return null and not the filePath. Unless I missinterpreted something:
try {       inputStream = context.getContentResolver().openInputStream(uri);       File file = File.createTempFile("cachedImage", "jpg", context.getCacheDir());       outputStream = new FileOutputStream(file);       if (inputStream != null) {         byte[] buffer = new byte[4 * 1024];         int read;         while ((read = inputStream.read(buffer)) != -1) {           outputStream.write(buffer, 0, read);         }         outputStream.flush();         **return file.getPath()**;       }     } catch (FileNotFoundException ignored) {     } catch (IOException ignored) {     } finally {       try {         if (inputStream != null) inputStream.close();       } catch (IOException ignored) {       }       try {         if (outputStream != null) outputStream.close();       } catch (IOException ignored) {       }     }     **return null**;

@gbaccetta Thanks, I'll make a small tweak in a separate PR and then publish.

Somebody please find a fix to the problem which is making the app crash if we choose an image using image_picker from google photos but works totally fine if the image is picked from the local gallery. I am in dire need for the solution.

@SkullEnemyX I believe this PR is exactly that fix.

I am unable to understand what to do exactly as the method is not clear (PS: I am a beginner in app development and flutter)

That's fine!
As far as I understand, a fix for your crash with Google Photos was just merged in this pull request. Is the problem still surfacing with version 0.4.5 of this plugin?

@gbaccetta @goderbauer @roughike @mravn-google This issue is completely not fixed, it still does exist, Guess is happening in Oreo and above(Pie). App just crashes when uploading images and it never displays the image too.
Please what might be causing it?
FYI am using version 0.4.10 of the image Picker


Clone.,js looking for styles.css file in wrong path

Hi Team,
I am using this with an electron app (react) to render a label.
The render works perfectly when I use it in dev environment but when I build the project I get the following in the console when attempting to render the image.

The code I use to render the image is as follows:
import styles from './styles.css'
...

export default class ConfirmationDialog extends Component{
 saveCode = (mat) => {
    return new Promise((resolve, reject) => {
        html2canvas(this.stickerDiv).then(function(canvas) {
            resolve(canvas);
        });
    })
    .then(data=> {
        ipcRenderer.send('download-file',{
            url: data.toDataURL(),
            name:`${mat.material.Mat12NC.replace(/\./g,"_")}-return-sticker.png`
        })
    })
}
 render(){
   return (

 this.stickerDiv = div}>

            ...

   )
 }
}

I think that when I build the project the styles.css are not being added to the dist/styles.css as the warning above shows - has anyone any experience in this and has any solution?

html2canvas version tested with<EMAIL_ADDRESS>Browser & version: Chromium
Operating system: Windows 7/10

Hey - this must be something with my webpack config because by changing all the DOM nodes to be styled components the styles are now there in the production build when rendering.
Maybe this will help someone facing similar issue but not if you import css into your component and the html2canvas relies on it


⚠ Bofrost.fr has degraded performance

In c7be129, Bofrost.fr (https://www.bofrost.fr) experienced degraded performance:

HTTP code: 200
Response time: 1192 ms

Resolved: Bofrost.fr performance has improved in 0fb4502 after 30 minutes.


Thanks

reported to GH, IDK if its a good idea to nuke the MR before support can look at it

NIGGA

STFU

@Dream-Master YOUR GAY FRIEND ALKALUS IS CLOWN

@dries007 sure want to let you know about it

Blocked. Should not be able to comment / interact anymore.


allOf rendering

allOf should run an _.defaults to render an actual value
https://github.com/fleekjs/fleek-seed/blob/master/config/swagger.json#L198

should do some research to see if theres a module hat already does this


thisis not about the nuke bot but it is still extremly important

so i am in a raiding group and got banned from discord. is there a way to make a discord alt account
it is very hard because you need sms verification now
also online phone number wont work

Why are you asking us?


Windows support

I get an exception trying to run this on windows because of the path separators:
java.lang.RuntimeException: java.lang.IllegalArgumentException: separators must be '/'; path is C:\Program Files\JetBrains\IntelliJ IDEA 2019.2\jbr\bin\driver_vendor
at com.intellij.ide.util.DirectoryUtil.mkdirs(DirectoryUtil.java:31)
at com.ifengxue.plugin.JpaSupport$DownloadDriverRunnable.lambda$run$1(JpaSupport.java:429)

This occurred downloading the driver for PostgreSQL 42.2.5 after clicking download driver in the modal window.

You shuold upgrade the version to latest.


Inquiry About the Release Status of Extended RLBench Simulation Platform

Dear authors, thank you for your outstanding work on the PerAct^2 project.
I noticed the availability of the demonstration dataset, but I am unsure whether the extended RLBench simulation platform you used in your research has also been released. I would like to inquire if the platform is currently available, or if there are any plans for its release in the near future.

Hi,
Thank you for your interested in our work. Yes, I also released the modifications. The link is hidden in the installation instructions. The RLBench fork with the modifications is here: https://github.com/markusgrotz/RLBench
Let me know if this works for you!

Thank you for the link! I’ll try it out and let you know if I have any questions.
Best regards！


Convert ValidationExceptions into Errors with ValidationError

Errors utility converts Java's Throwables into spine.base.Errors.
If a given Throwable was caused by a constraint violation, the resulting Error should reflect that.

@armiol, PTAL.


fix: minimist security vuln

:tada: This PR is included in version 1.19.2 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


[BD-46] docs: improve documentation for components

Improve documentation for Alert, AlertModal, ActionRow, Avatar, AvatarButton components
JIRA: PAR-578

Thanks for the pull request, @viktorrusakov! I've created BLENDED-1016 to keep track of it in Jira.   More details are on the BD-46 project page.
When this pull request is ready, tag your edX technical lead.

:tada: This PR is included in version 16.20.2 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


DevOps + SharePoint at the same time

I'm submitting a...

[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[x] Other... Please describe: Question

Library version

Library version: 1.2.0-beta.1

Current behavior
Using two scopes at the same time for login:
SharePointhttps://mytentant.sharepoint.com/Sites.Read.All and DevOps 499b84ac-1321-427f-aa17-267ca6975798/.default.
I'm not sure if that's the correct scope for DevOps, but I tried several things from random posts online, and this was the only one that worked.
When I pass these two scopes, like this:
await msal.loginPopup({ scopes: [
  'https://mytenant.sharepoint.com/AllSites.FullControl',
  '499b84ac-1321-427f-aa17-267ca6975798/.default']
});

at the same time I get the error

AADSTS70011: The provided request must include a 'scope' input parameter. The provided value for the input parameter 'scope' is not valid. The scope https://mytenant.sharepoint.com/AllSites.FullControl 499b84ac-1321-427f-aa17-267ca6975798/.default openid profile is not valid. .default scope can't be combined with resource-specific scopes.

Like this:

I can read the text and understand I'm mixing up resource and  .default, but I haven't found any documentation for how to do this against DevOps online.
My current working solutions:

Do login twice, once for each scope.
Bad part: User actually have to click two times on login button.
Don't include scopes in login popup.
This actually works, but I'm not sure about the implications, what can go wrong - perhaps new users won't get prompt and silent acquire of token will always fail.

Expected behavior
Not having to log in twice.
Also, is this the proper way to connect to DevOps?

@eirikb So it is possible to do this without logging in twice. access token calls are JIT calls, hence can be made multiple times. Please call acquireTokenSilent (if you have a session already i.e., after logging in) twice with these scopes and see if you have two different tokens to access the corresponding resources.
@negoe  to reference more documentation on this.

I already use acquireTokenSilent to acquire the tokens, and I do these simultaneously with Promise.all - this works fine.  But in order to do this I must first log in, and then I need the two calls - or do as in my second solution to simply omit the scopes in login, but as I said I don't know the implications of this (works for me now, but app is already consented).

Omitting the scopes in login would mean that if you are not pre-consented to the scopes you need access to and need consent to one of these scopes, you will be prompted to interact (if you call acquireTokenSilent it fails with consent_required error) and you need to call acquireTokenPopup or acquireTokenRedirect to give the consent as you have correctly stated in the issue description.

@sameerag That could be an alternative solution then. A bit awkward flow perhaps.
Something like this:

First time without consent:

User clicks login
Login fails (catch error, start original flow)
User click login again (for SharePoint)
User click login again (for DevOps)

Every time after consent:

User clicks login

A couple of notes: I have an iframe in an iframe, which is why I must use acquireTokenPopup. Also note; I must get a user interaction (actual mouse click) before each opening of popup in order to not get popup blocked.

@eirikb Are you able to resolve an issue? Did you find any workaround?
I am also having difficulty while I need to get token for multiple services like SharePoint, MS Graph and DevOps with a single app.
No Proper documentation present with adal.js or msal.js

@eirikb I have created a demo for Multi-Tenant, Multi Resource authentication using adal.js and msal.js
Working Demo Using adal.js for Multi Resource Multi Authentication is live at https://anomepani.github.io
Working Demo Using msal.js for Multi Resource Multi Authentication is live at https://anomepani.github.io
Source Code at:  https://github.com/anomepani/Multi-Tenant-Authentication-using-adal-js
This might be helpful to you at some level.

@anomepani No I haven't found a good solution. I think there might not be any, so the issue can be closed.
But before we close it I would like to know three things:

Will it be possible to have several different scopes in login in the future?
Are there any other possible flows, such as catching missing consent on acquireTokenSilent and then conditionally forcing a new login for each error?
Is it possible to use admin consent (or similar) to ensure no user in a whole tenant/organization will ever have to consent?

@eirikb Sorry this went unanswered. You can include several different scopes in your login request. This will allow you to pre-consent to the scopes in question. Then in order to actually get your access tokens for these, you need to call acquireTokenSilent once for each resource you are trying to access. If acquireTokenSilent fails with an InteractionRequired Error you should catch this error and call acquireTokenRedirect or acquireTokenPopup. Hope this clears things up. Let us know if you still have questions about this.


Not loading NFTs in collection

this NFTs from poap minter are not loading: https://kodadot.xyz/ahk/gallery/287-1
Poap minter: https://poap.kodadot.art/argentina
Ahk
Event is today and we need this to work.

This needs to be solved asap.

Loads for me, I just had to go to media
https://image.w.kodadot.xyz/ipfs/bafybeifjqsh5xthmtjb5dkun3xxezgc3xj7g6tcl3k3nlx2aqs4egolr6a/media.mp4


dev-rokers: Add network services

Fix https://github.com/robotrokers/genivi-dev-platform/issues/5
Signed-off-by: Gianpaolo Macario<EMAIL_ADDRESS>

Excerpt from https://build.rokers.io/blue/organizations/jenkins/robotrokers%2Fgenivi-dev-platform/detail/PR-9/1/pipeline
ERROR: rokers-image-base-1.0-r0 do_rootfs: dhcp not found in the feeds (raspberrypi3 cortexa7t2hf-neon-vfpv4 cortexa7t2hf-neon cortexa7t2hf-vfp cortexa7hf-neon-vfpv4 cortexa7hf-neon cortexa7hf-vfp armv7vet2hf-neon-vfpv4 armv7vehf-neon-vfpv4 armv7vet2hf-neon armv7vehf-neon armv7vet2hf-vfp armv7vehf-vfp armv7at2hf-vfp armv7ahf-vfp armv6thf-vfp armv6hf-vfp armv5tehf-vfp armv5ehf-vfp armv5thf-vfp armv5hf-vfp noarch any all) in /var/jenkins_home/workspace/rs_genivi-dev-platform_PR-9-36W3EOEBNQW3C3NHVVX2BVMRTCK4WU7FZKFC6B42DZI3MMKCMZWQ/gdp-src-build/tmp/deploy/rpm.

Logged as<EMAIL_ADDRESS>log into the easy-jenkins master container:
cd ~/github/gmacario/easy-jenkins
docker-compose exec myjenkins /bin/bash

Logged as jenkins@container, inspect build logs
cd
cat workspace/rs_genivi-dev-platform_PR-9-36W3EOEBNQW3C3NHVVX2BVMRTCK4WU7FZKFC6B42DZI3MMKCMZWQ/gdp-src-build/tmp/work/raspberrypi3-poky-linux-gnueabi/rokers-image-base/1.0-r0/temp/log.do_rootfs.4343
ls -la workspace/rs_genivi-dev-platform_PR-9-36W3EOEBNQW3C3NHVVX2BVMRTCK4WU7FZKFC6B42DZI3MMKCMZWQ/gdp-src-build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/dhcp/4.3.4-r0/packages-split

It looks like package dhcp is empty, while dhcp-server should be the right one to include into the image.

Next step: Will test the new image on my RPi3.

Writing a 8GB microSD-card with rokers-image-base-raspberrypi3-20170706155039.rootfs.rpi-sdimg

[x] Successfully booted the image on a RPi3.
[x] Logged to the serial console as user root (default password: root)
[x] Inspected local filesystem to verify that package hostapd is installed

root@raspberrypi3:~# rpm -qil hostapd
Name        : hostapd                      Relocations: (not relocatable)
Version     : 2.5                               Vendor: (none)
Release     : r0                            Build Date: Thu Jul  6 15:19:06 2017
Install Date: Thu Jul  6 15:51:04 2017      Build Host: 16e7a3ddcbbf
Group       : kernel/userland               Source RPM: hostapd-2.5-r0.src.rpm
Size        : 793049                           License: GPLv2 | BSD
Signature   : DSA/SHA1, Thu Jul  6 15:19:06 2017, Key ID 9b1f4a2515f6bedc
Packager    : meta-ivi<EMAIL_ADDRESS>URL         : http://w1.fi/hostapd/
Summary     : User space daemon for extended IEEE 802.11 management
Architecture: cortexa7hf_neon_vfpv4
Description :
User space daemon for extended IEEE 802.11 management.
/etc
/etc/hostapd.conf
/lib
/lib/systemd
/lib/systemd/system
/lib/systemd/system/hostapd.service
/usr
/usr/sbin
/usr/sbin/hostapd
/usr/sbin/hostapd_cli
root@raspberrypi3:~#

[x] Inspected local filesystem to verify that package dhcp-server is installed

root@raspberrypi3:~# rpm -qil dhcp-server
Name        : dhcp-server                  Relocations: (not relocatable)
Version     : 4.3.4                             Vendor: (none)
Release     : r0                            Build Date: Thu Jul  6 15:19:06 2017
Install Date: Thu Jul  6 15:51:07 2017      Build Host: 16e7a3ddcbbf
Group       : console/network               Source RPM: dhcp-4.3.4-r0.src.rpm
Size        : 2325717                          License: ISC
Signature   : DSA/SHA1, Thu Jul  6 15:19:14 2017, Key ID ac703d5d3fc04d24
Packager    : meta-ivi<EMAIL_ADDRESS>URL         : http://www.isc.org/
Summary     : Internet Software Consortium DHCP package
Architecture: cortexa7hf_neon_vfpv4
Description :
DHCP (Dynamic Host Configuration Protocol) is a protocol which allows
individual devices on an IP network to get their own network configuration
information from a server.  DHCP helps make it easier to administer
devices.
/lib
/lib/systemd
/lib/systemd/system
/lib/systemd/system/dhcpd.service
/lib/systemd/system/dhcpd6.service
/usr
/usr/sbin
/usr/sbin/dhcpd
root@raspberrypi3:~#

Total number of installed RPM packages:
root@raspberrypi3:~# rpm -qa | wc -l
131
root@raspberrypi3:~#

Disk space usage on Root FS:
root@raspberrypi3:~# df -h /
Filesystem                Size      Used Available Use% Mounted on
/dev/root               197.4M    106.9M     80.2M  57% /
root@raspberrypi3:~#

See complete boot log at https://www.dropbox.com/s/ej3wz2a24g0aaw9/20170707-0956-dev-rokers-pull9.txt?dl=0

LGTM, merging PR

@ludusrusso Please review and merge if happy with it

Again, the build failure is due to low disk space on JENKINS_HOME
Excerpt from https://build.rokers.io/blue/organizations/jenkins/robotrokers%2Fgenivi-dev-platform/detail/PR-9/4/pipeline

WARNING: The free space of /var/jenkins_home/workspace/rs_genivi-dev-platform_PR-9-36W3EOEBNQW3C3NHVVX2BVMRTCK4WU7FZKFC6B42DZI3MMKCMZWQ/gdp-src-build/sstate-cache (/dev/xvdf1) is running low (0.531GB left)
ERROR: No new tasks can be executed since the disk space monitor action is "STOPTASKS"!
WARNING: The free space of /var/jenkins_home/workspace/rs_genivi-dev-platform_PR-9-36W3EOEBNQW3C3NHVVX2BVMRTCK4WU7FZKFC6B42DZI3MMKCMZWQ/gdp-src-build/downloads (/dev/xvdf1) is running low (0.531GB left)
ERROR: No new tasks can be executed since the disk space monitor action is "STOPTASKS"!
WARNING: The free space of /var/jenkins_home/workspace/rs_genivi-dev-platform_PR-9-36W3EOEBNQW3C3NHVVX2BVMRTCK4WU7FZKFC6B42DZI3MMKCMZWQ/gdp-src-build/tmp (/dev/xvdf1) is running low (0.531GB left)
ERROR: No new tasks can be executed since the disk space monitor action is "STOPTASKS"!
NOTE: Tasks Summary: Attempted 723 tasks of which 723 didn't need to be rerun and all succeeded.

Summary: There were 3 WARNING messages shown.
Summary: There were 3 ERROR messages shown, returning a non-zero exit code.
script returned exit code 1

Tracked as (blocker) issue https://github.com/robotrokers/robotrokers.github.io/issues/30

tested on @gmacario rasp!


Picture or Video or Web Page or only Text

It would be great to know that type of file attached there is to the tweet. That is, if in the tweet there is a photo or some video or some web page or nothing, it is only text.
Therefore, there are some new columns (photos / videos / web page) that have Boolean values to know that they are attached to the tweet.
Could this update be possible? I did not know how to do it, but it would be very useful.

When there's a picture or video attached to the Tweet, in the text there's a link to it. Most often something like pic.twitter.com/alsdjk

You're absolutely right. However, by this method there is no possibility to differentiate videos with images.
I do not know if there is another way of being able to indetify if it is video or picture. It may be a very difficult task. I get it. But I mention it in case there is such a possibility.
Anyway thank you very much.

I will consider adding this though, it's related to something else I've been wanting to add

Added in the dev branch, will move to master shortly


Using CNNs to estimate the gap / match scores

It maybe worthwhile to investigate using CNNs instead of RNNs to estimate the match / gap scores.
This would happen around this line
https://github.com/mortonjt/garfunkel/blob/master/deepblast/alignment.py#L43
CC @VGligorijevic feel free to create a PR to test this out.
The simulation tests can be run here : https://github.com/mortonjt/garfunkel/blob/master/ipynb/simulation-benchmark.ipynb
It maybe worth testing out with the beta-lactamase HMMs, since those are particularly gappy.

@VGligorijevic thanks for your contribution.  This is now the default in DeepBLAST.


Battery settings not preserved in restart after sudden shut down

If batcontrol suddenly stops without executing the del bc line (e.g. server kernel panic or power cut to server), the old battery config although saved as a file will get overwritten on the next execution, thus the original config is not preserved.
To keep it configured as is, currently one needs to manually reconfigure back to original in the inverters local webpage before batcontrol is restarted.

This came into my mind, too.
Thanks for writing that down.
Solution is likely

Delete old backups during recovery
If old backup is still available at startup, don't create a new config backup.

In the current docker setup, the two json files will be lost during container restart.


Documentation needs better formatting

The current docs (README and CONTRIBUTING) could use an overhaul to make them easier for newcomers to read. Also, Contribution_Guide.md should be named CONTRIBUTING.md for consistency.

@mdawsondev Anything that makes it easier for newcomers is welcome. Just let me know if you need clarification on anything etc.

Completed by @mdawsondev


[Feature request]: Improve postgrest select syntax

General Info

[X] I installed the latest version of Supabase Kt
[X] I checked for similar feature requests

Feature request
As initially proposed in #80, it would be easier to restrict what columns you want to receive, by just specifying the type you want it to be decoded with later on.
I have a few examples for how we could do this and also have some negative aspects on some of them.
Option 1
Make PostgrestBuilder#select generic and use the classes properties as column restriction.
On top of that, remove the requirement of specifying of a generic parameter in PostgrestResult#decode functions
@Serializable
data class Product(val id: Int, val content: String)
//posgres table may be: id, content, author, created_at

val products = client.postgrest.select<Product>().decodeList()

//the responding payload only insists out of id and content, every other column is ignored

Notes:

You are required to decode using the type you specified in the select method
-> No default values when serializing etc.
We have to fallback to the classes serial descriptor on Kotlin JS and Native in order to get to the class properties

Option 2
Make PostgrestBuilder#select generic and use the classes properties as column restriction.
Use custom type when decoding.
@Serializable
data class Product(val id: Int, val content: String)
//posgres table may be: id, content, author, created_at

val products = client.postgrest.select<Product>().decodeList<Product>()

//the responding payload only insists out of id and content, every other column is ignored

Forces you to specify the type twice
We have to fallback to the classes serial descriptor on Kotlin JS and Native in order to get to the class properties

Option 3
Replace the type of the columns parameter of PostgrestBuilder#select to something like Columns, which is a value class holding a string as its value.
You can create such class using it's companion object functions:
@Serializable
data class Product(val id: Int, val content: String)
//posgres table may be: id, content, author, created_at

val products = client.postgrest.select(Columns.ALL).decodeList<Product>()
//same as
val products = client.postgrest.select().decodeList<Product>() //ALL is default

val products = client.postgrest.select(Columns.list("id", "content")).decodeList<Product>()

val products = client.postgrest.select(Columns.type<Product>()).decodeList<Product>()
//for readability
val products = postgrest["products"].select(
    columns = Columns.type<Product>()
) {
     lt("id", 10)
}.decodeSingle<Product>()

val products = client.postgrest.select(Columns.raw("id,content")).decodeList<Product>()

Notes:

On the type method: we have to fallback to the classes serial descriptor on Kotlin JS and Native in order to get to the class properties
May look verbose (?) but gives you the freedom on which columns you want to receive and how you want to decode your payload

Feel free to comment on this syntax.
Usecase
See initial PR

@ferhatwi, any suggestions?


Chrome failed to start

When trying to run the image the following error is displayed:
docker run -it --rm -v ${PWD}:/robot moleszek/robotframework:latest -m robot test.robot
I think the image is using root to launch chrome. Is there a way to change this behaviour?
WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally.
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Stacktrace:
#0 0x563df9ccfa23
#1 0x563df979ae18
#2 0x563df97be1f1
#3 0x563df97b991a
#4 0x563df97f474a
#5 0x563df97ee883
#6 0x563df97c43fa
#7 0x563df97c54c5
#8 0x563df9cff16d
#9 0x563df9d155bb
#10 0x563df9d00e75
#11 0x563df9d15e85
#12 0x563df9cf486f
#13 0x563df9d30ae8
#14 0x563df9d30c68
#15 0x563df9d4baad
#16 0x7f0fc85d8ea7

Hi @estivalet
Thank you for creating this issue.
In this case, the root is not a problem to run chrome.
Inside the Keywords section you need to create a step that will run chrome in headless mode.
Chrome Headless
    ${chrome_options}=    Evaluate    sys.modules['selenium.webdriver'].ChromeOptions()    sys, selenium.webdriver
    Call Method    ${chrome_options}    add_argument    --disable-extensions
    Call Method    ${chrome_options}    add_argument    --headless
    Call Method    ${chrome_options}    add_argument    --disable-gpu
    Call Method    ${chrome_options}    add_argument    --no-sandbox
    Create Webdriver    Chrome    chrome_options=${chrome_options}

Then in Settings add Test Setup and run Chrome Headless.
See this example how it's should look like.
Please, let me know if this solution is good for you 😄

Hi @solairen thanks for the reply. Yes it works. But in this case I am not able to see the browser running the test. I am doing my personal docker image with VNC just for testing purporses and I don't know how I can run chrome with non-root user.

@estivalet
If you want to add a user to your docker image just add it to Dockerfile:
(...)
ARG user={USERNAME}
ARG home=/home/${user}
RUN addgroup docker
RUN adduser --disabled-password --gecos "" --home ${home} --ingroup docker ${user}

RUN chown ${user}:docker /usr/bin/google-chrome
RUN chown $[user}:docker /usr/bin/chromedriver

Then you will need to do this (depends on your os system): dockerGUI
Lastly, you will need to modify  this:
*** Keywords ***
Chrome Headless
    ${chrome_options}=    Evaluate    sys.modules['selenium.webdriver'].ChromeOptions()    sys, selenium.webdriver
    Call Method    ${chrome_options}    add_argument    --disable-extensions
    Call Method    ${chrome_options}    add_argument    --headless
    Call Method    ${chrome_options}    add_argument    --disable-gpu
    Call Method    ${chrome_options}    add_argument    --no-sandbox
    Create Webdriver    Chrome    chrome_options=${chrome_options}

to that:
*** Keywords ***
Chrome Headless
    ${chrome_options}=    Evaluate    sys.modules['selenium.webdriver'].ChromeOptions()    sys, selenium.webdriver
    Call Method    ${chrome_options}    add_argument    --disable-extensions
    Call Method    ${chrome_options}    add_argument    --no-sandbox
    Create Webdriver    Chrome    chrome_options=${chrome_options}

You will see the browser running as a non-root user inside your docker container.

@solairen Thanks for the help! I'll give a try.


[TextField]'s classes misses FormControl's ones

I've selected Support issue but really it's because it seems to me that it has to have been addressed before .. but well, I couldn't find it..
TextField have FormControl as root element, which is logical as it's a FormControl containing an label, input, helper, .. in an easier package. And it works great, but I don't get why there is only the root rule name on its classes prop.

Any other props supplied will be provided to the root element (FormControl).

Well, except the ones that are eaten by TextField itself and that do not handle FormCotnrol's version:
I'm talking about classes' props:

marginNormal
marginDense
fullWidth

This looks like something that someone would already have asked because it's kinda basic, but I couldn't find any topics speaking of this issue anywhere so ...

[x] I have searched the issues of this repository and believe that this is not a duplicate.

Summary 💡
How to access FormControl's classes.marginNormal, classes.marginDense and classes.fullWidth when using a TextField.

@misterbridge You can use the global class name, this should be enough.

Hi, thanks for your response, and that would work great.
But my point is there are props available and a little are simply missing, that's a flow and you propose a workaround.
I don't really understand why, in the code, classes is destructured from props and used in FormCotnrol's component as className={clsx(classes.root, className)} when it could just stay in the props rest ...other which is given to FormControl as {...other}.
Look at my PR, that would IMO be enough to fix it...

@misterbridge A clean solution would be to introduce a FormControlClasses prop.

That's actually what I was expecting when I read the FieldText doc, but now that I've looked at the code, if we let things as they are and add this FormControlClasses props we would have an "override" of the root classes from TextField's classes.root and TextField's FormControlClasses.root which appear not great to me.
And I also don't think that removing classes prop from TextField is either a good idea for multiple reasons such as breaking changes and mention of "Any other props supplied will be provided to the root element (FormControl)." which would become wrong.

If you get my point : Should I open a feature request issue or could you please reopen this one ?
If still don't then well, .. too bad for me :(

I've just read your comment about classes isolation (which I was not aware of, but makes sense). Then given my previous comment, I don't know how to fix it either than just duplicating the classes props from FromControl but .. yikes

@misterbridge What's your use case?

My use case is an override of the mui to match a client's design system made from a bootstrap base.
It's not really a great exemple and I've switched from it yesterday to only use the theme's override for classes and props (that last one, props, I've discovered today !) but that's at the cost of losing specificities that I don't really need (all the JS part of their design system).
But I don't think that my use case is really what matters here, I just saw a flow in the TextField component that I wanted for you guys to be aware of and try to fix it.
If you say it won't be fixed, then be it, but that's still a flow.

@misterbridge Thanks for sharing the use case. I would recommend a global theme or .css override for your use case. I don't think that we need to worry much about it;


bootstrap-datepicker onchange event firing in infinite loop upon page load

Summary
I'm using version 1.6.1 of bootstrap-datepicker. I have the following form field on a JSP page:
<input class="datepicker form-control" type="text" name="day" value="<%=day%>" size="10" onchange="return submit_form(this.form,'day');">

The intent is to allow a new date to be picked, and upon selection to trigger form submission using the 'onchange' event.
I have the following initialization block:
<script>
    $(document).ready(function(){
        $('.datepicker').datepicker({format: 'mm/dd/yyyy', autoclose: 'true', todayBtn: 'true', todayHighlight: 'true', orientation: 'auto top'});
    });
</script>

The issue I'm having is that upon page load, 'submit_form' is called, loading the page again and then 'submit_form' called again, so the page reloads in an infinite loop because it's being submitted in an infinite loop. This does not happen with version 1.4.0 of the library, so I'm inclined to think it's a bug in the new version.
Can anybody confirm that my use of the component is reasonable (correct) and if there is, in fact, a bug in the updated of bootstrap-datepicker?

Just browsing, but instead of the onchange attribute try using the changeDate event:
$(document).ready(function(){
	$('.datepicker').datepicker({
			format: 'mm/dd/yyyy',
			autoclose: 'true',
			todayBtn: 'true',
			todayHighlight: 'true',
			orientation: 'auto top'
		}).on('changeDate', function() {
			//
			// code to submit form here
			//
		});
});

@msct - your recommended solution works; however, it does mean writing more javascript code within the page whenever I want to auto-submit upon date change...before the most recent version all I needed was the 'onchange' approach and a "global" datepicker configuration.  Your solution allows me to upgrade this component, so thank you for pointing this out.

Thank You.. It worked..


Respond to Chris: SPIKE!  How is the URL path  parameter ‘application_id’ sanitized?

Describe the task
Investigate current URL parameter sanitization process and verify secure coding practices are being followed and respond to Chris to answer the questions below
Acceptance Criteria

[ ] the 5 questions listed under Additional context are unambiguoulsy answered

Additional context
Questions from Chris Prince:
Forgive my limited experience with python but I was updating the risks list and thinking about the input sanitization and secure coding items, I have questions –

How is the URL path  parameter ‘application_id’ sanitized?
Can a string format injection or ASCII escape code sequence be written to the LOGGER?

In the Model application_id is a BigInteger with maxvalue the application_id parameter is an int which I think is unbound.

Should the application_id parameter by the same python type in the model?
What happens if an invalid application_id parameter is passed to the database query?
will an exception/error text message from the database layer be sent to the caller, or will the exception/error be caught and a error message used that does not disclose any information about the implementation of the database be used?

**Part of this ticket is team understanding Chris' questions and answers

How is the URL path parameter ‘application_id’ sanitized?

We have two routers have ‘application_id’ parameter. We check the type of the application_id to be an integer.

Can a string format injection or ASCII escape code sequence be written to the LOGGER?

I'm not so sure about this. Wondering if @ianliuwk1019 has any idea?

In the Model application_id is a BigInteger with maxvalue, in the schema application_id parameter is an int which I think is unbound. Should the application_id parameter by the same python type in the model?

Wondering if we need to use BigInteger in the database for the application_id? Maybe we should keep the model and schema consistent.
From postgres:
The type integer is the common choice, as it offers the best balance between range, storage size, and performance. The smallint type is generally only used if disk space is at a premium. The bigint type should only be used if the range of the integer type is insufficient, because the latter is definitely faster.
The INT/INTEGER stores values between -2,147,483,648 to +2,147,483,647. The BIGINT data type stores the values between -9,223,372,036,854,775,808 to +9,223,372,036,854,775,807

What happens if an invalid application_id parameter is passed to the database query?

If I pass a string value as the application, I got an invalid type error.

will an exception/error text message from the database layer be sent to the caller, or will the exception/error be caught and a error message used that does not disclose any information about the implementation of the database be used?

I feel the it won't reach to the database layer cause it's block by the type check at the router level?

For (3.):
I think initially the model was generated from flyway and for some reason, maybe for the table sequence, probably it is standard (not sure, from DA point of view) to use bigint. I feel we don't necessary need to change this to be consistent but we just limit schema object(python) application_id to smaller (int) than the database limit (bitint).
However, surprisingly (I didn't know this chanage), when I checked again, Python2 has int limit, but Python3 dropped the int limit. So now the int limit for Python depends on the platform's sys.maxsize . We might need to check what that limit is.
Ref: https://note.nkmk.me/en/python-int-max-value/#:~:text=In Python 3%2C the int,which has no max limit.
Ref: https://docs.python.org/3/whatsnew/3.0.html#integers (at PEP238).

How is the URL path parameter ‘application_id’ sanitized?
We have two routers have the ‘application_id’ parameter, get_fam_application_roles and get_fam_application_user_role_assignment. We check the type of the application_id to be an integer. Later on once we set a limit of the application id, will also check the given application_id value is greater than 0 and less than the limit.

Can a string format injection or ASCII escape code sequence be written to the LOGGER?
We only accept number format. I didn't find a way that we can give a string value for the application_id in the frontend, because the two router methods which have application_id are called automatically by our application, there is no place for a user to give an input. If try to give a string value and call the api directly, no log will be generated, because the api call is blocked by the router level. FastAPI checks the type error.

In the Model application_id is a BigInteger with maxvalue, in the schema application_id parameter is an int which I think is unbound. Should the application_id parameter by the same python type in the model?
We feel it's fine to keep the current implementation, and we have another ticket to set limit the of the application_id #988.

What happens if an invalid application_id parameter is passed to the database query?
If pass a string value as the application_id, will get a type error at the router level, that blocks the api call, won't even run the database query.

will an exception/error text message from the database layer be sent to the caller, or will the exception/error be caught and a error message used that does not disclose any information about the implementation of the database be used?
For two router methods have application_id, we handle the following error cases:
- when application_id is invalid -> FastAPI returns type error
- when application_id not exists -> we capture it and return the error message "Application ID {application_id} not found"
- if the user makes the api call has no access to this application -> we capture it and return the error message "Operation requires role {required_role}"


Don't overload event kinds

Please don't put json in kind-1 events, instead propose new kinds to support your use case.

this extension does not use kind: 1 at all
it uses Parameterized Replaceable Events

kind 30017 & 30018
see example here: https://www.nostr.guru/e/0dc525844988d44e42cccdee41ae7442552019efd1b724856c6126dcd0dbada1


Add support for multi cluster ldap replication

https://github.com/GluuFederation/cloud-native-edition/commit/cb6950278a0450f3197ace464259d248122f0b0a
https://github.com/GluuFederation/docker-opendj/issues/22