Allow custom error types in contracts

With this, a contract developer can use any error type E: ToString + From<StdError>. Since all error libs typically implement ToString, you can easily use Snafu,, thiserror or others.

[x] adapt cosmwasm-std
[x] thiserror example
[ ] snafu example
[x] adapt cosmwasm-vm side and recompile test contract
[x] migrate query error from StdError to String
[ ] (cosmwasm-vm) migrate Querier::query_raw return type from FfiResult<SystemResult<StdResult<Binary>>> to FfiResult<SystemResult<ContractResult<Binary>>>
[ ] (cosmwasm-std) migrate QuerierResult return type from SystemResult<StdResult<Binary>> to SystemResult<ContractResult<Binary>>
[ ] Remove Serialize, Deserialize from StdError

Closes #527
Closes #528
Based on #532

The heart of this PR is now the new type
/// This is the final result type that is created and serialized in a contract for
/// every init/handle/migrate call. The VM then deserializes this type to distinguish
/// between successful and failed executions.
///
/// We use a custom type here instead of Rust's Result because we want to be able to
/// define the serialization, which is a public interface. Every language that compiles
/// to Wasm and runs in the ComsWasm VM needs to create the same JSON representation.
///
/// # Examples
///
/// Success:
///
/// ```
/// # use cosmwasm_std::{to_vec, ContractResult, HandleResponse};
/// let response: HandleResponse = HandleResponse::default();
/// let result: ContractResult<HandleResponse> = ContractResult::Ok(response);
/// assert_eq!(to_vec(&result).unwrap(), br#"{"ok":{"messages":[],"attributes":[],"data":null}}"#.to_vec());
/// ```
///
/// Failure:
///
/// ```
/// # use cosmwasm_std::{to_vec, ContractResult, HandleResponse};
/// let error_msg = String::from("Something went wrong");
/// let result: ContractResult<HandleResponse> = ContractResult::Error(error_msg);
/// assert_eq!(to_vec(&result).unwrap(), br#"{"error":"Something went wrong"}"#.to_vec());
/// ```
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ContractResult<S> {
    Ok(S),
    /// An error type that every custom error created by contract developers can be converted to.
    /// This could potientially have more structure, but String is the easiest.
    Error(String),
}

which clearly defined what goes over the contract VM boundary. It is used for all of init/handle/migrate/query. At this point, the error is a string. Inside the contract and in unit tests, you can use whatever error type you want.

/// assert_eq!(to_vec(&result).unwrap(), br#"{"ok":{"messages":[],"attributes":[],"data":null}}"#.to_vec());
This does change the serialization of errors (Currently uses "Ok" and "Err"). This is more standard, but very important to note that in the changelog, as this affects the go code as well as other wasm frameworks

This does change the serialization of errors (Currently uses "Ok" and "Err"). This is more standard, but very important to note that in the changelog, as this affects the go code as well as other wasm frameworks

Right, this is intentional. On the VM-contract boundary we should control the serialization and not depend on whatever serde chooses for Result. Will do the same for SystemResult. CHENGELOG entries for that will follow.


Performance test report

Please answer these questions before submitting your issue.

Why do you submit this issue?
[x] Question or discussion
[ ] Bug
[ ] Requirement
[ ] Feature or performance improvement

Question

What do you want to know?
Is there a performance test report?

Chinese version.

official, https://skyapmtest.github.io/Agent-Benchmarks/README_zh.html
3rd party
https://github.com/apache/skywalking/issues/1596#issuecomment-418946050
https://upload-images.jianshu.io/upload_images/14516896-c3c5b7633d0577f8.png?imageMogr2/auto-orient/strip|imageView2/2/w/1000/format/webp


ci(make): increase test timeout and reduce parallelism

What this PR does
Recently time taking running unit tests has become longer. In addition, some flaky tests are failed
on low-performance systems. This PR increases test timeout from 10m to 20m and reduces parallelism
by specifying "-p 1".

Current dependencies on/for this PR:

main

PR #409   👈

PR #410

This comment was auto-generated by Graphite.

Codecov Report
Patch coverage has no change and project coverage change: +0.08 :tada:

Comparison is base (3f3637d) 63.51% compared to head (6ccf9ec) 63.60%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #409      +/-   ##
==========================================
+ Coverage   63.51%   63.60%   +0.08%
==========================================
  Files         131      131
  Lines       17801    17801
==========================================
+ Hits        11306    11322      +16
+ Misses       5952     5937      -15
+ Partials      543      542       -1

see 7 files with indirect coverage changes
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


[Support Request]: Bookstack crashed on Container

Attempted Debugging

[X] I have read the debugging page

Searched GitHub Issues

[X] I have searched GitHub for the issue.

Describe the Scenario
Problem after Update from Bookstack 21.10.3 to 21.11
Exact BookStack Version
21.11
Log Content
wait-for-db: waiting for bookstack_db:3306
wait-for-db: done
Generating Key...
Symfony\Component\Debug\Exception\FatalErrorException  : Trait 'Illuminate\Database\Eloquent\Factories\HasFactory' not found
at /var/www/bookstack/app/Uploads/Image.php:20
16|  * @property int    $uploaded_to
17|  * @property int    $created_by
18|  * @property int    $updated_by
19|  */

20| class Image extends Model
21| {
22|     use HasFactory;
23|     use HasCreatorAndUpdater;
24|

Whoops\Exception\ErrorException  : Trait 'Illuminate\Database\Eloquent\Factories\HasFactory' not found
at /var/www/bookstack/app/Uploads/Image.php:20
16|  * @property int    $uploaded_to
17|  * @property int    $created_by
18|  * @property int    $updated_by
19|  */

20| class Image extends Model
21| {
22|     use HasFactory;
23|     use HasCreatorAndUpdater;
24|

Exception trace:
1   Whoops\Run::handleError("Trait 'Illuminate\Database\Eloquent\Factories\HasFactory' not found", "/var/www/bookstack/app/Uploads/Image.php")
/var/www/bookstack/vendor/filp/whoops/src/Whoops/Run.php:486
2   Whoops\Run::handleShutdown()
[internal]:0
wait-for-db: waiting for bookstack_db:3306
wait-for-db: done
Generating Key...
Symfony\Component\Debug\Exception\FatalErrorException  : Trait 'Illuminate\Database\Eloquent\Factories\HasFactory' not found
at /var/www/bookstack/app/Uploads/Image.php:20
16|  * @property int    $uploaded_to
17|  * @property int    $created_by
18|  * @property int    $updated_by
19|  */

20| class Image extends Model
21| {
22|     use HasFactory;
23|     use HasCreatorAndUpdater;
24|

Whoops\Exception\ErrorException  : Trait 'Illuminate\Database\Eloquent\Factories\HasFactory' not found
at /var/www/bookstack/app/Uploads/Image.php:20
16|  * @property int    $uploaded_to
17|  * @property int    $created_by
18|  * @property int    $updated_by
19|  */

20| class Image extends Model
21| {
22|     use HasFactory;
23|     use HasCreatorAndUpdater;
24|

Exception trace:
1   Whoops\Run::handleError("Trait 'Illuminate\Database\Eloquent\Factories\HasFactory' not found", "/var/www/bookstack/app/Uploads/Image.php")
/var/www/bookstack/vendor/filp/whoops/src/Whoops/Run.php:486
2   Whoops\Run::handleShutdown()
[internal]:0
PHP Version
7.4.21
Hosting Environment
Running on Docker Container

Hi @reddexx,
Can you provide any details on your container environment? As in what container you're using and how you're applying updates? Or do you have a complete docker-compose to reference or share?
Based on the shared information it doesn't seem like the PHP dependencies have been updated, via composer, in your environment.

i have a modified Image from:
https://github.com/solidnerd/docker-bookstack
this image is manual Updated from me (Downloading)
curl -SL -o bookstack.tar.gz https://github.com/BookStackApp/BookStack/archive/refs/tags/v(Versionnumber).tar.gz
solidnerd Image has Stable and not Removed Images Automatic

PHP Version Cant not updateding

System from Container is Debian10

PHP Version can't not updating

The PHP used in the solidernerd container is set to PHP7.4 which should be fine.
It's the project PHP dependencies that I'd guess are not installing correctly on your instance.
This might be related to an older composer verison being used here or it could be related to your other edits.
To be able to help any further I'd need to be able to see what you've changed. Without knowing what you're running I can only make guesses.

What do you need?

I have only extracted the New archive Version in the bookstack directory and saved the Image

How are you doing this? By accessing a shell instance within the container?
If so you'd also need to use composer to install the latest project PHP dependencies within the /var/www/bookstack path.
It'd probably be easier to alter the version of BookStack used in the Dockerfile then rebuild the image.

I downloaded and extracted the bookstack files, then set the write permissions in /var/www/bookstack, then set the owner, after which I created the image via portainer. That always worked except for the version. :(
I was only able to use the solidnerds container because the container from linuxserver.io emptied the storage because it has no idea why.

the container from linuxserver.io emptied the storage because it has no idea why.

I've never had this. Could occur if you weren't mounting the volume.

That always worked except for the version.

That might work if there have been no major change in our dependencies but you could end up with an unstable system. BookStack v21.11 had a lot more underlying changes to the framework and hence it incompatible with old dependencies.

The volume has mounted xD
I make a restart an the container and the container purge the complete storage path

I'm trying to adapt the Dockerfile to your requirements, so I need a little information about what bookstack needs

The rest of the Dockerfile is likely fine. As mentioned above, you probably need to just change the version on this line:
https://github.com/solidnerd/docker-bookstack/blob/fe6e51f430872b9aaffacfb84fda5c1dfca05126/Dockerfile#L2
Might needs to also change the version of composer to the latest on this line:
https://github.com/solidnerd/docker-bookstack/blob/fe6e51f430872b9aaffacfb84fda5c1dfca05126/Dockerfile#L54
but it might not be an issue.

Dockerfile is UptoDate

its Working with then Git
https://github.com/reddexx/docker-bookstack/blob/master/Dockerfile

Awesome! Will therefore close this off.


Auto-dection of GraalVM doesn't work

There should be a way to automatically detect which JS backend to use, when configured as such.
Currently that means either using GraalVM's Polyglot APIs, or reverting to "some other way" (running npx and stuff in this case).
There are significant performance gains by running GraalVM over the current fallback, so it is probably a good idea to know it's possible, when it is.

How to do this?

Despite this still being broken, one can currently force GraalVM's Polyglot API-based implementation use by setting ffc.polyglot-js config value to ENABLED, or DISABLED.
This can now be also done using a command line parameter with the -P "ffc.polyglot-js=ENABLED" flag (only in Markdown module for now). (see #36.)


Better ruleset delete handling

Should mark rulesets deleted if they have been used in runs, handle issues of creation with the same name (e.g. newer version), etc.

Seeing an error when linking to run of a deleted ruleset.

Should be fixed now

Deleted a ruleset then selected Details for a rrun of it. Edit Ruleset link not greyed out. Select the link and get an error message. Not fixed.

Can now create a ruleset with the same name as a deleted one.


Run Examples Browser

Running 'Examples' Locally
What's the current behavior?
When running the examples script, the webpack-dev-server console output tells you that:

The site is running on 'http://localhost:3000', and
Content is served from the '/examples' directory

This then requires a user to manually open a browser and navigate to http://localhost:3000/examples to actually view the content.
What's the expected behavior?
When running the examples script, the Examples 'site' should automatically open in the user's default browser.
Solution
I submitted PR #1315 to address this issue

the current setup is a quick hack to deal with publishing to gh-pages. where the site is served from /examples and i never really fixed it

@jquense Is it possible to change the gh-pages config to serve from /examples/static? That keeps the 'built' resources separate from the examples source. If not, I can change it to serve direct from examples (gh-pages didn't somehow use that server.js, right?)

@jquense Second question: When contributing, does the developer have to run the build:examples script? Or does CI handle that for you?


S2A credentials and security connector API's.

This PR contains the API's for the S2A credentials and the S2A security connector. Both sets of API's are nearly identical to their ALTS counterparts, namely alts_credentials.h and alts_security_connector.h.

The merge conflicts have been resolved and this PR is again ready for review. The modified files that require review are listed below:

grpc_security.h
grpc_s2a_credentials_options.{h,cc}
s2a_credentials.{h,cc}
s2a_security_connector.{h,cc}

@yihuazhang I've rectified conflicts for this PR after several merges into s2a-master from other branches. PTAL. There is very little content - just API's for options, credentials, and security connector.

Sorry for the delay and looks good overall. My major concern is for grpc_s2a_credentials_options whether we should keep using C concept  (e.g., v-table) or not especially nowadays gRPC core is migrating towards C++.

Thanks @yihuazhang! After looking at your comments, I've made a couple of changes:

I've C++-ified the grpc_s2a_credentials_options struct, making it look similar to the grpc_tls_credentials_options struct that we use for SPIFFE. Further, the linked lists are replaced with std::vector's.
I've removed the distinction between "client options" and "server options".
I've added an "options test file" to illustrate how the grpc_s2a_credentials_options struct should be used.

Finally, it appears that there were a couple comments of yours that I received emails about but don't appear above. Did you delete them? Should I address them still?

LGTM and Approval

Thanks for the review @yihuazhang!
@cesarghali can you have a look now? The part I'd like your thoughts on is grpc_s2a_credentials_options.{h,cc}, and whether there are any tweaks to the options that need to be made. Note that these options will be used for 2 purposes:

Preparing the client/server start message.
Establishing the connection with the S2A service.

Thanks for your comments @cesarghali! I've either implemented or responded to each of them.

Thanks for the review @cesarghali!
Squashing and merging now.


iOS 13.4.1 extract the AppleMediaServices framework failed

When I try to extract the AppleMediaServices framework, an error happened.  The log as follows:
python3 extractor.py -f AppleMediaServices -o AppleMediaServices dyld_shared_cache_arm64
Extracting AppleMediaServices
17:12:47:659 StubConverter.py [WARNING ] : No symbol for: 0x18d41b694
17:12:47:705 StubConverter.py [WARNING ] : No symbol for: 0x1902f2ca0
17:12:47:775 StubConverter.py [WARNING ] : No symbol for: 0x190300688
17:12:47:788 StubConverter.py [WARNING ] : No symbol for: 0x18aa6fb24
17:12:47:810 StubConverter.py [WARNING ] : No symbol for: 0x18794bdd8
17:12:47:816 StubConverter.py [WARNING ] : No symbol for: 0x18d43f5e8
17:12:47:825 StubConverter.py [WARNING ] : No symbol for: 0x18d44a8cc
17:12:47:857 StubConverter.py [WARNING ] : No symbol for: 0x1903217d4
Traceback (most recent call last):
  File "extractor.py", line 146, in <module>
    extractImage(dyldFile, dyldFile.images[targetImageData[0]], args.output)
  File "extractor.py", line 70, in extractImage
    Converter.StubConverter(machoFile, dyld).convert()
  File "~/Workspace/OpenSource/DyldExtractor/DyldExtractor/Converter/StubConverter.py", line 113, in convert
    self.fixCallsites()
  File "~/Workspace/OpenSource/DyldExtractor/DyldExtractor/Converter/StubConverter.py", line 436, in fixCallsites
    targetFunc = self.resolveTarget(target)
  File "~/Workspace/OpenSource/DyldExtractor/DyldExtractor/Converter/StubConverter.py", line 279, in resolveTarget
    sect = image.segmentForAddr(currentAddr)[1]
TypeError: 'NoneType' object is not subscriptable

iOS version: 13.4.1
Device: iPhone 7
Terminal command: python3 extractor.py -f AppleMediaServices -o AppleMediaServices dyld_shared_cache_arm64

Try this...
In DyldExtractor/Converter/StubConverter.py, on line 279 change
sect = image.segmentForAddr(currentAddr)[1]

to
# null guard.
sect = image.segmentForAddr(currentAddr)
if not sect:
    return -1
else:
    sect = sect[1]

If this gets rid of the exception I'll do a quick commit soon.

@arandomdev works fine now, thanks for your work!

fixed with #778b8c3ffa294cba7418861098e6a8b57c0f65a4


[WFLY-10069] Remove all slf4j dependencies from WildFly

With WFCORE-3703, all SLF4J dependencies are declared in WildFly Core
JIRA: https://issues.jboss.org/browse/WFLY-10069

This PR can merged after the component upgrade for wildfly-core that will incorporate https://github.com/wildfly/wildfly-core/pull/3182

@mkouba Does Weld still use ch.qos.cal10n?

@jamezp No, it doesn't.. for a long time.

Looks like the slf4j artifacts are back again at component-matrix/pom.xml when fixing https://issues.jboss.org/browse/WFLY-9911

Retest this please

@jmesnil needs a rebase

retest this please


[Impeller] automatic resource layout tracking for Vulkan

Currently layout state for Vulkan resources (mostly just images) is pretty hardwired, this leads to some edge cases where we need a hole punch to make things fast: https://github.com/flutter/engine/pull/52908
Could we do better here? Yes, but it would be some work. The approximate solution for us is likely to follow the outline in https://www.youtube.com/watch?v=d15RXWp1Rqo .
TLDR:
Track resource states per command buffer and per queue. Automatically insert barriers during queue submission if resource state doesn't match expected state of cmd buffer. Assume first usage in a cmd buffer is the correct state.
Unlike previous attempts, we do not track layout state globally per resource. We may need to output additional cmd buffers when submitting in order to transition resources to the correct state. This would be wasteful for common cases such as render passes, so maybe we explore a system where we always delay submitting the previously submitted cmd buffer so we can use it to hold layout transitions for the next cmd buffer.
This would also be a requirement to make flutter GPU feasible on Vulkan.

If we do this naively, then we'll end up doubling the number of cmd buffers we submit. if we go back to a batching like API, it would be at most one extra cmd buffer.


Fix backup functionality

Type of Change

[x] Bug fix

Description
Fixes infinite backup-creation
Fixes original config being lost to infinite backup-creation
Checklist

[x] My code adheres to the coding and style guidelines of the project.
[x] I have performed a self-review of my own code.
[x] My changes generate no errors/warnings/merge conflicts.

Drafted for now, this fix is flawed.


Add default for split op

When the attr.split length is 1 or less, we should fall back to default split behavior -- dividing evenly over the axes, because the split importer drops the first item in the attr.split list. The shape func for split assumes at least one item in the split indices.

Can you add a test that hits this case? Otherwise LGTM


libx86emu: 2.0 -> 2.1

Motivation for this change
This updates libx86emu to 2.1.
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[x] Fits CONTRIBUTING.md.

@GrahamcOfBorg build libx86emu hwinfo

No attempt on x86_64-darwin (full log)
The following builds were skipped because they don't evaluate on x86_64-darwin: libx86emu, hwinfo
Partial log (click to expand)

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.

Success on x86_64-linux (full log)
Attempted: libx86emu, hwinfo
Partial log (click to expand)
shrinking /nix/store/vbsjrn812nq06al0amnj91aw7ciwm7cx-hwinfo-21.56/bin/mk_isdnhwdb
shrinking /nix/store/vbsjrn812nq06al0amnj91aw7ciwm7cx-hwinfo-21.56/lib/libhd.so.21.56
strip is /nix/store/h0lbngpv6ln56hjj59i6l77vxq25flbz-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/vbsjrn812nq06al0amnj91aw7ciwm7cx-hwinfo-21.56/lib  /nix/store/vbsjrn812nq06al0amnj91aw7ciwm7cx-hwinfo-21.56/bin
patching script interpreter paths in /nix/store/vbsjrn812nq06al0amnj91aw7ciwm7cx-hwinfo-21.56
/nix/store/vbsjrn812nq06al0amnj91aw7ciwm7cx-hwinfo-21.56/bin/getsysinfo: interpreter directive changed from " /bin/sh" to "/nix/store/czx8vkrb9jdgjyz8qfksh10vrnqa723l-bash-4.4-p23/bin/sh"
/nix/store/vbsjrn812nq06al0amnj91aw7ciwm7cx-hwinfo-21.56/bin/convert_hd: interpreter directive changed from " /usr/bin/perl" to "/nix/store/q9ajsngf2w3r10dg7b1148wzq1avp4gj-perl-5.28.0/bin/perl"
checking for references to /build in /nix/store/vbsjrn812nq06al0amnj91aw7ciwm7cx-hwinfo-21.56...
/nix/store/73mnjzrzggia4ipi1hncfq294ymb874r-libx86emu-2.1
/nix/store/vbsjrn812nq06al0amnj91aw7ciwm7cx-hwinfo-21.56

Success on aarch64-linux (full log)
Attempted: libx86emu, hwinfo
Partial log (click to expand)
shrinking /nix/store/696jjjgw29gr3ff4lkgh2ad1jcy3hgar-hwinfo-21.56/bin/check_hd
shrinking /nix/store/696jjjgw29gr3ff4lkgh2ad1jcy3hgar-hwinfo-21.56/bin/hwinfo
strip is /nix/store/y4ymnvgxygpq05h03kyzbj572zmh6zla-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/696jjjgw29gr3ff4lkgh2ad1jcy3hgar-hwinfo-21.56/lib  /nix/store/696jjjgw29gr3ff4lkgh2ad1jcy3hgar-hwinfo-21.56/bin
patching script interpreter paths in /nix/store/696jjjgw29gr3ff4lkgh2ad1jcy3hgar-hwinfo-21.56
/nix/store/696jjjgw29gr3ff4lkgh2ad1jcy3hgar-hwinfo-21.56/bin/getsysinfo: interpreter directive changed from " /bin/sh" to "/nix/store/fqm2x6kiay1q4vg7pqp4wp17bdijlyc3-bash-4.4-p23/bin/sh"
/nix/store/696jjjgw29gr3ff4lkgh2ad1jcy3hgar-hwinfo-21.56/bin/convert_hd: interpreter directive changed from " /usr/bin/perl" to "/nix/store/p3cg3qswdvq6vdjigs83did8km5dlqk7-perl-5.28.0/bin/perl"
checking for references to /build in /nix/store/696jjjgw29gr3ff4lkgh2ad1jcy3hgar-hwinfo-21.56...
/nix/store/w413zbyrglw1bsm6pj1lryjc83j1lpr1-libx86emu-2.1
/nix/store/696jjjgw29gr3ff4lkgh2ad1jcy3hgar-hwinfo-21.56


[iOS] Not receiving notifications

Hi,
I have a problem on iOS with the Firebase notifications.
If I send a notification with the app in the foreground, I don't see any notification but onNotificationOpen is called correctly (=normal behavior).
If the app is in the background and I send a notification, I don't see any notification but when I go back to the app, onNotificationOpen is called correctly. Which is pretty strange.
And last but not least, if I send a notification while the app is closed, I NEVER receive the notification.
Any help please ? I'm using an iPhone 5C with iOS 10.0.2.

maybe related to #85? did you ever give the app permission to push notifications?

I did give permission yes. In the phone's settings, everything is allowed.
BUT. It seems this is only happening when using the development APNS certificate. If I use the distribution one (via exporting the app for Ad Hoc), everything seems to work fine.

yeah this is a known issue as well. #74


Add python 3.11 to testing

Codecov Report

Merging #258 (7a1f60d) into main (31ebf0a) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##              main      #258   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files            2         2
  Lines          185       185
=========================================
  Hits           185       185

Help us with your feedback. Take ten seconds to tell us how you rate us.


[Enhancement] avoid rebuild lake pk index when retry publish txn

What type of PR is this：

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

Which issues of this PR fixes ：

Fixes #14853
Problem Summary(Required) ：
In lake primary table, when many load tasks exist, and retry to publish one hotspot tablet, duplicate publish msg will try to clear pk index cache, and make publish more slow.
Checklist:

[ ] I have added test cases for my bug fix or my new feature
[ ] This pr will affect users' behaviors
[ ] This pr needs user documentation (for new or modified features or behaviors)

[ ] I have added documentation for my new feature or new function

Bugfix cherry-pick branch check:

[x] I have checked the version labels which the pr will be auto backported to target branch

[ ] 2.5
[ ] 2.4
[ ] 2.3
[ ] 2.2

run starrocks_admit_test

run starrocks_admit_test


The multi-task setup

Hi! This is awesome reimplementation work and thanks a lot! Could you point out the multi-task setup for the configuration on DM_control or other possible benchmarks?

Thank you for asking! As for task setup, I plan to evaluate on as many tasks as possible starting from visual DMC suite. Unfortunately, due to limited resources and time, it will take some time.

Thank you for the quick reply. Maybe, there could be a detailed to-do list that includes the future possible tasks. :)

I'm sure it's a useful list. I will try to add it in the near future.

Thank you for your patience.
I added a detailed to-do list.


Version hash test

Add a devimint version hash test that compares the result of the version-hash command of each binary against the git HEAD commit hash.
This change includes two fixes:

devimint set_code_version() was failing to set the correct commit hash on a few binaries due to a reliance on a hardcoded relative filepath. The fix was to remove the check for the HEAD file and just run the git rev-parse HEAD command directly, writing errors to stderr.
The gateway-cli binary version-hash command returned a different format than all other binaries. The fix was to remove the extraneous "version: " text and only return the hash.

would love to test this! any leads @vnprc ?

@nassersaazi Thank you! I will gladly accept your offer. =D
There are a lot of error conditions in this code. I'm not sure we're handling them in the best way but I tried not to alter the behavior of set_code_version() in order to contain the scope of this PR.
Here's a list of (perhaps insignificant) error conditions:

git command fails: should print "Failed to execute git command." to stderr
git command returns an error code: the git command will print to stderr outside of the scope of this program (is this the behavior we want?)
git command returns a non-UTF-8 string: should print "Invalid UTF-8 sequence detected." to stderr

In all three cases the CODE_VERSION env var will get set to the fake commit hash value.
The success case is easy to test: run devimint version-hash-tests and it should print the following output:
$ devimint version-hash-tests
git hash:                       37b5ede0b6b27cda2ac67644ed0a7f90cd3f1aa7
fedimint-cli hash:              37b5ede0b6b27cda2ac67644ed0a7f90cd3f1aa7
fedimintd hash:                 37b5ede0b6b27cda2ac67644ed0a7f90cd3f1aa7
gateway-cli hash:               37b5ede0b6b27cda2ac67644ed0a7f90cd3f1aa7
gateway-cln-extension hash:     37b5ede0b6b27cda2ac67644ed0a7f90cd3f1aa7
gatewayd hash:                  37b5ede0b6b27cda2ac67644ed0a7f90cd3f1aa7

Trying to trigger CI

Yeah, sorry. I broke the CI build somehow and had to stop soon after. I need to figure out how to test this locally to get the new env var working correctly.  Hopefully, then it will be ready to merge.

Looks good, but do we actually run the test yet? Can't find the change in this PR.

lol oops

I also agree that it would be good to merge what works in the dev environment and continue working on getting it to pass in CI. But I'd like to rebase out some of the (failed) experimental commits first. No need to pollute the git history in the master branch.

BTW. https://github.com/fedimint/fedimint/pull/2704

@dpc I won't be able to get back to this work until late next week. Do you think it would be good to merge this as it is and create a new issue to incorporate this test into the CI build?

What's the CI issue about? With failing CI we can't merge and I restarted a few times already, so it's unlikely to be a flaky test.

Moved to https://github.com/fedimint/fedimint/pull/2726 . Dropped the tests, as we test in the CI now the release binaries (built by nix).


Implement Default

Currently I cannot #[derive(Default)] on a struct containing a d128 because d128 does not implement std::default::Default.
All the numeric types in rust implement default.
Would you be willing to merge a PR that implements Default for d128?

Yes.


Select-String where it can return multiple lines on a match, and this seem to depend on the size of the console window.

Steps to reproduce
Create a file named "logs.log"
2017-09-06T19:37:17.115+00:00 node2 2017-09-06 19:37:17,114 Level="WARNING" Name="support.pulse" Message="Irregular pulse duration detected" Duration="2.31735133001"
2017-09-06T21:20:27.829+00:00 node1 2017-09-06 21:20:27,827 Level="WARNING" Name="support.pulse" Message="Irregular pulse duration detected" Duration="6.652835013"
2017-09-06T21:21:04.163+00:00 node1 2017-09-06 21:21:02,207 Level="WARNING" Name="support.pulse" Message="Irregular pulse duration detected" Duration="2.33411307697"

Now I run (I would usually use a complex RegEx pattern to match, but this is added for simpicity):
Get-Content logs.log | Select-String -Pattern '6.6' | Out-File out.txt

Expected behavior
I would expect that in all cases, I get a file with one line
2017-09-06T21:20:27.829+00:00 node1 2017-09-06 21:20:27,827 Level="WARNING" Name="support.pulse" Message="Irregular pulse duration detected" Duration="6.652835013"

Actual behavior
Depending on the size of the console window when the command is run will depend on the number of lines in the file. If I run the console maximise (and on this system, I am running a 1920x1200 display, 100% font scaling), I get the desired result. However, if I window the console and run, I could get something like
2017-09-06T21:20:27.829+00:00 node1 2017-09-06 21:20:27,827 Level="WARNING" Name="support.pulse"
Message="Irregular pulse duration detected" Duration="6.652835013"

That's two separate lines
Environment data

> $PSVersionTable
Name                           Value
----                           -----
PSVersion                      5.1.16353.1000
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.16353.1000
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>

This is the documented behavior of Out-File. See the -Width parameter.

@markekraus thanks, however, simply running
Get-Content logs.log  | Out-File out.txt

Yields a normal width file - all the original lines are still on one line when you run the command in a windowed console. What is the difference after the string as been piped through Select-String?
Either way, this is confusing behaviour.

The difference is the type of object being processed. Select-String returns a Microsoft.PowerShell.Commands.MatchInfo (docs) where as Get-Content is returning Strings.  The formatting is different.
This also produces the expected results:
Get-Content c:\temp\testlog.txt | Select-String -Pattern '6.6' | %{$_.ToString()} | Out-File c:\temp\testlog.out.txt

Thanks @markekraus  :)

It may be the documented behavior of Out-File, but I don't anyone who likes this behavior.

@lzybkr Kind of. The documented behavior of Out-File is "somewhat" useful for "somewhat" emulating what the console would look like with the output. Most of the behavior complaints I have personally seen are addressed by using Set-Content instead. I always just assumed the purpose of Out-File was intended for preserving formatting.
In this particular instance, perhaps changing the default format behavior of Microsoft.PowerShell.Commands.MatchInfo makes sense (if possible). One would reasonably expect Select-String to return a String and for its output to behave like strings... even though it is documented that it returns MatchInfo or Bool.

This behavior seems to break the principle of least astonishment to me.

If we send anything as formatted output on screen how we can route the same in file? Is Out-File cmdlet designed for that? What is Out-* cmlets designed for?

IMO, it is Select-String that breaks the principle of least astonishment. Out-File has its purpose. Maybe the default behavior is debatable, but, that behavior is what distinguishes it from the *-Content cmdltes.
Select-String, on the other hand, should probably be returning Strings. If it did, the formatting would not result in Out-File line-wrapping or truncating. This is not to say returning MatchInfo is not useful, just not expected as the default behavior, IMO. The name implies it selects Strings. The output behavior could be changed but I have seen code that does rely on the MatchInfo objects. That behavior would need to be preserved (possibly with a switch parameter or something).

Select-String returning a MatchInfo is definitely useful for the usual reasons returning objects is useful. Here is one example - custom formatting to highlight the match: https://gist.github.com/lzybkr/dcb973dccd54900b67783c48083c28f7

@lzybkr  Absolutely! That's why I originally suggested possibly modifying the default format instead of switching to String. If the default format of MatchInfo behaved like String, It would behave closer to what one would expect in most situations without breaking all the many things that have been made to work with MatchInfo.

The issue is not specific to Select-String (whose naming may be debatable, but there's only so much information you can cram into a cmdlet name, and it does operate on strings as input), it is fundamental to PowerShell's default output formatting:
Unfortunately - from what I can tell, without having dug into the source - all Out-* cmdlets use the same window width-sensitive formatting, even though respecting the host's window width really only makes sense for actual host (console) output (by default or via Out-Host).
Yes, the behavior may be documented, but as @lzybkr and @SteveL-MSFT observe, it is undesirable / unexpected.
This is especially true for the > redirection operator, which is effectively an alias of Out-File.
Thus, the real fix - which is a breaking change, though hopefully a bucket 3 change - would be to remove any host window-width sensitivity from Out-* cmdlets that don't target the host (console), namely Out-File and Out-String.
A simpler demonstration of the problem:
# Default formatting truncates the property value and appends "..." to fit the window width.
> [pscustomobject] @{ str = 'x' * 1024 + '!' }
str
---
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...

# Unfortunately, the same truncation happens when you use Out-File, resulting in LOSS OF DATA:
> [pscustomobject] @{ str = 'x' * 1024 + '!' }  | out-file tmp.txt; Get-Content tmp.txt
str
---
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...

As an aside: There seems to be a bug with respect to using >  to redirect a [pscustomobject] instance to a file - see #4812.

If '>' is alias for Out-File can we replace it with Set-Content?

Unfortunately - from what I can tell, without having dug into the source - all Out-* cmdlets use the same window width-sensitive formatting, even though respecting the host's window width really only makes sense for actual host (console) output (by default or via Out-Host).

Right, which is what I have always assumed the Out-* commands are intended for. And yes, it does make sense, IMO, to have that functionality for files as well as the console. Sometimes you want the UX captured and Out-File accomplishes that goal
I don't see the point in making Out-File behave outwardly like Set-Content/Add-Content with a different internal implementation.
In defense of Out-File:
Out-File always did what I expected it to do when I was new to the language. What I saw on screen I wanted in a file and Out-File did just that. It wasn't until I was more familiar with the language and understood the "object" aspect of output (came from heavy text based languages) that I even saw this as a limitation.

@iSazonov: That would be a huge breaking change, because Set-Content performs simple stringification on its input objects, whereas Out-File uses the default formatter (there's also the different character encodings, though that will go away soon, at least in Core):
> @{ one = 1 } > t.txt; Get-Content t.txt

Name                           Value
----                           -----
one                            1

> @{ one = 1 } | Set-Content t.txt; Get-Content t.txt
System.Collections.Hashtable   # same as: @{ one = 1 }.psobject.ToString()

On a side note: The fact that Set-Content seems to use (the equivalent of) .psboject.ToString() means that it acts culture-sensitively, unlike string expansion (string interpolation in double-quoted strings):
> [cultureinfo]::CurrentCulture = 'de-DE'; 1.2 | sc t.txt; gc t.txt; "$(1.2)"
1,2  # Set-Content: culture-SENSITIVE
1.2  # string expansion: culture-INsensitive

@markekraus:

Sometimes you want the UX captured and Out-File accomplishes that goal

Perhaps, but making capturing of console output as-is the default behavior of Out-File and especially > is very problematic. (I could see an opt-in to mimicking console in all aspects via -Width as helpful.)
Out-File and Out-String definitely need to continue to use the default formatter, but, as stated, without the incidental aspect of window width; what would make sense to me is to make them behave as if there's no limit on line length.

What I saw on screen I wanted in a file and Out-File did just that

Yes, but not literally, just like users understand that, for instance, word wrapping in a text editor is an artifact of windowed display, and that the line breaks aren't part of the  underlying file.
To recap: line wrapping and value truncation (...) are fine for console display, but have no business in an output file (unless explicitly requested).
As a (naive) user, I expect Out-File / > to send data to a file, not a "screen shot" of the console.
(The fact that default formatting is not the right format to use for stable long-term storage is a separate, more advanced topic.)

Yes, but not literally, just like users understand that, for instance, word wrapping in a text editor is an artifact of windowed display, and that the line breaks aren't part of the underlying file.

Which is why I'm suggesting that Select-String or the default format for MatchInfo is at fault here. Normal strings do not wrap in Out-File. Select-String does not return a string, but one would expect its output to behave like strings if that's what it is supposed to be selecting as indicated by its name. In every other case where you are dealing with strings you will get the expected result with Out-File. If Select-String is treated like the PowerShell equivalent of grep, one would expect what @swinster initially reported to work. And, if Select-String actually returned strings or objects that format like strings then it would. I don't think Out-File is to blame for doing what it is supposed to do.

In every other case where you are dealing with strings you will get the expected result with Out-File

Yes, but you're typically not dealing with strings when you use Out-File / > (if you know you're dealing with strings only, just use Set-Content - no need to involve the default formatter).
As such, it is the typical use case that - potentially, circumstantially - exhibits the undesirable / unexpected behavior, especially with respect to > if you come from a text-only shell such as cmd.exe or bash.
That redirection operator > /  a cmdlet named Out-File would have a coupling with console window size is absolutely counter-intuitive - the fact that it is documented notwithstanding.

As for > we have Issue for it.
As for Out-File if it's behavior is documented so maybe add switch to dsiable the console width formatting?

The question I have is when do you determine when formatting applies or not in Out-File?
For example:
[pscustomobject]@{
   Property01="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
   Property02="bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
} | Out-File C:\temp\test.txt

Would you really expect the Out-file to show the entire "stringified" contents of each property?

Would you really expect the Out-file to show the entire "stringified" contents of each property?

Indeed I would - in a file, line length needn't be constrained, and including the whole value - i.e., avoiding loss of data - is more important than limiting line length.
Also, remember that not all hosts are consoles and in some the concept of a window may not even apply.

avoiding loss of data

This is an "out" operation, not an "export" operation. I would not expect complete serialization from Out-File commands, I would expected WYSIWYG. If i need the full contents of a property, I would pipe that property to Out-File. Again, I would expect strings to be unmolested by Out-File (and they are), but objects I would expect formatting. If I have custom formatting on an object, I would not want that formatting lost to Out-File, even if that means data is truncated or wrapped.  If I need the unmolested data I would serialize and export. That is what differentiates Out-File from Set-Conetent or Export-Clixml

This is an "out" operation, not an "export" operation.

Yes, as stated, output formatting is primarily for display purposes (human eyeballs), and therefore not suitable as a complete, machine-parseable format with longterm format stability.
That doesn't mean it shouldn't exhibit the most helpful / least surprising default behavior, however.

I would expected WYSIWYG.

That's the crux: my sense is that most people do NOT expect that, especially with >, and they may only notice when it's too late.
Yes, you can conceive of Out-File / > as a console transcript (which is not documented as such, though the role of -Width is, somewhat), but I think it is ill-advised, for all the reasons discussed (truncation, unexpected line breaks, non-obvious length limit for non-console hosts).

I would not want that formatting lost to Out-File, even if that means data is truncated or wrapped

You still get the formatting, just not the truncation / wrapping - because that is the unhelpful / unexpected part.
We could still preserve the ability to limit line length on an opt-in basis; we already have -Width; for convenience, perhaps a new -ConsoleWidth switch could be added that uses the console window's current width.

@iSazonov:

As for > we have Issue for it.

I couldn't find any existing issue - can you point us to it?

As for Out-File if it's behavior is documented so maybe add switch to dsiable the console width formatting?

If we reversed the logic (opt-in to limit line length), it would technically be a breaking change, but my sense is that it would fall into Bucket 3: Unlikely Grey Area, and is therefor worth making.

Re still getting the formatting: I do see that with tabular output you may end up with misaligned columns in the file if values are never truncated.

Taking another step back: it would be unfortunate, but it's conceivable that there's code out there that relies on parsing Out-File / > output and would be affected by a change in default behavior.

That's the crux: my sense is that most people do NOT expect that, especially with >, and they may only notice when it's too late.

And they don't... for strings.. they would.. for objects. and in that respect, Out-File works as intended, except when commands like Select-String doesn't actually return a strings. :)

Taking another step back: it would be unfortunate, but it's conceivable that there's code out there that relies on parsing Out-File / > output and would be affected by a change in default behavior.

With object streams, there really is no need to parse the text, so formatting has never been considered a contract in PowerShell.

Overall, we're talking about sensible default behavior that doesn't violate the principle of least astonishment: When I send output to a file, I'm not thinking about the (usually incidental) width of my console window - if there even is one.
Considering the specific output type of a command and choosing between Set-content and > accordingly is definitely an advanced technique.
As for Select-String specifically: the String name part is defensible in that it refers to the type of the input objects - they either already are strings or they're forced to strings, using (culture-invariant) string expansion.
And in terms of _functionality I think we're in agreement that it is helpful to output [Microsoft.PowerShell.Commands.MatchInfo] instances rather than mere strings.
There is no good reason for the default output to actively insert a newline instead of just letting the console wrap lines that exceed the window width.
(Another problematic aspect of current Select-String default output formatting is that it produces leading and trailing empty lines).
Therefore, the right resolution for the specific Select-String issue is the one you already suggested yourself:

If the default format of MatchInfo behaved like String, It would behave closer to what one would expect in most situations without breaking all the many things that have been made to work with MatchInfo.

Do note, however, that Select-String's default output format is context-dependent: the input line only, if the input doesn't come from files, and a filename + line-number prefix, if it does; to always get the input line only, the .Line property must be used.

There is no good reason for the default output to actively insert a newline instead of just letting the console wrap lines that exceed the window width.

Do you suggest remove the window width formatting at all from formatting subsystem and migrate to console wrap?

@iSazonov:
That's a good question: I guess I shouldn't have related this to the console at all, given that the formatting subsystem is really console-independent and explicitly creates lines with a hard length limit.
It is the fact that it derives that limit situationally from the console window width when not printing to the console  that is problematic.
So perhaps simply defaulting to -Width ([int]::MaxValue) in the case of Out-File / > and Out-String is the right solution - or perhaps a lower, but reasonably high value, so as not to let file sizes get out of hand:
E.g.,  [implicit] Format-Table output composed of a large number of rows with even only a single long value could create unexpectedly large files; in the following example, with no limit on line length, all 3 lines end up 205 characters long, because right-space-padding is applied to the rightmost column too:
([pscustomobject] @{ one = 1; two = 'x' * 100; three = 3 }),
([pscustomobject] @{ one = 1; two = 2; three = 'x' * 100 }),
([pscustomobject] @{ one = 1; two = 2; three = 3 })

At the end of the day, users still need to understand that the only robust use of Out-File / > is with strings only - in which case Set-Content is the better choice anyway - but by not imposing the console window width we can make the default behavior of Out-File / > more useful.
The formatting subsystem is a complex beast, however, and I only know it superficially, so do tell me if I'm missing something.

This was my point of the original post. I'm glad it has provoked discussion and it certainly has enhanced my understanding, but yes, my goal was to pipe out results to a text file, just as you would with grep in Linux. What I ended up with was unexpected behaviour, be it documented or otherwise.
Now all I have to understand is "why o why" is the native PowerShell Select-String so poor in performance terms to a ported version of grep that appears On the GoW tools (https://github.com/bmatzelle/gow). In a basic test across a number of files (33), 'Select-String' appears to be 400% slower than this 'grep'. Of course, this is likely is topic of another discussion entirely.

Years ago I tried setting the default width to int.MaxValue - in the current implementation that kinda works in some places, but in others, it turns out to be a terrible idea - you will get padding to the width you asked for.
I do think we need to detect where the output is going - and not just for the width. If the output is to a file, we might also want to strip ansi escape sequences (with some sort of option to not do so).
As for performance - I lost any incentive to improve the perf of Select-String after finding ripgrep.  It even has an option to output in a PowerShell friendly way so it wouldn't be too hard to write a wrapper and get objects, but I haven't done that yet.

CoreFX RegEx implementation is so bad?

I haven't compared the CLR regex to Rust's regex directly, but I'm confident we can do much better without  touching the CLR's regex code.

To continue on the tangent, more generally:
The ability to call out to external utilities is important - even more so in the Unix world.
I'm sure there are other cmdlets whose performance with large input sets will necessitate using external utilities instead.
Conversely, other shells may want to take advantage of PowerShell's high-level features on demand, by calling PowerShell's CLI as needed.
The interfaces to properly support these scenarios aren't quite there yet / may never get there, unfortunately:

Problems with calling out of PowerShell (calling external utilities) - from what I understand, these will be fixed:

Problems with POSIX-like globbing: overeagerness and inability to include hidden items.
Lack of predictable argument passing (Unix) / "re-quoting" (Windows), with bash -c 'echo "hi there"' (prints just hi; #3049) and /bin/echo "a b\" (prints a b", #4358) being two notable cases.

Problems with calling into PowerShell (powershell -command ....):

PowerShell's nonstandard startup behavior is problematic, most notably that the  profile is loaded by default.

The above link lists all issues, but two are worth calling out, relating to the -Command and -File parameters:

They exhibit problematic interactive shell-like behaviors (with or without -NonInteractive) and lack consistent argument support - see #3223.

-File - - to provide a script via stdin (-) - is not officially supported and doesn't accept arguments (in addition to exhibiting problematic interactive-like behavior)
-Command - is officially supported, but by design doesn't accept arguments (and also exhibits problematic interactive-like behavior); see next point.

The way -Command currently parses the remaining arguments is problematic in itself and fundamentally incompatible with POSIX-like shells - see https://github.com/PowerShell/PowerShell/issues/4024#issuecomment-312267611

E.g., passing a simple string literal don't stored in a Bash variable to powershell -command as-is currently requires the following acrobatics:
v="don't"; powershell -noprofile -command Write-Output "'${v//\'/\'\'}'"

The -Command issue will not be fixed so as to preserve backward compatibility, which I personally find very problematic; not sure about the others.

I went through ripgrep repo and see that it's a very young and single man's project. I saw a message that its public API should be re-designed. Also it still haven't library - I'd prefer the same way we use Newton.
I read ripgrep perf analize. It is veryinteresting. We can benefit from that. For example, make our FileSystem provider (dir traversal) more fast. It seems again related to migration on ETS.


fix Fix missing table ids in TxnRunningPB

Proposed changes
Fix missing table ids in TxnRunningPB in MetaServiceImpl::precommit_txn.
The table ids in TxnRunningPB will be used to check for running doris transactions. If they are missing, it will cause check_conflict_txn to assume that transactions below the watermark have already completed. Then, result in a gap between the alter version obtained by the schema change job (which is used to decide the version range of history data to convert) and the version committed by new doris transcations during schema change job.

run buildall

run buildall

run buildall

run buildall


3D button

1. Name of button: 3D Button
2. Description: A 3D button like a keyboard key
3. Button Type (Animated, Special, etc...): Animated
4. Will you work on it?:
submitted by: @Charu271

Can I work on this, mam??

@navjyot18 someone is working on this


Duolingo has changed the colors about a couple of day ago

Hi! Thank you for the awesome addon!
But Duolingo has changed the colors about a couple of day ago
and duoleavemealone does not work on /learn lessons anymore
(on /stories it continues to work as designed).
Please, repair it.
Or is there a way for me to change colors codes by myself?

Thanks for the heads-up. I'll hopefully have time to take a look tomorrow, but if you want to try to fix it before then, the greenButtonColor, correctDivColor, etc. constants starting on L129 of content.js are probably what need to change. That's assuming that they just changed the colors and didn't make any other changes to the structure of the page, though.

Haven't tested it yet, but from running through a lesson, the colors might just need to change to this:
const greenButtonColor = '#58cc02';
const correctDivColor = '#d7ffb8';
const correctMessageColor = '#58a700';

I've submitted version 0.21 of the extension for review, so hopefully the fix will go out soon. It looks like they only changed the background color of the "correct" message -- at least, updating that was enough to get the extension working again on a practice skill. Let me know if anything else is still broken after you get the update.

Unfortunately, now they randomize the color of Continue button on each new question.

Hmm, interesting -- thanks for pointing that out. It looks to me like the continue button's background color is #58a700 after the first question and then #58cc02 after later questions. Is that what you're seeing too?
I'm guessing this is just a bug on their side. I'll update the extension to look for either color.

Sigh, I can't upload 0.22 to the Chrome Web Store since 0.21 is still under review.

There is no need to update Chrome Web Stor for each try, I use developer mode in my chrome.
Yesterday I saw a new color code for each question, today I saw some dark green color on first answer and now I see rgb(88, 204, 2) on each Continue button and use this color in add-on, but it still does not work for me.
Well, thank you. I am sick and tired of tricks and traps of Duolingo, that's enough for me, I'm leaving the site.
All their time they think and care about coding games, not about studing languages.

Thank you! rgb(88, 167, 0) works perfectly well
But why not #58CC02 ?! 0_o


Improvement patch on jp

Codecov Report

Merging #30 into master will increase coverage by 0.03%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master      #30      +/-   ##
==========================================
+ Coverage   83.58%   83.62%   +0.03%
==========================================
  Files          13       13
  Lines         865      867       +2
==========================================
+ Hits          723      725       +2
  Misses        142      142

Impacted Files
Coverage Δ

charset_normalizer/unicode.py
93.38% <100%> (+0.11%)
:arrow_up:

Continue to review full report at Codecov.

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


Add UI tests

Incomplete

Codecov Report

Merging #205 (808ff50) into master (84e86ae) will increase coverage by 1.60%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master     #205      +/-   ##
============================================
+ Coverage     48.79%   50.39%   +1.60%
- Complexity      577      604      +27
============================================
  Files           153      153
  Lines          2562     2562
  Branches        314      314
============================================
+ Hits           1250     1291      +41
+ Misses         1231     1196      -35
+ Partials         81       75       -6

Impacted Files
Coverage Δ
Complexity Δ

...rc/main/java/seedu/address/model/ModelManager.java
58.65% <0.00%> (+1.92%)
28.00% <0.00%> (+1.00%)

src/main/java/seedu/address/model/AddressBook.java
63.29% <0.00%> (+2.53%)
24.00% <0.00%> (+1.00%)

src/main/java/seedu/address/model/entry/Entry.java
86.95% <0.00%> (+10.86%)
23.00% <0.00%> (+4.00%)

...odel/entry/EntryNameContainsKeywordsPredicate.java
100.00% <0.00%> (+14.28%)
7.00% <0.00%> (+2.00%)

...n/java/seedu/address/commons/core/GuiSettings.java
88.46% <0.00%> (+19.23%)
11.00% <0.00%> (+6.00%)

...u/address/model/entry/NonOverlappingEntryList.java
83.33% <0.00%> (+31.25%)
20.00% <0.00%> (+8.00%)

...address/logic/parser/DeleteEntryCommandParser.java
100.00% <0.00%> (+100.00%)
2.00% <0.00%> (+2.00%)

...dress/logic/commands/ClearOverdueEntryCommand.java
100.00% <0.00%> (+100.00%)
2.00% <0.00%> (+2.00%)

...model/entry/exceptions/EntryNotFoundException.java
100.00% <0.00%> (+100.00%)
1.00% <0.00%> (+1.00%)

Continue to review full report at Codecov.

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


Adding CVE-2023-51651 for aws/aws-sdk-php

the link you put in the advisory does not even talk about the CVE or about path traversal, so it looks like a bad source of details about it.

the link you put in the advisory does not even talk about the CVE or about path traversal, so it looks like a bad source of details about it.

Supposed to be the first note, also please check the links here: https://nvd.nist.gov/vuln/detail/CVE-2023-51651

What about changing the link to https://github.com/aws/aws-sdk-php/security/advisories/GHSA-557v-xcg6-rm5m which is more clear IMO?

What about changing the link to GHSA-557v-xcg6-rm5m which is more clear IMO?

I found this one: https://nvd.nist.gov/vuln/detail/CVE-2023-51651 seems to be better. Thanks.


script for preprocessing the normal images

Hello,
Can you please provide a preprocessing script that could convert normal (.png/.jpeg) image to the desired image format (binary) and size and other things etc.
Thanks in Advance!!
Kindly help!!

Hi, I am sorry that I do not have this script. As my experiments are all done on CROHME2014, I have not considered these problems. I think the picture you used is small. You can see the pictures in CROHME2014 and try to enlarge your picture.

ok, I can understand Thank You!! for your time

Vyaslkv have got the script for preprocessing the image to the desire format .if so please share me the information about that.


[Broker] Return from callback early if producerFuture is complete or …

…connection is closed
Motivation
When producer creation times out on the client side, the producer sends a CloseProducer command and then a Producer command. Each time it tries to create a producer, it registers a callback on the same future because getOrCreateTopic loads from a cache. If the future completes after the timeout, multiple callbacks will run. We don't need to run the callbacks if the producer's future is complete or if the connection is no longer active.
My only open question is whether or not we should add an info or a debug log in the conditional. Note that if the future was already completed, we would have logged its closure. We'd also log the closure of the connection.
Modifications

Update ServerCnx#handlProducer to return early if the producer's future is complete or if the connection is no longer active.

Verifying this change
This change is covered by existing tests.
Does this pull request potentially affect one of the following parts:
This change is not breaking in any way.
Documentation

[x] no-need-doc

This is an internal optimization.

adding a log line won't add noise and we can see that we fall into this case in case of weird behaviour

@eolivelli - I updated the PR to add logging. Also, after thinking about this change a bit more, and it makes more sense to delay the "early return" until just before calling topic.addProducer. Any of the preceding calls could be delayed and could then lead to a client side timeout.

Closing and re-opening to get recent changes from master branch.

Please rebase this PR since there are conflicts.

Closing for now. I have an alternate solution. This was only an optimization.


Changes to reconcilliation review screen

This is the current screen:

[ ] change match/no-match to a choice from the following possible relations (each relation should appear as a link like here:
located in the administrative territorial entity, contains the administrative territorial entity, borders with, same as, different from, part of, has part (inverse of part of)
[ ] Add a flash map marker to the original place (Azamgarh in the example above) on the map like the candidates (Mubarakpur and Āzamgarh) have

Current state:

Should look like this instead:

The current relation is taken from the matching result that the ER service returns in the csv file.
When pressing on the down arrow, these options should show:

Same as (Exact match)
Part Of (Mubarakpur  is part of  Azamgarh)
Located in (Mubarakpur is located in Azamgarh)
Reverse Part of (Azamgarh is part of Mubarakpur)
Reverse located in (Azamgarh is located in Mubarakpur)
Borders with
Different (no relation between these two places)

option "different" is still missing.

@zarifbekturdiev

Done @tomersagi


Setting event.locals.user and event.locals.session to null rather tha…

Just a proposal. Undefined means a variable has been declared but has yet not been assigned a value. Null is an assignment value. It can be assigned to a variable as a representation of no value. With null we can easily see that a programer wanted the varaible to have no value.

Thanks for the PR
I agree with your point about null being explicit. One thing to be aware of is that we'd also need to update the types in app.d.ts and make a few other changes. For example +layout.server.ts pulls the user from locals, passes it to the template which in turn passes it to <MenuBar />  which is currently typed to user | undefined.


Collisions

Collision Enhancements
Shapes:

[ ] Add collision computation for capsule
[ ] Add collision computation for sphere
[ ] Add manifold computation for capsule (add inertia tensor calculation)
[ ] Add manifold computation for sphere (add inertia tensor calculation)

Feature:

[ ] Collision layers and collision masks

Optimization:

[ ] Optimize broad phase collisions (maybe use BVH)
[ ] Measure collisions performance

Problem
Box shape is currently the only simple shape with collision computation. We should start looking into implementing alternative shapes.

There is already a collisions tracking issue, moved there


Version number argument

I would be nice if it would be possible to see the used version. Either print it by default (in the help text) or add version argument.

Added -V command


Limit number of retries

When a task fails (like an unhandled exception) it is thrown in the failing jobs list but also retried. It doesn't seem there's any limit to the number of retries, and that means a job which is doomed to failure (due to my bad programming) continues to fail all day. I get a message sent to Rollbar each time, and that adds up to a lot of messages and eats my quota.
Is there a way to set a retry limit?

Is there a work around for this?

Is there any update on this ? I have the exact same issue ...
@tremby @manuganji did you find a workaround ?

I honestly don't recall, but I don't think so. Sorry!

No, I haven't found it. I just fixed that scenario where my task was failing and made sure that I covered all the scenarios that I could predict.  Of course, this only works if you have limited task types.

One way I resolved this issue is with a function called retry
This is designed to work with iLO's that are unreliable with there response/connections.
def retry(func, *args, **kwargs):
    """
    a custom retry for setting iLO information
    """
    count = kwargs.get('count', 0)
    max_retries = kwargs.get('max_retries', 3)
    countdown = kwargs.get('countdown', 30)
    exc = kwargs.get('exc', BaseException)

    if count < max_retries:
        time.sleep(countdown)
        count += 1
        func(*args, count=count, max_retries=max_retries, countdown=countdown)
    else:
        raise exc

I used it like this
def set_host_power(ilo, values, **kwargs):
    try:
        return ilo.call_ilo('set_host_power_saver', values['host_power_saver'])
    except (IloCommunicationError, socket.timeout, socket.error) as exc:
        return retry(set_host_power, ilo, values, exc=exc, **kwargs)

This will make allow retry to retry it an max_retries (default: 3) before raising the exception.
You could instead return a state instead of raising the exception.

If you are using AWS SQS, my workaround is to make a deadletter queue and then on your task queue enable "use redrive policy" which "Sends messages into a dead letter queue after exceeding the Maximum Receives." Then set the maximum receives to the amount of retries you want to allow.

@dangerski :  I have the same problem but even if I configure AWS Queue to use redrive. It doesn't help.
Diving into code to see why.

@mm-matthias I have exactly the same problem. Have you found the solution for it? It there a way to specify number of retries before termination?

@Waszker We are using celery/redis instead of django-q for more than a year, so I don't have a solution for this problem

@Waszker We are using celery/redis instead of django-q for more than a year, so I don't have a solution for this problem

That'a a pity... Thanks for the answer though...

i have a PR for a retry limit
https://github.com/Koed00/django-q/pull/466
try it out :)

This can be closed


upgrade to v6

There seem to be a lot of issues I am facing whilst trying to upgrade to react-native 0.6.0-rc
Any help ? Thanks

changed the package.json of both the module and the react-native package inside the module, and it worked


feat: introduce the PSA changes from upstream RukPak

Bringing the upstream RukPak manifest changes downstream to try and unblock #23

It would also be nice if we could figure out a way to use kustomize patches for this. But that can be done in a follow-up anyways.

/lgtm

It would also be nice if we could figure out a way to use kustomize patches for this. But that can be done in a follow-up anyways.

That's a good call, I'll make an issue for it. Shouldn't be too hard.

This is blocking the #23 PR which introduces the rukpak/CPOM components to the payload. Adding the required labels in the meantime.
/label px-approved
/label docs-approved
/label qe-approved

/override ci/prow/e2e


New syntax keywords in markdown files are automatically lowercased

Describe the bug
When defining a new syntax keyword in markdown files using the command syntax keyword {group} {keyword}, {keyword} will be automatically converted to lowercase.
For example, I've been trying to define DONE as a keyword in markdown files, but this bug means that both DONE and done are highlighted.
To Reproduce
vim -u NONE tmp.md -c "syntax on | syntax keyword tmp DONE | syntax list tmp"

or
vim -u NORC tmp.md -c "syntax on | syntax keyword tmp DONE | syntax list tmp"

results in:
--- Syntax items ---
tmp            xxx done
Press ENTER or type command to continue

Note that even though only done is shown in syntax list, if you then do something like hi link tmp Identifier, both DONE and done are highlighted.
Expected behavior
A clear and concise description of what you expected to happen.
--- Syntax items ---
tmp            xxx DONE
Press ENTER or type command to continue

Environment (please complete the following information):

Vim version [e.g. 8.1.1234] (Or paste the result of vim --version.)
OS: [e.g. Ubuntu 18.04, Windows 10 1809, macOS 10.14]
Terminal: [e.g. GNOME Terminal, mintty, iTerm2, tmux, GNU screen] (Use GUI if you use the GUI.)

 vi --version
VIM - Vi IMproved 8.1 (2018 May 18, compiled Apr 15 2020 06:40:31)
Included patches: 1-2269
Modified by<EMAIL_ADDRESS>Compiled by<EMAIL_ADDRESS>Huge version without GUI.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04 LTS
Release:	20.04
Codename:	focal

I'm using the kitty terminal.
Additional Context
This bug seems to be markdown specific - I've tried with python, asciidoc, C, javascript, html files, and they all work.

It is because syn case ignore is called in syntax/markdown.vim.
You can use syn match tmp "\C\<DONE\>" instead.

Thanks! This makes sense.


I can't get Address from COSESign1 header (cip-30 like)

I implemented sign function in rust based on Nami's implementation here
Then verify function. It seems to be working fine, beside I can't get address from the ProtectedHeader of COSESign1 -  I'll get an error CBOR(TrailingData). After finding I mostly followed this example  but couldn't get it work in rust.
using
use cardano_message_signing as ms;
use cardano_multiplatform_lib as cml;
...

In sign function:
let cbor_value_address = ms::cbor::CBORValue::new_bytes(
   cml::address::Address::from_bech32(address)
       .unwrap()
       .to_bytes(),
);
println!("SIGNING => cbor_value_address len {}", cbor_value_address.to_bytes().len().to_string());

protected_headers.set_header(
   &ms::Label::new_text("address".to_string()),
   &cbor_value_address,
);

In verify function:
let headers_to_verify = cose_sign1.headers();

let header_addr_val = headers_to_verify
    .protected()
    .deserialized_headers()
    .header(&ms::Label::new_text("address".to_string()))
    .unwrap()
    .to_bytes();

let cbor_val_address = ms::cbor::CBORValue::from_bytes(header_addr_val).unwrap();

println!("VERIFYING => cbor_val_address len {}", cbor_val_address.to_bytes().len().to_string());

let address = cml::address::Address::from_bytes(cbor_val_address.to_bytes())
    .unwrap() //this is line that panics
    .to_bech32(None)
    .unwrap();

I tried  header_addr_val  to  cml::address::Address::from_bytes without going to ms::cbor::CBORValue  first, but neither does work.
The len of bytes is the same, so is there some conversion needed for Rust when going from CBORValue?

Changing to_bytes to as_bytes for CBORValue in the verify function fixes it.
This
let address = cml::address::Address::from_bytes(cbor_val_address.to_bytes())
    .unwrap() //this is line that panics
    .to_bech32(None)
    .unwrap();

To
let address = cml::address::Address::from_bytes(cbor_val_address.as_bytes(),unwrap())
    .unwrap() //doesn't panic now - assuming correct COSESign1 headers
    .to_bech32(None)
    .unwrap();


Allow ANSI codes to be disabled for syslog.

If you can make:
hasp_debug.cpp:29 publicly mutable then rsyslog output can disable the ansi codes.  These codes seem to confuse rsyslog.

Thanks for reporting! I've added a checkbox for the ANSI codes to the Debug Settings.

I've added the option to v0.7.0-dev test build which is available from the Actions tab. Could you test it please and report if this fixes your issue?

Better, the ansi is now fixed.  It seems the syslog format is malformed.  let me investigate, i am using rsyslog on debian here.

Okay thank you. That would not surprise me... I've minimally tested this feature using Visual Syslog Server, so any feedback to improve compatibility/compliance will be greatly appreciated.

I was looking at the logging code.  Would you have an issue if I removed the internal version of Arduino-Log (thijse/ArduinoLog) and used the version from platformio?  I was looking at nomis/uuid-syslog but it uses its own logging system that looks pretty new and not used outside of his projects.  Syslog is a handy format for network devices, but the protocol is twitchy as hell once structured text is in play.   How big of a PR would you be willing to entertain if it ends up touching a few files?

The Arduino-Log (thijse/ArduinoLog) used in openHASP is a modified version of the library to be able to log the same message to different streams (Telnet, Console & syslog) at once. So, a remove/replace with the official code will certainly break things. It's not a very big modification, so I could probably backport if the new version has other advantages.
The syslog code I use is based on the ArduinoLog flow, so that it can act as a sort of serial port. If I remember correctly, it was based on this video.

Better, the ansi is now fixed. It seems the syslog format is malformed. let me investigate, i am using rsyslog on debian here.

If the ANSI is OK, I think we can close this issue. For malformed syslog messages, we can open a new one if needed.


Add integration steps to CONTRIBUTING.md

Add the integration test step entry to CONTRIBUTING.md.
Update PULL_REQUEST_TEMPLATE.md to suggest running Integration Tests and remove Changelog entry.

This will close the Changelog entry issue in the PR Template by removing it.


[WIP] Added code examples

Many thanks for submitting your Pull Request :heart:!
What this PR does / why we need it:
Added a tabbed panel for code samples.
Closes #203
Special notes for reviewers:
At the moment of opening this PR, it's still very rough. It's a demonstration of what could be done with little effort. The style could probably be improved, and content need to be decided.
Few technical notes:

'blocks' sections ({{% /blocks/section %}}) can't be used, they create a bug with the tabpane making it unusable. I relied on the HTML counter part instead. Unfortunately, this implies that future updates of Docsy or its theme could result in a broken layout (due to class updates for instance).
Indentation inside the HTML block should not be respected. The MD should start straight with no indentation otherwise it's not processed.
e.g.:
Doesn't work (the MD of the code blocks is not processed):

        {{< tabpane text=true right=true >}}
          {{% tab header="**Examples**:" disabled=true /%}}
          {{% tab header="Minimal" lang="minimal" %}}
          ```yaml
          document:
            dsl: 1.0.0-alpha1
            namespace: examples
            name: call-http-shorthand-endpoint
            version: 1.0.0-alpha1
          do:
            - getPet:
                call: http
                with:
                  method: get
                  endpoint: https://petstore.swagger.io/v2/pet/{petId}
          ```
          {{% /tab %}}
          {{% tab header="Async API" lang="asyncapi" %}}
          ```yaml
          document:
            dsl: 1.0.0-alpha1
            namespace: examples
            name: bearer-auth
            version: 1.0.0-alpha1
          do:
            - findPet:
                call: asyncapi
                with:
                  document:
                    uri: https://fake.com/docs/asyncapi.json
                  operationRef: findPetsByStatus
                  server: staging
                  message: getPetByStatusQuery
                  binding: http
                  payload:
                    petId: ${ .pet.id }
                  authentication:
                    bearer:
                      token: ${ .token }
          ```
          {{% /tab %}}
        {{< /tabpane >}}

Additional information (if needed):
Preview:

@JBBianchi to me this looks really good already. What do you need to move forward? Content?

@JBBianchi to me this looks really good already. What do you need to move forward? Content?

Content and probably improve the style a bit. It's a bit rough on the edges now.


Internal server error - Object(...) is not a function on page load

Environment

Operating System: Linux
Node Version:     v14.17.3
Nuxt Version:     2.16.0-27296655.ab1c6cb4
Package Manager<EMAIL_ADDRESS>Bundler:          Webpack
User Config:      bridge, head, css, plugins, components, buildModules, modules, i18n, axios, auth, strapi, build, publicRuntimeConfig, privateRuntimeConfig
Runtime Modules<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>Build Modules<EMAIL_ADDRESS><EMAIL_ADDRESS>
Reproduction
Github repo (nuxt-3-bridge branch)
https://github.com/kadlinobit/djspot-fe/tree/nuxt-3-bridge
Describe the bug
When nuxt server is starting, there is a warning message:
 in ./.nuxt/runtime.app.plugin.75f1febc.mjs
"export 'createHooks' was not found in 'hookable'

Nuxt starts, but when I try to load homepage, I get this error:
Object(...) is not a function
  at module.exports../.nuxt/runtime.app.plugin.75f1febc.mjs.__webpack_exports__.default (./.nuxt/dist/server/server.js:5378:79)
  at createApp (./.nuxt/dist/server/server.js:2868:105)
  at async module.exports../.nuxt/server.js.__webpack_exports__.default (./.nuxt/dist/server/server.js:5547:7)
  at async renderToString (file://./node_modules/vue-bundle-renderer/dist/index.mjs:254:19)
  at async renderMiddleware (file://./.nuxt/nitro/index.mjs:186:20)
  at async handle (file://./node_modules/h3/dist/index.mjs:598:19)

Additional context
No response
Logs
No response

yarn add --dev hookable  doesn't work here。same problem with :
    "@nuxt/bridge": "npm<EMAIL_ADDRESS>    "@nuxt/kit": "npm<EMAIL_ADDRESS>

If yarn add --dev hookable doesn't fix it for you, it could be a good idea to check nuxt/nuxt#5661 (possibly related).


fix: adjust to allow close on click outside

This PR

replace overlay with underlay to populate underlay container
creates overlay style to use in overlay container
add pointerEvent behaviors to fix bug not allowing to close on click outside

Ref #435

fixed @luizstacio could you check again ? ty


Reductions use int for 'num_items'

When performing reductions on large datasets, this is an issue.
inner_product.h correctly assumes
typedef typename iterator_traits<InputIt1>::difference_type size_type;
size_type num_items = static_cast<size_type>(thrust::distance(first1, last1));

however, the signature of cub::DeviceReduce::Reduce looks like this:
    static cudaError_t Reduce(
//...
        InputIteratorT              d_in,                               ///< [in] Pointer to the input sequence of data items
        OutputIteratorT             d_out,                              ///< [out] Pointer to the output aggregate
        int                         num_items,                          ///< [in] Total number of input items (i.e., length of \p d_in)
        ReductionOpT                reduction_op,                       ///< [in] Binary reduction functor
//...

This problem is present in the version shipped with CUDA 9.2.
Relevant file:
https://github.com/thrust/thrust/blob/master/thrust/system/cuda/detail/cub/device/device_reduce.cuh
Reproduction:
#include <thrust/reduce.h>
#include <thrust/execution_policy.h>
#include <thrust/iterator/constant_iterator.h>
#include <iostream>
#include <limits>

int main()
{
    long long result = thrust::reduce(thrust::host, thrust::make_constant_iterator(1, static_cast<long long>(0)), thrust::make_constant_iterator(1, static_cast<long long>(std::numeric_limits<int>::max()))
        , static_cast<long long>(0), thrust::plus<long long>());
    long long result_overflow = thrust::reduce(thrust::host, thrust::make_constant_iterator(1, static_cast<long long>(0)), thrust::make_constant_iterator(1, static_cast<long long>(std::numeric_limits<int>::max())+1)
        , static_cast<long long>(0), thrust::plus<long long>());
    std::cout << "Int max Result: " << result << std::endl;
    std::cout << "Overflow Result: " << result_overflow << std::endl;
}

Was my mistake.


sapnwrfc 1.3.0 php 7.3.8 - Connection Issues?

Hi @gkralik,
first of all thank you for your superb work!
Now to our problem:
We are using the compiled NTS version attached to your latest release from February.
Our script looks like this:
`
if (extension_loaded('sapnwrfc')) {
$config = array();
$config['ashost'] = 'HOSTNAME';
$config['sysnr'] = '51';
$config['client'] = '500';
$config['user'] = $user;
$config['passwd'] = $pwd;
$config['trace'] = SAPNWRFC\Connection::TRACE_LEVEL_OFF;
    try {
        //new RemoteFunction();
        $c = new SAPNWRFC\Connection($config);
        /*        $func_vals = array();
                $func_vals['START_VALUE'] = 0;
                $func_vals['COUNTER'] = 1;
                $f = $c->getFunction('STFC_CHANGING');
                $result = $f->invoke($func_vals);*/

//$r->error = var_dump($result);
/*
* array(2) {
*   ["COUNTER"]=>
*   int(2)
*   ["RESULT"]=>
*   int(1)
*   }
*/
} catch (Error $ex) {
$r->success = false;
$r->error = 'Exception: ' . $ex->getMessage();
} catch (Exception $err) {
$r->success = false;
$r->error = 'Exception: ' . $err->getMessage();
}
} else {
$r->error = "sapnwrfc ist nicht geladen!!!!";
}
$_SESSION['Benutzer'] = $user;
$r->success = true;
}`
Everything in phpstorm looks fine - no warnings, no errors.
When we run our script nothing happens, except we are getting HTTP Error 500 - Internal Server Error.
No exception is caught by the script and we get no exceptions in the log files of the php server.
What could this mean?
Are we doing something wrong?
Would be nice to hear from you.
Thanks in advance and greetings from germany
Simon

Okay we forgot to copy the SAP SDK to the server. My bad. Sorry


Debugger unexpectedly pauses on exception that will be caught

For some reason I can only repro this from Dart Code, not from the command line/Observatory... However I don't believe there's anything obviously wrong in VS Code.
I'm running a small sample app on flutter-tester and it breaks at startup on this:

However if I go up the stack to OptionalMethodChannel.invokeMethod there is a catch statement that would catch this exception:

I've confirmed that exception pause mode is Unhandled:
[14:31:12]: ==> {"id":"5","method":"setExceptionPauseMode","params":{"isolateId":"isolates/1027928886","mode":"Unhandled"}}

Here are full logs from Flutter Run + Observatory:

flutter_run.txt
observatory.txt

@rmacnak-google @aam This seems like it might be the opposite problem to #16741 - could it be related to the fix?

@aam @devoncarew Anyone have ideas about this? On the surface it seems kinda serious but since nobody else appears to be reporting it, I'm not sure if there's something specific triggering it (I am using flutter-tester which is likely the cause of the exception, but I don't know if that would influence the actual behaviour seen).

@a-siva, I believe this is a regression in debugging related to the move to preview dart 2. To paraphrase the issue, we have break on exceptions set to break on uncaught exceptions. In the above issue, we see the VM breaking on a caught exception, regardless of the value of the setting. @DanTup believe that this was not the case a few weeks ago (he's also going to look at writing an integration test for this in flutter_tools).

@DanTup does this only happen in VSCode when running flutter apps? Do standalone dart apps in VSCode work fine? Have you seen this happening in this particular instance only or handled exceptions are treated as unhandled everywhere? Can you share the app(the smaller the better) that exhibits this behavior please?

@aam so far I've only seen it in VS Code and only in this instance. I tried to write an integration test for it this morning but could not repro. So, the only repro I currently have requires having VS Code and running its test. I will see if I can strip my Dart Code test down to a simple script that can be run, but it might take a little time.

@aam Aha, I repro'd outside of Dart Code :)

flutter create my_test_repro
cd my_test_repro
flutter run --start-paused -d flutter-tester
open Observatory in browser
Click on the Isolate, then main.dart
Set a breakpoint on return new Scaffold(
Go to the debugger and run continue
You'll hit the breakpoint, so continue again
run set break-on-exception Unhandled
Perform a hot reload by pressing r in the console where you ran flutter run
You'll hit the breakpoint, type continue

Now you'll hit the exception:

But if you go up to Frame 1, you'll see it's going to be caught - and in fact if you breakpoint on the return null then continue, it will be hit:

I'm using Flutter's master as of today. Let me know if you can't repro it like this.

Thanks @DanTup for the steps, but after ``You'll hit the breakpoint, type continueI am not gettingNow you'll hit the exception:```
Do you see this happening specifically after hot reload?

Yeah, I only see it after the reload in my tests (I test doing 0, 1 and 2 reloads and the first one passes so I don't think it's occurring without a reload).
Not sure why you're not hitting this! Are you using the test device (I don't think the plugin is missing for normal devices) and on macOS?

Ah, sorry, I missed -d flutter-tester. Yes, I got a breakpoint on the exception now.

If I try to repro this today, the process seems to terminate instead:
[{"event":"app.started","params":{"appId":"591634fe-aa6e-4d6a-9f85-9b791f04ad89"}}]
Lost connection to device.
[{"event":"app.stop","params":{"appId":"591634fe-aa6e-4d6a-9f85-9b791f04ad89"}}]

I don't know if this means something has changed relating to this, or if it's just crashing earlier than this used to happen.

Landed as part of https://dart-review.googlesource.com/c/sdk/+/66800, should be in flutter once dart rolls into engine, engine into flutter.

Should have landed in flutter.

Fix LGTM, thanks! :)

Just uninstall and debug again .It might work.


Feature request: I18n for parameters

In this case
    parameter :name, "Name of order", :required => true, :scope => :order
    parameter :paid, "If the order has been paid for", :required => true, :scope => :order
    parameter :email, "Email of user that placed the order", :scope => :order

more good to define parameter descriptions in localization files
    parameter :name, :required => true, :scope => :order
    parameter :paid, :required => true, :scope => :order
    parameter :email, :scope => :order

en:
  docs:
    order:
      name: "Name of order"
      paid: "If the order has been paid for"
      email: "Email of user that placed the order"

It will help to make specs more clear

I like this a lot. :+1:

:+1:


Recur task by prefering the current then next occurrence

⚠ Please check that this feature request hasn't been suggested before.

[X] I searched previous Ideas in Discussions didn't find any similar feature requests.
[X] I searched previous Issues didn't find any similar feature requests.

🔖 Feature description
There are two current options for recurring tasks. They are described here. In short, the choice is either to repeat relative to the original due date or the completion date. This request proposes using both based on whether the task is completed early or overdue as described:
A recurrence option to handle the following cases.

If early, calculate next due date wrt current due date.
If on day, calculate next due date wrt today (same as 1 or 2)
If overdue, calculate next due date wrt completion date.

Examples
Modified from @claremacrae in https://github.com/obsidian-tasks-group/obsidian-tasks/issues/1924#issuecomment-1529408752

every day from next

completion date
original due date
next due date

2022-05-17 (early)
2022-05-20
2022-05-21

2022-05-18 (early)
2022-05-20
2022-05-21

2022-05-19 (early)
2022-05-20
2022-05-21

2022-05-20
2022-05-20
2022-05-21

2022-05-21 (overdue)
2022-05-20
2022-05-22

2022-05-22 (overdue)
2022-05-20
2022-05-23

2022-05-23 (overdue)
2022-05-20
2022-05-24

every 4 days from next

completion date
original due date
next due date

2022-05-14 (early)
2022-05-20
2022-05-24

2022-05-15 (early)
2022-05-20
2022-05-24

2022-05-16 (early)
2022-05-20
2022-05-24

2022-05-17 (early)
2022-05-20
2022-05-24

2022-05-18 (early)
2022-05-20
2022-05-24

2022-05-19 (early)
2022-05-20
2022-05-24

2022-05-20
2022-05-20
2022-05-24

2022-05-21 (overdue)
2022-05-20
2022-05-25

2022-05-22 (overdue)
2022-05-20
2022-05-26

2022-05-23 (overdue)
2022-05-20
2022-05-27

2022-05-24 (overdue)
2022-05-20
2022-05-28

2022-05-25 (overdue)
2022-05-20
2022-05-29

2022-05-26 (overdue)
2022-05-20
2022-05-30

✔ Solution

Implement an option that handles recurrence based on the feature description above.
Pick a name for the feature.
Modify the documentation at Repeating a Task Based on the Original Due Date or the Completion Date

Name Possibilities

when overdue
keep next
stay next
from next
when next
keep new
stay new
from new
when new
keep current
stay current
from current
when current

I like the from next option the most. I like from so much that, I think from done would make a good alias for when done.
❓ Alternatives
No response
📝 Additional Context
No response

@rhhub What would be a real-world example scenario where this option would be needed?

It could be used for things of low priority like cleaning.

I am still struggling to see how the requested feature realistically helps with a cleaning task.
What kind of cleaning task needs the requested pattern, and why?

Consider this example, of something that needs doing every 3 days
And it doesn't matter whether I do it early or late...
Starting point
## current behaviour - with 'when done'

overdue:

- [ ] Every 3 days - overdue 🔁 every 3 days when done 📅 2024-07-02

due in future:

- [ ] Every 3 days - due in future 🔁 every 3 days when done 📅 2024-07-06

Which looks like this:

Current behaviour
When I complete the tasks on 2024-07-04 they become:
## current behaviour - with 'when done'

overdue:

- [x] Every 3 days - overdue 🔁 every 3 days when done 📅 2024-07-02 ✅ 2024-07-04
- [ ] Every 3 days - overdue 🔁 every 3 days when done 📅 2024-07-07

due in future:

- [x] Every 3 days - due in future 🔁 every 3 days when done 📅 2024-07-06 ✅ 2024-07-04
- [ ] Every 3 days - due in future 🔁 every 3 days when done 📅 2024-07-07

Which looks like this:

What kind of cleaning task would require:

If early, calculate next due date wrt current due date.


set several species buyers with transporter registration

As a fisherman I would like to be able to set several species buyers with transporter registration for the catch, to be chosen from on the day https://github.com/StAResComp/sifids/issues/6, https://github.com/StAResComp/sifids/issues/8

Must (note I think the word species was a typo here)

Trickier to do than #49; unlikely to make it into this project.