Short array syntax not allowed drives me nuts

I ask for a change to the standard and a simple setting to disable the error „Short array syntax is not allowed” in the meantime.
Solution:
I want to write the more readable and easier to understand for beginners square brackets [] to define arrays.

They are more readable, because the closing parenthesis "]" has meaning, while ")" means nothing, and one has to look for longer in the code.
They are easier on beginners because they are consistent. You access array data the same way you create it: $myarray = [ "dog" => "barks", "cat" => "meows" ]; and then $myarray[ "dog" ];.

And until it's changed I ask for someone to tell me how can I disable this one setting, because red dots in Sublime Text appear next to every single array declaration and it drives me and my co-workers crazy.
One last word. I am writing here only because I actually care about the coding standard. I could disable wpcs entirely.

Hello!
You can try disabling the warnings by following the instructions on this page. https://github.com/WordPress/WordPress-Coding-Standards/wiki/Whitelisting-code-which-flags-errors
In your case, you can disable errors for each specific line
$myarray = [ 'dog' => 'barks', 'cat' => 'meows' ]; // phpcs:ignore
$myarray = [ 'dog' => 'barks', 'cat' => 'meows' ]; // phpcs:ignore WordPress.Arrays.ArrayDeclarationSpacing, Generic.Arrays.DisallowShortArraySyntax

or, which is probably more correct, use the settings file https://github.com/WordPress/WordPress-Coding-Standards#using-a-custom-ruleset and indicate in it
<rule ref="WordPress-Extra">
	<exclude name="WordPress.Arrays.ArrayDeclarationSpacing"/>
	<exclude name="Generic.Arrays.DisallowShortArraySyntax"/>
</rule>

I don't have Sublime Text at hand to test it in, but it definitely works in PhpStorm.

Hello!
You can try disabling the warnings by following the instructions on this page. https://github.com/WordPress/WordPress-Coding-Standards/wiki/Whitelisting-code-which-flags-errors
In your case, you can disable errors for each specific line
$myarray = [ 'dog' => 'barks', 'cat' => 'meows' ]; // phpcs:ignore
$myarray = [ 'dog' => 'barks', 'cat' => 'meows' ]; // phpcs:ignore WordPress.Arrays.ArrayDeclarationSpacing, Generic.Arrays.DisallowShortArraySyntax

or, which is probably more correct, use the settings file https://github.com/WordPress/WordPress-Coding-Standards#using-a-custom-ruleset and indicate in it
<rule ref="WordPress-Extra">
	<exclude name="WordPress.Arrays.ArrayDeclarationSpacing"/>
	<exclude name="Generic.Arrays.DisallowShortArraySyntax"/>
</rule>

I don't have Sublime Text at hand to test it in, but it definitely works in PhpStorm.

I ask for a change to the standard

Your opinion is noted, but as opinions on short vs long arrays are deeply divided, the standard is unlikely to chance regarding this any time soon.
@dingo-d Already pointed you to the earlier discussions on this. Please add your voice there.

a simple setting to disable the error „Short array syntax is not allowed” in the meantime

That has always been available as it's a default PHPCS feature - any individual sniff or error message can be turned on or off.
On the command line:
phpcs ./folder-to-scan/ --standard=WordPress --exclude=Generic.Arrays.DisallowShortArraySyntax

Or in a custom ruleset:
<rule ref="WordPress">
    <exclude name="Generic.Arrays.DisallowShortArraySyntax"/>
</rule>

<!-- Optionally enforce short arrays: -->
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>

Refs:

https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#limiting-results-to-specific-sniffs
https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-Ruleset

I ask for a change to the standard

Your opinion is noted, but as opinions on short vs long arrays are deeply divided, the standard is unlikely to chance regarding this any time soon.
@dingo-d Already pointed you to the earlier discussions on this. Please add your voice there.

a simple setting to disable the error „Short array syntax is not allowed” in the meantime

That has always been available as it's a default PHPCS feature - any individual sniff or error message can be turned on or off.
On the command line:
phpcs ./folder-to-scan/ --standard=WordPress --exclude=Generic.Arrays.DisallowShortArraySyntax

Or in a custom ruleset:
<rule ref="WordPress">
    <exclude name="Generic.Arrays.DisallowShortArraySyntax"/>
</rule>

<!-- Optionally enforce short arrays: -->
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>

Refs:

https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#limiting-results-to-specific-sniffs
https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-Ruleset

Ok, not sure where should I leave my voice, I don't see any mention about this in my previous discussion.
I got it sorted, previously I was trying
<exclude name="WordPress.Arrays"/>
and it didn't work, now this works flawlessly:
<exclude name="Generic.Arrays.DisallowShortArraySyntax"/>
Also if someone is struggling with this in Sublime, you have to remove this from Linter settings:
"args": [
     "--standard=WordPress-Extra"
]

because it will strangely not look at the custom ruleset if there is a top level standard defined

Ok, not sure where should I leave my voice, I don't see any mention about this in my previous discussion.
I got it sorted, previously I was trying
<exclude name="WordPress.Arrays"/>
and it didn't work, now this works flawlessly:
<exclude name="Generic.Arrays.DisallowShortArraySyntax"/>
Also if someone is struggling with this in Sublime, you have to remove this from Linter settings:
"args": [
     "--standard=WordPress-Extra"
]

because it will strangely not look at the custom ruleset if there is a top level standard defined

I agree with @Micu22
I also noticed this Generic.Arrays.DisallowShortArraySyntax.Found just now, I was using old versions of wpcs and it didn't have this rule enforce.

Adding to @jrfnl, I got to exclude 'Universal.Arrays.DisallowShortArraySyntax' sniff to get rid of that error:
<rule ref="WordPress">
    <exclude name="Generic.Arrays.DisallowShortArraySyntax"/>
    <exclude name="Universal.Arrays.DisallowShortArraySyntax"/>
</rule>

<!-- Optionally enforce short arrays: -->
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>


Automatic WEBP support

currently lacking this feature. Requires to check Accept header and add proxy Vary back from thumbor.

Does it solve your issue  ? https://github.com/thumbor/thumbor/wiki/Configuration#auto_webp

@gmarchand looks like this is set via configuration file and not via filter in the url ?
Any way to change the configuration ?

We are testing a new update to support this request. Would anyone mind testing the following template and provide feedback if this is what you are looking for?
https://s3.amazonaws.com/solutions-test-reference/serverless-image-handler/latest/serverless-image-handler.template

Closing this issue based on v2.2 updates. Please reopen if this issue has not been fixed.

Hi,
I just deployed de V2 but still not receiving the WEBP version of the images:
https://d11zse77r5k9ca.cloudfront.net/fit-in/400x190/production/barradoce/item-images/00be3ccbd8c0d9ab7de52913cd2463d7.jpg
Even bypassing the CF
https://3otxnuds0b.execute-api.us-east-1.amazonaws.com/image/fit-in/400x190/production/barradoce/item-images/00be3ccbd8c0d9ab7de52913cd2463d7.jpg
Do i need to make any changes in the code after deploy it?
tnks


Bug rendering opacity on zoom in

A feature with opacity < 1 is rendered correctly when the zoom is out. But when I zoom in the feature is rendered with opacity = 1.

How can this be reproduced?

Try this example.

Related to https://github.com/CartoDB/renderer-prototype/issues/91
This is probably not a rendering problem, if you go to the example you've provided you can see that the number of features increae to two, therefore, the opacity doesn't change, two identical points are renderered. This is probably due to Maps API returning two points.


Dev 1.4.1 462 tfseparation

Description
This PR addresses issue #462 which main purpose involves removing all duplicated boilerplate within the tests dealing with identifying which version of Tensorflow is currently being ran and treating TF1 and TF2 as two separate frameworks. This means we can avail of all the pytest functionality we already created for managing frameworks
Fixes #462
Type of change
Please check all relevant options.

[X] Improvement (non-breaking)
[ ] Bug fix (non-breaking)
[ ] New feature (non-breaking)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

Checklist

[X] My code follows the style guidelines of this project
[X] I have performed a self-review of my own code
[X] I have commented my code
[X] I have made corresponding changes to the documentation
[X] My changes generate no new warnings
[X] I have added tests that prove my fix is effective or that my feature works
[X] New and existing unit tests pass locally with my changes

Removing this PR which has a compromised commit tree


Feat: Redirecting to the top of the page when click on logo in the footer section

Describe the feature
When user click on logo in the footer section, user will be redirected to the top of the page
Add ScreenShots

Record

[X] I agree to follow this project's Code of Conduct
[X] I'm a GSSOC'24 contributor
[X] I want to work on this issue

/assign @Suchitra-Sahoo

This is not required.


[flash_ctrl] Use comportable channels for alerts emanating from prim_flash

This is done to leverage the common DV infrastructure for alerts / standardized countermeasures. Further, increasing the level of standardization at the prim_flash interface will make it easier to develop new prim_flash wrappers in the future.
Addresses part of https://github.com/lowRISC/opentitan/issues/14472.
Signed-off-by: Michael Schaffner<EMAIL_ADDRESS>

looks good to me overall. I'll approve when it's out of draft state.

Ok the last force-push should fix the whitespace issues.
This should be good to go on the OS side.
I still need to fix up the foundry side, though.

@milesdai @a-will it looks like the cw310 tests job passed even though it didn't even start because of an error: https://dev.azure.com/lowrisc/opentitan/_build/results?buildId=92339&view=logs&j=be0b5a13-ded6-5a2a-3e48-80a10e7eef12&t=08da8d7b-39e7-587c-6104-066a15914f8d&l=81

But it looks like this not a new issue because the tests ran before the fix in b72b9ee54ed230074e07d271a450552b9885e183.


Tag v0.5.0 has .ipkg version 0.3.0

I'd expect it to have version 0.5.0. Have I misunderstood?

Hi, I had hit by this problem as well.
Currently, v0.5.0 is tagged on this commit:
https://github.com/stefan-hoeck/idris2-pretty-show/commit/52ea3e1c2723add900ed4ed5725260dcc3381da6
Actually, the package version is updated on this commit which is just one after the commit above:
https://github.com/stefan-hoeck/idris2-pretty-show/commit/4f6beeca0f1899bc8fcf2fe979ea293c00e466f8

Yes, I see the issue now. I think I just add a new v0.5.1 tag with the correct version in the .ipkg file.

That sounds reasonable.
Could you do that?

Thanks. Then I'm closing this.

It's working for me, too.
Thanks.


Add more pod metadata by default for filtering

Motivation
In order to filter all events for a newly deployed Helm Chart, I want to have additional output_fields available.
Feature
I would like to see the following metadata attached:

pod labels
container name

Alternatives
None considered since I didn't find documentation how to add this information through custom rules.

ei thank you for reporting!

container name

This should be available as container.name -> https://falco.org/docs/reference/rules/supported-fields/#field-class-container

pod labels

For this one we should double check with @alacuku if can be easily extracted without extra overhead in the new k8s client

Hi @enote-kane, if you need more fields to be outputted in the default rules the only way would be to patch the rules and add them. Please have a look here:

https://falco.org/docs/rules/appending/
https://falco.org/blog/gitops-your-falco-rules/

In addition, please check out the latest official docs to understand the placeholder %container.info in the upstream rules
https://falco.org/docs/rules/style-guide/
https://falco.org/docs/outputs/formatting/
And as Andrea pointed out we expose many fields for container and k8s. Many of the k8s fields are extracted from the container runtime.
https://falco.org/docs/reference/rules/supported-fields/#field-class-container
https://falco.org/docs/reference/rules/supported-fields/#field-class-k8s

@alacuku @incertum  Thanx for the info, but none of it talks about whether (and how) I can make use of those fields for example in the output_fields map (they only talk about how to use them for the output message). Since I don't see any other field in the rules that could be used for that. The default rules do not seem to specify any and it appears it will produce "default" output_fields.
My actual goal here would be to easily filter in the web UI for all events related to service nginx-ingress-controller.
So referring to the docs, the only example I see is the one for JSON log format: https://falco.org/docs/outputs/channels/
{
    "hostname": "falco-xczjd",
    "output": "13:44:05.478445995: Critical A shell was spawned in a container with an attached terminal (user=root user_loginuid=-1 k8s.ns=default k8s.pod=kubecon container=ee97d9c4186f shell=sh parent=runc cmdline=sh -c clear; (bash || ash || sh) terminal=34816 container_id=ee97d9c4186f image=docker.io/library/alpine)",
    "priority": "Critical",
    "rule": "Terminal shell in container",
    "source": "syscall",
    "tags": [
        "container",
        "mitre_execution",
        "shell"
    ],
    "time": "2023-05-25T13:44:05.478445995Z",
    "output_fields": {  <<< add custom entries here per rule?
        "container.id": "ee97d9c4186f",
        "container.image.repository": "docker.io/library/alpine",
        "evt.time":<PHONE_NUMBER>478445995,
        "k8s.ns.name": "default",
        "k8s.pod.name": "kubecon",
        "proc.cmdline": "sh -c clear; (bash || ash || sh)",
        "proc.name": "sh",
        "proc.pname": "runc",
        "proc.tty": 34816,
        "user.loginuid": -1,
        "user.name": "root"
    }
}

So how exactly do I adjust a rule to get a custom entry in that above output_fields object?

Here are a few clarifying questions:

What field(s) do you want per rule? <<< add custom entries here per rule? Is it an existing field listed on the site you want? https://falco.org/docs/reference/rules/supported-fields/ In that case simple add the field(s) you want to the output yaml property. You can do that manually (add the filed with the % preceding the field name) or use the append feature as @alacuku mentioned which however will be reworked in future releases

output: System user ran an interactive command (pod_labels=%k8s.pod.labels evt_type=%evt.type user=%user.name user_uid=%user.uid user_loginuid=%user.loginuid process=%proc.name proc_exepath=%proc.exepath parent=%proc.pname command=%proc.cmdline terminal=%proc.tty exe_flags=%evt.arg.flags %container.info)

Or do you want a complete new field not listed on the site? In that case the Falco libs source would need to be patched to feature this new field

@incertum Thanx for the additional questions.
OK, so does Falco scan the output field message template and add any %... keys to the output_fields map? If that's the case, then I think I should be good (never tried it).
In that case, I am wondering whether Falco will make sure that supported field k8s.svc.name will be made available to events that originate from pods what are part of the service (through their endpoints).
I would have the use-case of defining a new output_field key, but so far more in the sense of renaming an supported field (e.g. k8s.svc.name → service_name).
In the future, I would also like to add completely custom fields based on other labels, e.g. add output field zone, defined as the value of label topology.kubernetes.io/zone from the node where the pod is running at. As other tools also add custom labels, having an option to add fields (not only in the output, but also usable for the rule itself) would greatly increase flexibility of Falco, depending on the specific setup of a cluster.
Documentation is not clear at all how the output_fields map is generated. I just assume that this is used to generate the potential columns/fields in the UI as well. If this assumption is wrong, then please correct me.

OK, so does Falco scan the output field message template and add any %... keys to the output_fields map? If that's the case, then I think I should be good (never tried it).

Yes curious if you have time to read all of the Falco rules documentation, how can we make this more clear? https://falco.org/docs/rules/

In that case, I am wondering whether Falco will make sure that supported field k8s.svc.name will be made available to events that originate from pods what are part of the service (through their endpoints).

Same question, how can we make docs clearer https://falco.org/docs/reference/rules/supported-fields/#field-class-k8s
Kubernetes related context. When configured to fetch from the API server, all fields are available. Otherwise, only the k8s.pod.* and k8s.ns.name fields are populated with data gathered from the container runtime.

Suggest reading also all relevant sections around that in https://github.com/falcosecurity/falco/blob/master/falco.yaml and the cmd args help prints

In the future, I would also like to add completely custom fields based on other labels, e.g. add output field zone, defined as the value of label topology.kubernetes.io/zone from the node where the pod is running at. As other tools also add custom labels, having an option to add fields (not only in the output, but also usable for the rule itself) would greatly increase flexibility of Falco, depending on the specific setup of a cluster.

We have had similar requests, meanwhile please use evt.hostname (read desc in the output fields page), it should contain cluster name when set to the right kube node information and you can customize it through setting the FALCO_HOSTNAME env to what you want on each host.
User defined completely custom fields are not on the roadmap, perhaps open a new feature request for that?

Thank you @enote-kane. I have created a follow up ticket in the falco website repo. We will try our best to further improve docs.


contour overlay

Something I was never able to get working with HippoMaps/BrainSpace's VTK plotting is adding contours as an overlay. This would be good for showing subfield outlines on a map, or for highlighting statistically significant areas. I'll look into this later, but I wanted to suggest it as a feature so we don't forget

Yes thats a useful one, could use the approach taken here: https://nilearn.github.io/dev/modules/generated/nilearn.plotting.plot_surf_contours.html#nilearn.plotting.plot_surf_contours


Fix #1887: Fix HTML runners of the test suite in fullOpt.

Some tests must be disabled in fullOpt mode. From sbt, they are disabled by Jasmine tags, but in the HTML runners, the appropriate tags were not set. This commit fixes this.

Review by @nicolasstucki

Refer to this link for build results (access rights to CI server needed):
https://scala-webapps.epfl.ch/jenkins/job/scalajs-pr/2658/
https://scala-webapps.epfl.ch/jenkins/job/scalajs-matrix-build/3432/
Test PASSed.

LGTM


[Algoritmo] Implementar Ant Colony

Pasta src/ant

Material:
Ant colony optimization algorithms Wikipedia
Ant Colony Optimization: Artificial Ants as a Computational Intelligence Technique - Dorigo
Ant Colony Optimization - Yaseen
Ant Colony Optimization: Overview and Recent Advances - Dorigo
Ant colonies for the travelling salesman problem - Dorigo


improved and standardised spelling

This is a revised version of the pull requests #12299 where US/UK discrepancies are left out. The changes affect only documentation files (.pod, .pod.in, .md)
CLA: trivial

Checklist

[x ] documentation is added or updated

In case you are wondering why the cla-check is still failing:  You placed the CLA: trivial tag in the subject line of the commit message
fixed typos and repeated words CLA: trivial

but the CLA bot expects it to be in the body of the commit message, which needs to be separated from the title by an empty line, like this:
Fixed typos and repeated words

CLA: trivial

But don't worry, I can fix that when the commits get merged.
For the records: I agree that  it's a (legally) trivial change.

@mspncp could you also backport the relevant ones to 1.1.1?
Assuming your feedback is addressed, my approval would stand for both master and 1.1.1 (assuming the backport is going to be clean or as trivial as name files changes/dropped changes for missing functions).

Thanks @gustafn for this contribution, it's always nice to have documentation improvements!

All changes are addressed. Should I make a separate pull request for branch "OpenSSL_1_1_1-stable"?
There are many similar spelling inconsistencies in the source code. Is there some interest to reduce these as well, or is the overall opinion that this makes tracking of substantial changes more complex?

All changes are addressed. Should I make a separate pull request for branch "OpenSSL_1_1_1-stable"?

Thanks for the offer. I would suggest that you wait a little bit until this pull request has the required two approvals. After that, I would attempt a simple cherry-pick and if that succeeds without, no separate pull requests would be necessary. If not, I would ping you and kindly ask you for the separate pull request.

There are many similar spelling inconsistencies in the source code. Is there some interest to reduce these as well, or is the overall opinion that this makes tracking of substantial changes more complex?

Since your changes affect mostly the documentation and not the source code, and since 1.1.1 is an LTS version,  I think it's worth doing it.

LGTM. If you don't mind i would like to squash the three commits, using your initial commit message (in present tense and with a capital letter at the beginning). Is that ok for you?

If not, feel free to propose your preferred wording.
P.S: I attempted a cherry-pick to OpenSSL_1_1_1-stable, it failed miserably (47 conflicting files).

When it touches more than 100 files do you still consider this to be trivial?

Not trivially to do (if you script it), but trivially in a legal sense, because correcting spell errors does not add any copyrightable value IMO. But of course, IANAL.

From my point of view, squashing theses commits is the right thing. I see that present tense is the usual convention in OpenSSL, so please go ahead with this.
Cherry picking a high number of changes can be a pain, several things have changed, so let me know, whether you prefer a separate pull requests for OpenSSL_1_1_1-stable.
Would you prefer spelling changes on source on the master branch or on 1.1.1? Working though the source code files is a larger project, this will take some time.

From my point of view, squashing theses commits is the right thing. I see that present tense is the usual convention in OpenSSL, so please go ahead with this.

Ok, I'll do that. Your pull request has the necessary number of approvals, but the 24h grace period has not expired yet. So I'll squash and merge it tomorrow.

Cherry picking a high number of changes can be a pain, several things have changed, so let me know, whether you prefer a separate pull requests for OpenSSL_1_1_1-stable.

Yes please, go ahead and raise a separate pull request against OpenSSL_1_1_1-stable. When you are ready, just post it's number here in this thread (e.g.,  See #xxxxx ) to draw my attention to it.

Would you prefer spelling changes on source on the master branch or on 1.1.1? Working though the source code files is a larger project, this will take some time.

We also appreciate spelling corrections in the source code. Corrections in comments are no problem at all, and the same holds for corrections of internal function or variable names in most cases. But of course, misspellings in the public API require special treatment (like deprecation of the old name) for compatibility reasons.

24 hours has passed since 'approval: done' was set, but as this PR has been updated in that time the label 'approval: ready to merge' is not being automatically set.  Please review the updates and set the label manually.

The backport of this pull request for OpenSSL_1_1_1-stable is now on Github:
https://github.com/openssl/openssl/pull/12370

Merged to master in 8c1cbc72105ffd493b48e65f8f5fd3657dedb28c. Thank you @gustafn!


Migrate e2e tests to vitest

@zelalemyetsedaw could you take a look at the CI issues? Thanks!

@zelalemyetsedaw could you take a look at the CI issues? Thanks!

i fixed it


Logging to file with slog_scope::set_global_logger doesn't work well in multithreaded environment

I set up global scoped logger to file in test function. Then I log there and check that logged message is present in file after log guard dies.
From time to time, different tests fail.
test.rs:
...
fn setup_logging(test_name: &str, log_name: &str) -> (slog::Logger, PathBuf) {
    DirBuilder::new()
        .recursive(true)
        .create(format!("tests/workspace/{}", test_name))
        .unwrap();
    let log_path = PathBuf::from(format!("tests/workspace/{}/{}", test_name, log_name));
    let file = File::create(&log_path).unwrap();

    let decorator = slog_term::PlainSyncDecorator::new(file);
    let drain = slog_term::FullFormat::new(decorator).build().fuse();
    (slog::Logger::root(drain, o!()), log_path)
}

fn search_for_string_in_file(mut file: File, needle: &str) -> bool {
    let mut contents = String::new();
    file.read_to_string(&mut contents).unwrap();
    contents.contains(needle)
}

fn perform_test(test_name: &str) {
    let (log_global, log_global_path) = setup_logging(test_name, "log_global_output");

    {
        let _log_guard = slog_scope::set_global_logger(log_global);

        slog_scope::scope(&slog_scope::logger().new(slog_o!("scope" => "1")), || {
            slog_test::perform_scenario();
        });
    }

    let log_file = File::open(log_global_path).unwrap();
    // This assert fails from time to time
    assert!(search_for_string_in_file(log_file, "Foo dropping!"));
}

#[test]
fn test_1() {
    let test_name = "test_1";
    perform_test(test_name);
}
...

lib.rs:
#[macro_use]
extern crate slog;
#[macro_use]
extern crate slog_scope;

struct Foo {}

impl Foo {
    fn new() -> Self {
        info!("Foo creating!");
        Self {}
    }
}

impl Drop for Foo {
    fn drop(&mut self) {
        info!("Foo dropping!")
    }
}

pub fn perform_scenario() {
    let s = Foo::new();
}

Complete test project is here: https://github.com/mkpankov/slog_test
Example failed run:
± % ➜  RUST_TEST_THREADS=5 cargo test                                                                                !10119
    Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
     Running target/debug/deps/slog_test-429ead50722b04a9

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/test-38bee35988c4d3e2

running 5 tests
test test_2 ... ok
test test_1 ... ok
test test_3 ... ok
test test_5 ... ok
test test_4 ... FAILED

failures:

---- test_4 stdout ----
	thread 'test_4' panicked at 'assertion failed: search_for_string_in_file(log_file, "Foo dropping!")', tests/test.rs:44
note: Run with `RUST_BACKTRACE=1` for a backtrace.

failures:
    test_4

test result: FAILED. 4 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out

error: test failed, to rerun pass '--test test'
± % ➜  cat tests/workspace/test_4/log_global_output

± % ➜  ls -l tests/workspace/test_4/log_global_output
-rw-rw-r-- 1 mkpankov mkpankov 0 авг.  10 17:27 tests/workspace/test_4/log_global_output

I understand you don't recommend using slog_scope in libraries, but in this case location of slog_test::perform_scenario is irrelevant. It's there to model my project that has this problem, and my project is a program. lib.rs is there only for decomposition and testing.
I understand slog's scoped global logger is thread-global (not process-global), is that correct?
As tests are run in multiple threads by default, I suspect there's some kind of race condition. Running tests as RUST_TEST_THREADS=1 cargo test fixes the problem.

slog_scope::set_global_logger is a global resource. In every test you're performing, you're replacing it, and clearing it altogether when the test ends. Since all tests are run concurrently, this gives unpredictable behavoir.
From what I can see, just rely on the enclosing scope entirely.  slog_scope::scope does not require you to reuse the existing scope logger.
So instead:
        slog_scope::scope(&slog_scope::logger().new(slog_o!("scope" => "1")), || {
(...)

you can do:
        slog_scope::scope(log_global, || {
(...)

and ommit the let _log_guard = slog_scope::set_global_logger(log_global); entirely.
If for any reason you do require global logger set, make it via some form of reference counting or https://doc.rust-lang.org/std/sync/struct.Once.html

@dpc Thank you for thorough answer!
Your suggestion works for me.
However, allowing set_global_logger w/o unsafe surprises me. To me this looks a lot like static mut, which can't be written w/o unsafe or mutexes.
What do you think of making set_global_logger unsafe fn?

I'm glad it helped.
set_global_logger is using ArcCell underneath: https://github.com/slog-rs/scope/blob/master/lib.rs#L106 , which allows atomic swapping. Which means, your program can't get corrupted or crash no matter how you abuse set_global_logger. It is however suspectible to functional race condition - where you get non-deterministic runtime behavior. Such behavior is however outside of the meaning of unsafe.


Project > Goals > Ethno Art > Search > Previously created "EthnoArt goal" is not displayed when the user search with the same name

Roles: All
Describe the bug
Project > Goals > Ethno Art > Search > Previously created EthnoArt goal  is not displayed when the user search with the same name
Steps to Reproduce

Login as a root user
Create a project and open a project detail page
Add LanguageEngagement and click on the View Details
Click on the Add Goal button and create Ethno Art Goal
Search the same name in the Search Ethno Art textbox

Expected Result
Previously created EthnoArt goal  should be displayed when the user searches with the same name
Actual Result
Previously created EthnoArt goal  is not displayed when user search with the same name
See video -
https://user-images.githubusercontent.com/5212585/139798105-dd2d9437-1f66-452b-9fb3-925968f890f1.mp4
FYI: @ParkeBrown @michaelmarshall
cord-field# 8c104f2

Hi @daniel-leod @CarsonF
I've verified on the latest develop d8b9268 and it's working fine. Attaching a video for a reference. Thanks!
See video:
https://user-images.githubusercontent.com/5212585/140714762-03db3adf-3f30-4a9d-90bb-e2f413ccbcf3.mp4


gtk4: compute DPI properly when Xft options are not used

This is a port of 88105ee01863d3905ee926975b4ad92bdb961bcf to gtk4, it makes gtk4 respect the DisplaySize set in the monitor section of my xorg config, since I don't have Xft.dpi set.
built pwvucontrol on master on x86_64-linux (tested) and aarch64-linux (untested), built libadwaita on master on {aarch64,x86_64}-darwin

Things done

Built on platform(s)

[x] x86_64-linux
[x] aarch64-linux
[x] x86_64-darwin
[x] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/prs-ready-for-review/3032/4838

As discussed on Matrix the patch was rejected upstream.
I do not think Nixpkgs should become a graveyard for rejected patches, especially ones for compatibility with dead platforms.
According to https://gitlab.freedesktop.org/xorg/xserver/-/issues/509#note_133424, neither GTK or XOrg are the appropriate components to solve this anyway.

Okay, we discussed it in GTK Matrix channel and the conclusion is that this patch is broken, and the issue is actually caused by missing runtime dependencies.
GTK depends on XSettings manager to get the proper DPI on X server. For example, on GNOME this will be handled by gnome-settings-daemon. If you are rolling your own desktop environment, you will need something like https://wiki.archlinux.org/title/Xsettingsd.

Thanks for the response, the GTK matrix link wasn't working for me, but I got xsettingsd working
It still bugs me a little that gtk3 and gtk4 behaves differently in nixpkgs (because gtk3 has the patch), but I guess it might be a little too late to change gtk3's behavior


Add config for julia path

Currently julia lintserver is launched with command julia. Make a config to allow freedom to select your own julia.

This is done.


The details about your losses

I just wanna make sure, when training R-Net, after 500k iters, what's the specific number of your losses?

Photo loss drops to 0.11 and id loss drops to 0.3 respectively. landmark loss is around 4 after an sqrt operation.

Does the landmark loss need sqrt operation? In your paper, it's a squared l2 loss.

Yes, we use a squared L2 loss for training. Square roots are only used for a visualization purpose.

Got it, thank you


Added alphanumeric sorting.

Added alphanumeric sorting. Addresses #228.

Hi @derrickburns,
Thank you for your contribution! We really value the time you've taken to put this together.
Before we proceed with reviewing this pull request, please sign the Typesafe Contributors License Agreement:
http://www.typesafe.com/contribute/cla

Thinking about this more, why not use a simpler comparator that also would give us copyright assignment. We can make these simplifying assumptions I believe:

we don't care about sorting strings that only start with a digit in a special way, we only care about all-digits strings
we don't care about floating point or negative numbers or hex or other "weird" numbers containing nondigits
we don't care about locale-aware sort, String.compareTo is fine
we are happy to sort all all-digits strings to the front of the list, so all-digits strings can always be "less than" any other string, ensuring the transitive property holds

So in sketched pseudocode something like this I think is sufficient?
 int compare(String a, String b) {
    boolean aDigits = isAllDigits(a)
    boolean bDigits = isAllDigits(b)
    if (aDigits && bDigits) {
       return Integer.compare(Integer.parseInt(a), Integer.parseInt(b));
    } else if (aDigits) {
       return -1;
    } else if (bDigits) {
       return 1;
    } else {
       return a.compareTo(b);
    }
 }

That's a lot less code and we'd have copyright assignment. Since this is just for debugging rendering, no need to go overboard....

That's fine. It was faster me to find other working code than to write a new comparator from scratch.
Sent from my iPhone

On Jan 7, 2015, at 6:37 AM, Havoc Pennington<EMAIL_ADDRESS>wrote:
Thinking about this more, why not use a simpler comparator that also would give us copyright assignment. We can make these simplifying assumptions I believe:
we don't care about sorting strings that only start with a digit in a special way, we only care about all-digits strings
we don't care about floating point or negative numbers or hex or other "weird" numbers containing nondigits
we don't care about locale-aware sort, String.compareTo is fine
we are happy to sort all all-digits strings to the front of the list, so all-digits strings can always be "less than" any other string, ensuring the transitive property holds
So in sketched pseudocode something like this I think is sufficient?
int compare(String a, String b) {
boolean aDigits = isAllDigits(a)
boolean bDigits = isAllDigits(b)
if (aDigits && bDigits) {
return Integer.compare(Integer.parseInt(a), Integer.parseInt(b));
} else if (aDigits) {
return -1;
} else if (bDigits) {
return 1;
} else {
return a.compareTo(b);
}
}
That's a lot less code and we'd have copyright assignment. Since this is just for debugging rendering, no need to go overboard....
—
Reply to this email directly or view it on GitHub.

Hi @derrickburns,
Thank you for your contribution! We really value the time you've taken to put this together.
Before we proceed with reviewing this pull request, please sign the Typesafe Contributors License Agreement:
http://www.typesafe.com/contribute/cla

See #266 for current PR


cannot get through example

I've tried both Debian and Ubuntu on Windows11/WSL2 and with either freshly installed WSL2 container I cannot - for the life of me - get through the example.
Steps:
Spin up a fresh WSL2 Ubuntu or Debian environment on windows 11.
Install Python
sudo add-apt-repository ppa:deadsnakes/ppa && sudo apt update && sudo apt install python3.11

Install Docker
In WSL2 docker is exposed to the container by a HOST installation, so install Docker Desktop and enable WSL2 integration in the options. Nothing special here.
Provide a Mongo container
docker run --name mongodb -p 27017:27017 -d mongo

Clone the repo
git clone git@github.com:verikono/celi.git ~/celi

Step into the repo and edit the .env file
cd ~/celi && cp .env.example .env && vim .env

... apply your openAI key and save.
Create a virtual environment and activate it
python3 -m venv .venv
activate .venv/bin/activate

Install
pip install -e .

Test Installation
python -m celi_framework.main

I get;
2024-04-29 10:16:46,858 __main__ DEBUG - Starting CELI
2024-04-29 10:16:46,858 __main__ INFO - Tool config env. var is celi_framework/examples/wikipedia/example_config.json
2024-04-29 10:16:47,704 celi_framework.examples.wikipedia.index DEBUG - Ignore updates is set to True.  Using existing cache entry for https://en.wikipedia.org/wiki/Led_Zeppelin.
2024-04-29 10:16:47,704 celi_framework.examples.wikipedia.Index_cache DEBUG - ChromaDB index for CR-1876773ababf33b8 is at /home/bren/.cache/celi/index/chroma_db/CR-1876773ababf33b8, created at 2024-04-26 22:56:37.902210+00:00
2024-04-29 10:16:47,707 chromadb.telemetry.product.posthog INFO - Anonymized telemetry enabled. See                     https://docs.trychroma.com/telemetry for more information.
2024-04-29 10:16:47,755 celi_framework.examples.wikipedia.index INFO - Using cached index CR-1876773ababf33b8 for https://en.wikipedia.org/wiki/Led_Zeppelin.
2024-04-29 10:16:47,895 celi_framework.examples.wikipedia.index DEBUG - Ignore updates is set to True.  Using existing cache entry for https://en.wikipedia.org/wiki/Jonas_Brothers.
2024-04-29 10:16:47,896 celi_framework.examples.wikipedia.Index_cache DEBUG - ChromaDB index for R-77bfa7a7d14fc66f is at /home/bren/.cache/celi/index/chroma_db/R-77bfa7a7d14fc66f, created at 2024-04-26 22:57:34.252579+00:00
2024-04-29 10:16:47,897 chromadb.telemetry.product.posthog INFO - Anonymized telemetry enabled. See                     https://docs.trychroma.com/telemetry for more information.
2024-04-29 10:16:47,901 celi_framework.examples.wikipedia.index INFO - Using cached index R-77bfa7a7d14fc66f for https://en.wikipedia.org/wiki/Jonas_Brothers.
2024-04-29 10:16:47,926 app_logger DEBUG - Beginning document generation
2024-04-29 10:16:47,926 celi_framework.utils.codex INFO - Creating a new instance of MongoDBUtilitySingleton
2024-04-29 10:16:47,928 app_logger INFO - Sections (num) remaining after processing skip list: 0
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/bren/celi/celi_framework/main.py", line 168, in <module>
    run_celi(config)
  File "/home/bren/celi/celi_framework/core/runner.py", line 67, in run_celi
    process_runner = ProcessRunner(
                     ^^^^^^^^^^^^^^
  File "/home/bren/celi/celi_framework/core/processor.py", line 165, in __init__
    self.current_section = self.sections_to_be_completed[0]
                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range

@x3n0cr4735  - hit me up sometime today, its probably me and if so we can close this.

Thanks! Will get a suitable key and try again :)
On Mon, 29 Apr 2024, 1:01 pm David DeCaprio, @.***>
wrote:

The exceeding your current quota is due to your OpenAPI key. Maybe you are
just on a trial account?
You can ignore these errors - they indicate bad links on the original
wikipedia page:
ValueError: ('Error loading url:
http://www.band-shirt.com/2013/03/09/history-of-the-led-zeppelin-icarus-logo/.',
ReadTimeout(ReadTimeoutError("HTTPSConnectionPool(host='www.band-shirt.com',
port=443): Read timed out. (read timeout=10)")))
—
Reply to this email directly, view it on GitHub
https://github.com/x3n0cr4735/celi/issues/50#issuecomment-2083227605,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOHQZIPEPZKVESDMDYNQ7XTY7Z4HRAVCNFSM6AAAAABG6NZVC2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBTGIZDONRQGU
.
You are receiving this because you authored the thread.Message ID:
@.***>


replace EachList by ListIterator

Codecov Report

Merging #177 (55e7aa2) into main (08fb802) will decrease coverage by 0.11%.
The diff coverage is 89.20%.

@@            Coverage Diff             @@
##             main     #177      +/-   ##
==========================================
- Coverage   95.48%   95.37%   -0.12%
==========================================
  Files          19       20       +1
  Lines        6052     6095      +43
==========================================
+ Hits         5779     5813      +34
- Misses        228      233       +5
- Partials       45       49       +4

Impacted Files
Coverage Δ

solutions.go
97.14% <57.14%> (-2.86%)
:arrow_down:

engine/compound.go
98.94% <70.00%> (-1.06%)
:arrow_down:

interpreter.go
91.26% <83.33%> (-1.35%)
:arrow_down:

engine/builtin.go
92.87% <90.69%> (+0.02%)
:arrow_up:

engine/dcg.go
95.89% <100.00%> (+0.02%)
:arrow_up:

engine/iterator.go
100.00% <100.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 08fb802...55e7aa2. Read the comment docs.


Feature: Calculate geodesics on PolyData (#167)

Contributions from @supersubscript in #167

Added functionality for calculating geodesics on polydata

removed polydata smoothing

Added tests for geodesics on polydata

Codecov Report

Merging #170 into master will increase coverage by 0.01%.
The diff coverage is 92.3%.

@@            Coverage Diff             @@
##           master     #170      +/-   ##
==========================================
+ Coverage   87.64%   87.65%   +0.01%
==========================================
  Files          21       21
  Lines        5302     5315      +13
==========================================
+ Hits         4647     4659      +12
- Misses        655      656       +1

Impacted Files
Coverage Δ

vtki/pointset.py
89.85% <92.3%> (+0.04%)
: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 49e301a...38f5c48. Read the comment docs.

Thanks for your contribution, @supersubscript!
Be sure to check out the example and perhaps modify it if you have more impressive data! (if you do have a better dataset, we could add it the vtk-data repository (https://github.com/vtkiorg/vtk-data) so that users can download it as an example)


6.0 Feedback:  Opentrons app says protocol was made in pD 4.0 when it wasnt

Overview
A protocol was mad in PD 5.2.6 but the app does not reflect tha

t
Current Behavior
App shows wrong version
Expected Behavior
App shows proper source
Steps To Reproduce

Make protocol on Protocol Designer 5.2.6
Upload to App 6.0.0
View protocol in app
Observe

Operating system
Mac
Robot setup or anything else?
No response

Regression from v5. New logic incorrectly uses the JSON Schema Version instead of the Protocol Designer version:
https://github.com/Opentrons/opentrons/blob/192b8e2675b410d92a9ae92b8ae6fa0094e4d3a5/app/src/organisms/ProtocolDetails/index.tsx#L238-L249
See previous implementation for the correct logic:
https://github.com/Opentrons/opentrons/blob/31b8df583f23f79829e2e046b6db11c123acf4dc/app/src/redux/protocol/selectors.ts#L208-L228


Add ODL 7.6.1.beta release note

Add ODL 7.6.1.beta release note

Docs Build status updates of commit 49d9d20:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

Odata-docs/changelog/odatalib-7x.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


README.md files

Fixes #34

Oh, no need to explain in the README files the code in the scripts! Could you please delete all code in the README files?

Could you please finalize this one @akhoubani ?

Thanks @akhoubani !


Got error prompt while introducing mini-batch into HopSkipJump

Hello,
I am working on utilizing mini-batch in adv generation by HopSkipJump for taking advantage of GPU, as recommened in issue #1088.
After loading multiple images into an numpy array with shape of (8, 256, 256, 3)
    for name in image_names:
        image = Image.open(os.path.join(image_path, name))
        image = image.convert('RGB')
        image = image.resize((256, 256), Image.ANTIALIAS)
        if 'image_array' not in vars():
            image_array = np.array([np.array(image, dtype='float32')])
        else:
            image_array = np.append(image_array, np.array([np.array(image, dtype='float32')]), axis=0)

I utilize the similar code for HopSkipJump adv generation as introduced in  https://github.com/Trusted-AI/adversarial-robustness-toolbox/blob/main/notebooks/classifier_blackbox.ipynb
        classifier = BlackBoxClassifier(predicts_to_onehot, image_array[0].shape, 1000, clip_values=(0, 255))

        # Generate HopSkipJump attack against black box classifier
        attack = HopSkipJump(classifier=classifier, targeted=False, max_iter=0, max_eval=1000, init_eval=10)
        iter_step = 50
        x_adv = None
        for i in range(5):
            x_adv = attack.generate(x=image_array, x_adv_init=x_adv)

            attack.max_iter = iter_step
            print("Total number of predict() has been called: ", ADV_COUNTER)

At the same time, implementing predict_one_hot() as following (ResNet model has already been put on the same GPU)
def classify(img: Image) -> torch.tensor:
    img_t = preprocess(img).to(DEVICE)
    batch_t = torch.unsqueeze(img_t, 0)
    resnet.eval()
    output = resnet(batch_t)
    return output

def logits_to_onehot(y: np.array) -> np.array:
    _, index = torch.max(torch.from_numpy(y), 1)
    one_hot = np.zeros(y.shape[1])
    one_hot[index] = 1
    return one_hot

def predict(x: np.array) -> np.array:
    img = Image.fromarray(x.astype(np.uint8))
    logits = classify(img)
    return logits.cpu().detach().numpy()

def predicts_to_onehot(x_array: np.array) -> np.array:
    one_hot = list()
    for x in x_array:
        logits = predict(x)
        one_hot.append(logits_to_onehot(x))
    one_hot_array = np.array(one_hot)
    return one_hot_array

Unfortunately, I got error message as following. So could you please give me some hints on how to solve it? Thanks very much!
Traceback (most recent call last):
File "/home/ranger/.pycharm_helpers/pydev/pydevd.py", line 1483, in _exec
pydev_imports.execfile(file, globals, locals)  # execute the script
File "/home/ranger/.pycharm_helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)python-BaseException
File "/home/ranger/lizhu/src/query_distance/sample/adv/generate_batches.py", line 63, in
batch_adv_generation.generate_adv_batch(args.method, args.folder, image_batch, classes, folders, args.debug)
File "/home/ranger/lizhu/src/query_distance/sample/adv/batch_adv_generation.py", line 177, in generate_adv_batch
x_adv = attack.generate(x=image_array, x_adv_init=x_adv)
File "/home/ranger/anaconda3/lib/python3.8/site-packages/art/attacks/attack.py", line 75, in replacement_function
return fdict[func_name](self, *args, **kwargs)
File "/home/ranger/anaconda3/lib/python3.8/site-packages/art/attacks/evasion/hop_skip_jump.py", line 154, in generate
preds = np.argmax(self.estimator.predict(x, batch_size=self.batch_size), axis=1)
File "/home/ranger/anaconda3/lib/python3.8/site-packages/art/estimators/classification/classifier.py", line 71, in replacement_function
return fdict[func_name](self, *args, **kwargs)
File "/home/ranger/anaconda3/lib/python3.8/site-packages/art/estimators/classification/blackbox.py", line 123, in predict
predictions[begin:end] = self._predict_fn(x_preprocessed[begin:end])
ValueError: could not broadcast input array from shape (8,256) into shape (8,1000)

Hi @cyber-ranger Thank you for using ART! Could you please check the shape of the output of method predicts_to_onehot?

Hi @beat-buesser ，
Thanks for hints. The error is due to I have mistakenly passed the image array instead of logits to logits_to_onehot() in predicts_one_hot().
But after I fixed the bug. I found out that after predict_one_hot() has been called on processing mini-batch images (e.g. the shape of x_array is (8, 256, 256, 3) for one time, it has been called many times to processing only one page (the shape of  inputing x_array is (1, 256, 256, 3)) after another.
Is this right? Shouldn't the algorithm processing all images in batch, not one by one?
Thanks again.

Hi @cyber-ranger
Great! Yes, HopSkipJump should work with mini-batches larger than 1 since ART 1.6.1. Which version of ART are you using?

Hi @beat-buesser ,
I am using version 1.6.1.
As I described in above, the adv generation has not been actually improved since HopSkipJump is not always processing the images in batch. So just checking with you if there is anything wrong here.
THX

Hi @cyber-ranger
I think HopSkipJump is doing the batching correctly. Your prediction method is applied to batches but inside of your method  the model is evaluated on single images by loping over the mini-batch, e.g. in predicts_to_onehot:
for x in x_array:
    logits = predict(x)
    one_hot.append(logits_to_onehot(x))

Instead, try something like
logits = predict(x_array)
one_hot = logits_to_onehot(logits)

Hello @beat-buesser ，
Thanks for helping.
I have modified the predict() to directly handling mini-batch as following,
def predict(x: np.array) -> np.array:
    tensor_batch = torch.empty(0).cuda(0)
    for idx, _ in enumerate(x):
        img = Image.fromarray(x[idx].astype(np.uint8))
        img_tensor = preprocess(img).to(DEVICE)
        tensor_batch = torch.cat((tensor_batch, torch.unsqueeze(img_tensor, 0)), dim=0)
    resnet.eval()
    logits = resnet(tensor_batch)
    return logits.cpu().detach().numpy()

But still found (like mentioned above) after predict_one_hot() has been called on processing mini-batch of images (the shape of x_array is (8, 256, 256, 3) for one time, it has been called many times to processing only one page (the shape of inputing x_array is (1, 256, 256, 3)) after another.
Just wondering if it is the way the algorithm should be?

Hi @cyber-ranger Could you please describe where and how do you observe the shape (1, 256, 256, 3)?

Hi @beat-buesser ，
My code is as above.
I preapare a mini-batch with 8 images in image_array, and set a breakpoint in predicts_to_onehot(). So the first time that predict_one_hot() has been called, the shape inputting parameter x_array is (8, 256, 256, 3). Then I traced the process to hop_skip_jump.py, line 199, following code call predict_one_hot() with input shape (1, 256, 256, 3)
                x_adv[ind] = self._perturb(
                    x=val,
                    y=-1,
                    y_p=preds[ind],
                    init_pred=init_preds[ind],
                    adv_init=x_adv_init[ind],
                    mask=mask[ind],
                    clip_min=clip_min,
                    clip_max=clip_max,
                )

Since this code is in the loop
for ind, val in enumerate(tqdm(x_adv, desc="HopSkipJump", disable=not self.verbose)):
It looks like only one image has been used for predict.

Hi @cyber-ranger That's correct, HopSkipJump attacks one image at a time, but for each attacked image it evaluates num_eval random samples around that attacked image as mini-batch of size batch_size. num_eval increasing as function of iteration and can become quite large, so large that processing all images with their randomly perturbed versions at once could likely run out of memory.  This evaluation happens in line 634 on dev_1.7.0 where samples contains num_eval randomly perturbed samples during the main compute call in line 599.


ecp_internal.h is not described in documentation

The ecp_internal.h file is not described in the doxygen generated API documentation

ARM Internal Ref: IOTSSL-1469

This header is excluded in [mbedtls.doxygen][https://github.com/ARMmbed/mbedtls/blob/development/doxygen/mbedtls.doxyfile#L707], on the basis that files with internal in their name are not supposed to be part of the public API. I wish we were more consistent in naming, it can be a bit confusing for users if some _internal.h are public and some others are not.

I understand, perhaps we should reconsider the way we support the ECP alternative implementation

Resolved by PR #965

@mpg It is useful to document the functions that must be implemented for alternative hardware implementations. Maybe we should have two different doxygen configurations, one for end-users and one for alternative implementers?

@gilles-peskine-arm I fully agree that it is useful to document those functions, and I agree with your fix in #965.
@RonEld I don't think we need to reconsider much, it's just the naming that is a bit sub-optimal, but we can't really change that now that it's published.

@mpg I see now that it wasn't a very good choice for the naming, and I really regret that we forgot about the semantic consequences when we were discussing it.

Hi @gilles-peskine-arm I have uploaded a kb article with guidelines for alternative implementations. I think that the article, with the existing API documentation should be sufficient.
@mpg I think that it is still not too late to change it, as:

It is in a branch that APIs could change
It is a new feature published, which I think it's still safe to change, I believe

Hi @gilles-peskine-arm , @mpg and @RonEld ,
When last week I saw this issue, then I thought that we made a terrible mistake with naming back then. But the more I think about it, the more convinced I am that this was intentional and it is good as it is.
I see that it would be nice and comfortable to link to online doxygen documentation from our How-To articles, but

No application or driver code should ever call these functions and they are not part of the public API
Since they are not part of the public API, their documentation shouldn't be in the online public API documentation
You are all right that we need to explain these functions in detail, but I think we should do it separately in the Knowledge Base and Handbook articles or maybe in a blogpost, but not in the public API

What do you think?

Hi @yanesca I think that since this file should be used by external users, implementing the alternative ecp module, I think it can't be declared internal, and although a KB article is good, I would expect this file to be explained in the regular API documentation (doxygen). The KB article explains guidelines, but will not explain what every API does.
Although it is not a public API, it is still externally used.


Pandoc export failed (Mac)

I'm getting the error message saying "Export failed" when prompting an export from the command palette:

I have installed Pandoc via the Mac installer.
I have installed the following via Homebrew: brew install librsvg python homebrew/cask/basictex
The Pandoc path seems to be ok (or at least I'm not getting an error message).
I have also installed MacTex to get LaTex even though I'm not sure if that was necessary.
Would really appreciate your help 🙏🏻

Worked on it a bit and got it to work. How it says:

I have the same issue.

fwiesbauer, I'm having the same issue, what did you do to get it to that point?

I installed the plugin but if I run command+P and I digit pandoc in the box it appears only the HTML export.
I installed Pandoc both via Homebrew and via pkg.
How can I solve?

I solved.
From the settings, it is necessary to set the path of pandoc and pdflatex


Consider providing a warning for an invalid keyfile

When creating a keyfile for a service account according to GoogleCloudPlatform/gcloud-node#elsewhere, it seems that the client_email and client_id fields are sometimes empty, even though (I think) they are both required to be the email address of the service account. Trying to use that credential with this module and Cloud Datastore or Cloud Storage will return an 'Invalid Grant' error when making requests.
This is just a suggestion (feel free to close-out as wont-fix) but it might be worth adding a warning from this module when those fields are missing / empty strings.

Thanks for the idea, and sorry for the delay in addressing it. Our auth goes through a few layers in many directions depending on the input received (keyfile vs credentials object/JSON key vs p12 key vs pem key, etc...), but after merging https://github.com/ryanseys/node-gtoken/issues/3, I think all of the holes are covered. If something is missing from any given auth input type, it should now be reported when something isn't provided before a Google API request is made.

:+1:


fix doc Tasks  code

Fix  doc Tasks code to make it workable

import broken/missing packages
use os.proc to run subprocess

Improve  Custom Tasks code by removing redundant placeholder _ in os.isFile and os.read.lines

Thanks @YingLiu4203 !


"login" or dry-run validity check for tokens

What's the problem this feature will solve?
Our project has to simultaneously publish docs, PyPI, conda, and npm packages. If one of those fails (e.g. because a token has expired) then it's a really bad day. So it's really ideal for us to be able to "test" all the credentials are valid up front, before actually really attempting any of the uploads.
Describe the solution you'd like
npm provides npm login and there is also an anaconda login Any reasonable way to peform a dry-run of an upload without actually doing the upload would be helpful to ensure that we don't get partway through a release before discovering a credentials problem.

I think the best way to do this is to implement #726.

I think to address this issue, we'd probably need to provide an API for testing credentials separate from #726, as it doesn't quite solve the problem of "once we built everything, our upload failed due to bad credentials, and we can't test credentials without trying to upload something".
Presumably once #726 is implemented, maintainers could attempt to upload some dummy release to test credentials, but this isn't as ideal as just providing an API for something like twine login.
However there is an additional complication to consider here (also discussed in https://github.com/pypa/twine/issues/355 and https://github.com/pypa/twine/issues/475) which is that the validity of API tokens depends on what's being uploaded along with them.

which is that the validity of API tokens depends on what's being uploaded along with them.

For sure, tho just from my own perspective, I am willing to own that risk (we have never run in to that particular problem, but we have definitely had botched releases due to a credential issue on just one account)

This might fall under #13409.


Fix issue-9, all tests pass

Try to fix #9
The fix is to use Eval() instead of EvalNode() to get the type of an expr.
To use Eval, we have to retrive the expression text of the rhs expr,
thus we pass grinder.EditBuffer to hasType() and retrive expression text by EditBuffer#TextAt.

Hi @xwb1989 I merged your code into jackspirou/grind so that I could run go get for grind on Go versions 1.4+.  Thanks for this patch!


Remove test UI code

moment assignment to the windows object is not needed

Coverage remained the same at 88.968% when pulling 736e311f133e30cf4fd2f9e08aa6e36f2cc59724 on cabhishek:remove_test_code into e3a0b6d0c29b6063b65f0cabf052e1a47af9af7c on Netflix:3.3.x.


Fix styling of Metadata popup

The order of the rows is not fixed and seems to be random.
Scroll bars do not look good.

As the content of the table is imported from the input JSON that contains an object with metadata, it will be difficult to fix the order. Not sure that is necessary.
What is the suggestion regarding the scrollbars?

Regarding the scrollbars: propose to fix the size of the table and use the scrollbars (only horizontal?) only for the cells where it is required (similar to report view table).


Could not get models from the server

My actions before raising this issue

[x ] Read/searched the docs
[x ] Searched past issues: I have checked all related issues

Expected Behaviour

I should see DL models in CVAT
Current Behaviour

After following the instructions, CVAT still cannot find any DL models.
Whenever I open CVAT, it shows an error message

Possible Solution

Not sure. Maybe I have missed something in installation?
Steps to Reproduce (for bugs)

Context

I want to use auto-segmentation for my segmentation tasks.
 No
Operating System and version (e.g. Linux, Windows, MacOS): Linux Ubuntu 20.04
Code example or link to GitHub repo or gist to reproduce problem:
Other diagnostic information / logs:
Some logs are in txt

error_dl_models.txt

Next steps
You may join our Gitter channel for community support.

@yanmu2017 Hi, I cannot see running nuclio container (the name is serverless) on 8070 port in the docker ps output. Did you include docker-compose.serverless.yml config file to the docker-compose command as described here: https://github.com/openvinotoolkit/cvat/tree/develop/components/serverless?

@azhavoro Thanks for the reply. Including the docker-compose command you mentioned solves the problem and I can see the models now.
One suggestion: Do you think it makes sense to include the docker-compose command docker-compose -f docker-compose.yml -f components/serverless/docker-compose.serverless.yml up -d" into the instruction of Semi-automatic and automatic annotation? Or at least a link to that webpage? For myself, I checked the instructions again and again but had never thought I should include another docker-compose command from a different webpage.

@azhavoro Thanks for the reply. Including the docker-compose command you mentioned solves the problem and I can see the models now.
One suggestion: Do you think it makes sense to include the docker-compose command docker-compose -f docker-compose.yml -f components/serverless/docker-compose.serverless.yml up -d" into the instruction of Semi-automatic and automatic annotation? Or at least a link to that webpage? For myself, I checked the instructions again and again but had never thought I should include another docker-compose command from a different webpage.

👍 I believe that need to update the installation guide and think it's better to add the both things: compose command and link to the serverless component. Could you please prepare the PR?

@yanmu2017 I run the command docker-compose -f docker-compose.yml -f components/serverless/docker-compose.serverless.yml up -d，but  cvat still cannot find any DL models.

I believe the issue was resolved. If somebody has another issue, need to create a separate bug request.

@nmanovic No No the problem didnt solve and still exists!!


updating for Uint8List

Does this trigger an SDK dependency change?

I guess not but I really don't know.
I have upgraded my mac to Catalina and I had to upgrade dart because of that.

I guess not but I really don't know.

Okay, a follow-up question: why do this change? Did you get an error somewhere?

Unhandled exception:
type '_StreamHandlerTransformer<List<int>, Frame>' is not a subtype of type 'StreamTransformer<Uint8List, Frame>' of 'streamTransformer'
#0      Stream.transform (dart:async/stream.dart)
#1      _FrameStreamTransformer.parseFrames (package:cassandart/src/frames.dart:82:18)

Okay, thanks! Do you want me to release this as a new version or do you have other changes in mind?

Nope, just to be able to use dart 2.5.
I should push an app to production in a day or two, if anything comes I will create another PR.

published 0.1.2


docs: fix link in core/README.md

Fix a reversed markdown link in core/README.md.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Thank you!


syscall/js: any way of accessing javascript list members?

What version of Go are you using (go version)?

go1.11.1 windows/amd64

Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
go env Output
set GOARCH=wasm
set GOBIN=
set GOCACHE=C:\Users\asodhi\AppData\Local\go-build
set GOEXE=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=js
set GOPATH=C:\Users\asodhi\go;C:\Git\newStitchGeneration\go;
set GOPROXY=
set GORACE=
set GOROOT=C:\Go
set GOTMPDIR=
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=0
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-fPIC -fmessage-length=0 -fdebug-prefix-map=C:\Users\asodhi\AppData\Local\Temp\go-build750770322=/tmp/go-build -gno-record-gcc-switches

What did you do?
For our use case, I am creating a wasm file from the golang project, the callback function is passed a list of integers.
JS code: test(immutable_1.List([1, 2, 3]));
GOLANG code:
func test(params []js.Value){
param0:= params[0]
len1 := param0.Length()
fmt.Println("param0: ", param0)
fmt.Println("len: ", len1)
}
the println prints:
param0:  List [ 1, 2, 3 ]
len: 0
Is there a way to access the list length and value at the indexes?
What did you expect to see?
I expected the list to behave like an array, the Length, and Index functions to work on it too
What did you see instead?
The array function not able to work on List

Works for me.
index.html

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>Go wasm</title>
</head>
<body>
	<button id="close">Shutdown app</button>

	<script src="wasm_loader.js"></script>
	<script>
		const go = new Go();
		let mod, inst;
		console.log("Initializing wasm...");
		WebAssembly.instantiateStreaming(
			fetch("main.wasm", {cache: 'no-cache'}), go.importObject).then((result) => {
			mod = result.module;
			inst = result.instance;
			console.log("Initialization complete.");
			run();
			test([1, 2, 3]);
		});

		async function run() {
			await go.run(inst);
		}
	</script>
</body>
</html>

main.go

// +build js,wasm

package main

import (
	"fmt"
	"syscall/js"
)

var console = js.Global().Get("console")

func main() {
	// Setup callbacks
	cb := js.NewCallback(func(i []js.Value) {
		fmt.Println(i[0])
		fmt.Println(i[0].Length())
		fmt.Println(i[0].Type())
		arr := i[0]
		fmt.Println(arr.Index(0))
	})
	js.Global().Set("test", cb)
	done := make(chan struct{})

	shutdownCb := js.NewEventCallback(js.PreventDefault, func(ev js.Value) {
		done <- struct{}{}
	})
	js.Global().Get("document").
		Call("getElementById", "close").
		Call("addEventListener", "click", shutdownCb)

	<-done
	console.Call("log", "Shutting down app")
	cb.Release()
	shutdownCb.Release()
}

Output -
Initializing wasm...
Initialization complete.
1,2,3
3
object
1

Attached the wasm_loader.js too.
Tested on FF63 and Chrome 69 in a Linux box.
wasm_loader.js.zip
I will close the issue now as I think the question has been adequately answered. We mainly track bugs here in the issue tracker. If you still face issues, I would request you to take a look at the Questions wiki page; it has a list of good places for asking questions.

hi @agnivade
This works with an array, the issue I am facing is a passing a list.
you explicitly called test([1, 2, 3]);  :- here [1,2,3] will be array, the code works with an array
, try with a List.
To create a list, I am using the immutable package.
And creating the list like: immutable.List([1, 2, 3])

I see. Yes, it will not work in that case because that list is not a browser native type, rather an object with its own set of methods. Effectively, to the browser, that is just a normal object and it has no idea that it is internally a list. Since that object does not behave like an array, so you will not get that behavior in Go.
>>ff = Immutable.List([1,2,3])
Object { size: 3, _origin: 0, _capacity: 3, _level: 5, _root: null, _tail: {…}, __ownerID: undefined, __hash: undefined, __altered: false }
>>ff.length
undefined
>>ff[0]
undefined

So, essentially you are getting the stringified representation of it which is "List [ 1, 2, 3 ]". An alternative which you can consider is passing the array version of that list to Go, after you are done with the list operations - list.toArray()


Scripts added via head in md/mdx not loaded during an internal link traversal

Have you read the Contributing Guidelines on issues?

[X] I have read the Contributing Guidelines on issues.

Prerequisites

[X] I'm using the latest version of Docusaurus.
[X] I have tried the npm run clear or yarn clear command.
[X] I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
[ ] I have tried creating a repro with https://new.docusaurus.io.
[X] I have read the console error message carefully (if applicable).

Description
Consider a per-page script that is loaded in an MD or MDX file, like
<head>
  <script type="text/javascript" src="https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js"></script>
</head>

This is correctly loaded when accessing the page directly, but is not loaded when the page is accessed by clicking an internal link.  Live codeblocks that work normally will fail in a redirect flow.
Reproducible demo
https://git.sheetjs.com/sheetjs/docs.sheetjs.com
Steps to reproduce
Reproduction in the SheetJS docs site

open https://docs.sheetjs.com/docs/demos/hosting/dropbox in your web browser and observe that both live codeblocks work.

in a new browser window, access https://docs.sheetjs.com/docs/demos/hosting/ then click on the "Dropbox" link.  Observe that the first codeblock fails with

ReferenceError: Dropbox is not defined

Simple reproduction in a new site

open a terminal window (tested in zsh) and navigate to a temp directory (typically /tmp on linux or macos systems)

create a new project:

npx create-docusaurus@latest my-website classic
cd my-website

set up theme-live-codeblock using the official instructions:

npm i --save @docusaurus/theme-live-codeblock
cat <<EOF >>docusaurus.config.js
if(typeof config.plugins == "undefined") config.plugins = [];
config.plugins.push("@docusaurus/theme-live-codeblock");
EOF

load script and add a live codeblock to a page:

cat <<EOF >> docs/tutorial-extras/manage-docs-versions.md

<head>
  <script type="text/javascript" src="https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js"></script>
</head>

\`\`\`jsx live
function XLSXVersion() {
  const [version, setVersion] = React.useState("");
  React.useEffect(() => { setVersion(XLSX.version); }, []);
  return <div>{version}</div>
}
\`\`\`
EOF

build site and serve:

npm run build
npm run serve

open a web browser and access http://localhost:3000/docs/tutorial-extras/manage-docs-versions .  Scroll down to the bottom of the page to confirm the live codeblock worked (the result should be 0.19.2)

open a new browser window and access http://localhost:3000/docs/category/tutorial---extras .   Scroll down and click on "Manage Docs Versions" in the page.  Scroll down and there will be a reference error in the live codeblock

ReferenceError: XLSX is not defined

Expected behavior
The script children in the head tag should be loaded during the internal link traversal.
Actual behavior
The link traversal does not load the scripts, as evidenced by the ReferenceError in the live codeblock and verified by visual inspection of the network pane of the devtools.
Your environment

Public source code: https://git.sheetjs.com/sheetjs/docs.sheetjs.com
Public site URL: https://docs.sheetjs.com/docs/demos/hosting/dropbox
Docusaurus version used: latest

Self-service

[ ] I'd be willing to fix this bug myself.

What happens:

On first load, the script tag gets loaded before React hydrates (that's how browsers work). React will only hydrate and make the live codeblock interactive once all the head scripts are loaded (unless you mark them as deferred)
On navigation, the script tag is added but the React app is already hydrated and the live code block runs the code before the script finished loading. Browsers do not block everything for scripts that are appended after the first page load: if you want to block/wait you have to use JavaScript. You'll notice that if you navigate backward and then forward again now it works.

When you add a <head><script> tag that way, Docusaurus is only using react-helmet-async and is just doing what you ask it to do, add a script tag to head.
It is a quite low-level, generic solution, and does not involve any script loading orchestration. So this is not a bug, it's just your integration is not a good solution.
I would suggest one of these solutions:

Don't use an external CDN URL, import a local JS file to make it part of the app page JS bundle. Docusaurus will load it before doing the page transition alongside the React code of that page
Load the script globally: less performant but simple and just works
Create your own preview system that waits for the appropriate scripts to be loaded before displaying the live previews.


Environment name in different env subcommands is either the last element of the path or a path relative to the root dir

There seems to be some inconsistency between different tk env subcommands around what is treated as the environment name. tk env add environments/jaeger/production will create spec.json with metadata.name: production, but tk env set environments/jaeger/production --server-from-context minikube will set it to metadata.name: environments/jaeger/production.
Should tk env add perhaps be switched to using a relative path for inferring the name of the namespace, something similar to https://github.com/grafana/tanka/blob/master/pkg/tanka/parse.go#L112 instead of cfg.Metadata.Name = filepath.Base(path) (https://github.com/grafana/tanka/blob/master/cmd/tk/env.go#L160 ) ?

Hi, good spot!
Yes, the code in pkg/tanka/parse.go is correct. The environment name shall be the relative path from the project root. Actually, the environment name is never read from the file, but inferred from the directory structure when loading the config.
Still it makes perfect sense to fix tk env add. Would you like to do that?

@sh0rez tried fixing it here: https://github.com/grafana/tanka/pull/404

Fixed in #404


refactor: replace api gateway with function url

Since the API Gateway only allows payloads up to 10MB it will be replaced with CloudFront + Lambda function url.
The terraform AWS provider must also be bumped to 4.9 or newer in-order to use the new lambda function url.

This is great - love how it cleans up all those API resources.  Just had a few comments but otherwise good stuff!


[Service Bus] Fix bug with receiver in receiveAndDeleteMode

For more context refer to #5757
Current change

fix the bug by making sure we increment credit 1 by 1 to get precise count of messages received
fixes the use of totalWaitTimer to apply for cases for when not receiving any messages, and not as a general operation timeout
current changes fixes correctness of feature, but may reflect performance regression and will need more investigation

cc: @AlexGhiondea @ramya-rao-a

fix the bug by making sure we increment credit 1 by 1 to get precise count of messages received

As you have already noted, this does have the chance of affecting the performance. A slower performance of the batching receiver can harm the user, especially if the earlier messages in the batch start expiring while we fetch the subsequent messages one by one.

fixes the use of totalWaitTimer to apply for cases for when not receiving any messages, and not as a general operation timeout

The totalWaitTimer is indeed meant for a general operation timeout. It uses the time provided by the user as an upper cap on the total amount of time we are expected to spend in running receiveMessages.

By resetting the totalWaitTimer for each message, the timer now behaves exactly the same as the _newMessageReceivedTimer.

The documentation says the timer is intended to use as wait time for receiving just the first message - this isn't true and will need to be fixed. Couple of observations -

The time to wait for new message seems configurable, but only by the SDK. Based on quality of network on user environments, it seems being able to configure this is valuable. In applications where the consumers are running and producers sending messages do so at certain time intervals, it seems all the more useful to have users allow their "wait times".
When I tried receiving 3000+ messages, it was annoying to have the receiver wait for 60 seconds and return just 80/100 messages or some other number arbitrarily. The experience was much smoother and better when all 3000 messages were received and deleted as one would expect with such a call. This required the mer message timeout to not be just 1 second and be 5 seconds/10 seconds (based on the wifi I connected to I think).
The general total wait time on operation, this can be offered as an additional option on end of which, we can end the operations and have users increase this time if they need to.

About performance, there might be value is separating this out as 'prefetch' / 'maxConcurrentCalls' configuration and not tie it to the credit window on the buffer. More investigation is needed if it is even practical to guarantee correctness when setting credit window to > 1. Suspicion is that it is likely not, and program abortion midway would result in unpredictable behavior/loss of data. So we could surface this possibility and let users decide the trade off they need for correctness vs performance.

If the user is in the receiveAndDelete mode, they are already subject to the application crashing. If the customer is looking for a reliable way of disposing of receiving messages, they should use the peekLock mode instead.

When I tried receiving 3000+ messages, it was annoying to have the receiver wait for 60 seconds and return just 80/100 messages or some other number arbitrarily.

Where does the 60 second timer come from?
If you are making changes in the batchingReceiver.ts file, can you also fix this typo? https://github.com/Azure/azure-sdk-for-js/blob/743162d8ca2c977fc671d0e63a98777196916a93/sdk/servicebus/service-bus/src/core/batchingReceiver.ts#L92

Sure. About the changes to make - when delay between messages received is more than 1 second, the message collecting stops. The 60 second is from operation timeout that user can set, increasing that makes no difference and just the few 80/100 messages would get returned.

The documentation says the timer is intended to use as wait time for receiving just the first message - this isn't true and will need to be fixed.

Yes, the documentation needs to be fixed. The change in behavior from what the doc says to what the code does was in #4933.

When I tried receiving 3000+ messages, it was annoying to have the receiver wait for 60 seconds and return just 80/100 messages or some other number arbitrarily. The experience was much smoother and better when all 3000 messages were received and deleted as one would expect with such a call.

The annoyance is understandable if a human is involved and is waiting for results in person. More likely scenarios are that programs are set up and left to run loops. If you wanted all 3000 messages to be received and deleted in the same call, you can also increase the timeout. This slowness is particular to ReceiveAndDelete mode, see the PR description in #4933.

This required the mer message timeout to not be just 1 second and be 5 seconds/10 seconds (based on the wifi I connected to I think).

The per message timeout of 1 second was put in place because if the entire operation took longer time than the earlier messages had the risk of getting their lock expired. The same risk doesnt apply to ReceiveAndDelete mode as there is no concept of a "lock". So, we can remove the per message timeout altogether for ReceiveAndDelete mode and that should help with the, "I asked for 3000 msgs, but I got only about 100 in ReceiveAndDelete mode".

The per message timeout of 1 second was put in place because if the entire operation took longer time than the earlier messages had the risk of getting their lock expired.

So what this means is that receiveMessages can never take longer than the first message's lock expiry?
If so, that's a bug to be fixed with peekLock mode right?

The same risk doesnt apply to ReceiveAndDelete mode as there is no concept of a "lock". So, we can remove the per message timeout altogether for ReceiveAndDelete mode and that should help with the, "I asked for 3000 msgs, but I got only about 100 in ReceiveAndDelete mode".

What about making new message wait time / idle time as configurable based on the producer/consumer usecase?
When you say "If you wanted all 3000 messages to be received and deleted in the same call, you can also increase the timeout.", this implies that the idle time for waiting on new message needs to be configurable so it can be increased.

Yes, total wait time of more than 30 seconds in PeekLock mode theoretically doesnt make sense as lock on the first message would expire. 60 seconds was the default suggested by the service team probably because that is the default operation timeout.
In reality, if there are messages in queue, they have arrived fast enough in PeekLock mode that we haven't seen the case of us passing the 30sec mark. If there are no messages in the queue, or messages are coming in slow, then the per message timer kicks in and we end up returning whatever number of messages that was collected.
I'd rather not make the new message wait time configurable if we can avoid it. Please see if ignoring the new message wait time in ReceiveAndDelete mode helps with the bug that you are seeing.

Closing this PR as https://github.com/Azure/azure-sdk-for-js/pull/6314 does the needful to fix the bug


"Terms of Service" page missing or not linked properly

The "Term of Service" links to the Privacy Policy. This is the wrong document.
I don't know if there is a "Terms" document in existence. If not, we need to write it, or remove the link.
Also, there is a typo in the link, it should be "Terms", not "Term"

New placeholder page created here: https://app.gitbook.com/o/Prbm1mtkwSsGWSvG1Bfd/s/YWP1EZjkUa4JfGGKWtcP/legal/terms-and-conditions

@l-br1 @kickloop @MSzalowski The copy needs writing for this. There is a link in every page footer to this page. At present, the link goes to the Privacy Policy page.

Placeholder text in place

works again


[Helm][EKS][Grafana] Inconsistent ingress -> service port for Grafana

Hi
When using this chart, version: 0.18.0-beta1 and values from below, I am facing a problem with the service for Grafana and the ingress definition.
Values:
mysql:
  useExternal: true
  externalServer: my-rds-endpoint
  externalPort: my-rds-port

lake:
  encryptionSecret:
    secret: my-secret

option:
  database: "mysql"
  connectionSecretName: "mysecret"
  autoCreateSecret: false

grafana:
  envFromSecrets:
    - name: "mysecret"

ingress:
  enabled: true
  enableHttps: true
  useDefaultNginx: false
  className: alb
  hostname: hostname.com
  annotations:
    some_custom_annotations

Grafana service created (devlake-grafana) contains the following port definition
│   ports:
│   - name: service
│     port: 80
│     protocol: TCP
│     targetPort: 3000

Ingress created contains the following Grafana definition
│   - host: hostname.com
│     http:
│       paths:
│       - backend:
│           service:
│             name: devlake-grafana
│             port:
│               number: 3000
│         path: /grafana
│         pathType: Prefix

In k8s events I can see:
│ Kind:                Event                                                                                │
│ Last Timestamp:      2023-07-18T12:32:17Z                                                                                │
│ Message:             Failed build model due to ingress: devlake/devlake: unable to find port 3000 on service devlake/devlake-grafana

Note that number: 3000  seems to be wrong, as soon as I  edit my ingress resource setting number: 80 ingress is able to move forward and gets properly provisioned.
I have been looking into values but I can't find a way to parametrize this value, it seems to be harcoded to me https://github.com/apache/incubator-devlake-helm-chart/blob/81f3833e73787dd78ef0fef3fa44378d14dcf968/charts/devlake/templates/ingresses.yaml#L72C31-L72C31
Could you please guide me on how to set this value from  values.yaml file so I don't need to manually update said value (if that's possible)?
Thanks!

With 0.18.0beta1 devlake removed internal grafana configuration and used it as a dependency in chart.
So now if you want to configure grafana you should be able to do that using these values.
We did not had any problems with grafana running on port 80, but we use devlake behind corporate proxy, so we had to set proxy vars to make it work.
grafana:
  env:
    HTTP_PROXY: http://PROXY_URL:PORT
    HTTPS_PROXY: http://PROXY_URL:PORT
    http_proxy: PROXY_URL:PORT
    https_proxy: PROXY_URL:PORT
  service:
    port: 3000 # If you need grafana service to run on port 3000

Thanks for you input @ech018!

It works now, thanks!
I wonder whether it would make sense to add this as default value in values.yaml so that on a fresh install ingress resource created in devlake chart is aligned with the service that is created in Grafana chart by default.
I believe that is not part of my initial request so I consider this as resolved.


Lazy loading and custom hook for managing data in Home screen

What's the percievable difference here? Have you measured any numbers? Lighthouse score?  Can you measure more things? What happens on fast & slow 3G connections?
Measure impact of on the time. Bundle size is only part the equation probably the easiest thing to measure.

any more suggestions ?

added commits for seperate hook for managing data in Home

@jeremyphilemon Please review

Hey thanks for the PR! As mentioned in the contributing guide, please have an issue filed first, have it accepted, then assigned to you before submitting a PR :)
This will help us discuss any changes/requirements before work is done on it!


Allow the product_name to be read in from the config file in configure-product

Story to unwrap configure-saml-authentication
Currently, we have a wrapper around configure-product to allow config file to contain the product name using --config config.yml. Would like to merge that behavior into om.
Proposed changes:
add the ability to read the product-name from a provided --config file if the field is present
Intended behavior:
--product-name will always set the product name
configFile.yml:
product_name: ((product_name))

will set the product name if the flag is not set

Just to make sure, the plan is to leave the existing --product-name flag as it but make it optional in which case the file passed via --config should contain a product_name key. Else raise an error. Does that sound right?
Also question about naming consistency. Looks like all our existing config keys use a hyphen: https://github.com/pivotal-cf/om/blob/master/config/config.go. Should product_name be changed to product-name or should we move more towards underscores to have more idiomatic YAML?

Yes. This is exactly what we were thinking.
And yes, we will name the key product-name instead of product_name for consistency.

merged


OpenVRPose not taking OVRFirstPerson translation into account

I've hooked up OpenVRPose to attach a node to a VR controller. As long as OVRFirstPerson remains at 0,0,0 everything works as expected. I change the OVRFirstPerson translation and the node with OpenVRPose remains where it originally was (origin of 0,0,0).

@TopHatCalavera you always have to make these nodes a child of the ARVROrigin point, you can't place them somewhere else in the scene.

Ah! May I suggest we implement get_configuration_warning to validate the correct configuration?


Bubble menu doesn't appear when using keyboard select all shortcut

Hi again,
If you press cmd + A to select all the text, the bubble menu doesn't appear here:
https://leecason.github.io/element-tiptap/bubble_menu
But it does here:
https://tiptap.scrumpy.io/menu-bubble
Is this a bug in Element tiptap?
Thanks.

I've overwritten the code of appearing bubble menu, that is different from tiptap's, I will try to improve this, thank you.

:tada: This issue has been resolved in version 1.25.0 :tada:
The release is available on:

GitHub release
npm package (@latest dist-tag)

Your semantic-release bot :package::rocket:


CAP (Create-A-Pokemon) Pokemon

Hi felixphew,
This is not a major issue, and I wasn't really sure where I could suggest this idea. Smogon has a set of CAP pokemon that are fan made and have been accepted by them (a total of 22). It does have it's own format of play as well on Pokemon Showdown. I know these CAP pokemon are not official (not created by GameFreak) but it would be really nice to add sprites for these pokemon. I know you may have to go out of your for this request, but I'd really appreciate it if you could add support for CAP pokemon.
Please let me know if you need any more clarification, the page where you can find these pokemon is here
http://www.smogon.com/cap/pokemon/
Best Regards,

Thanks for mentioning this - someone [you?] already raised the idea on the Smogon forums. All I was waiting on was artwork, which your link seems to include, so I should be able to get this implemented relatively soon (it doesn't actually require any code changes, I just add the mons to pokemon.json).

Many thanks for responding to my suggestions felixphew. Please keep me posted on this enchancement and let me know once it's all up and running on PokePaste.

Looks perfect felixphew, many thanks for adding this cool enhancement.


Style sponsor page

Closes #1238
Closes #1314
Add styles for PR in pypi-theme: https://github.com/python/pypi-theme/pull/28
For browsers that support CSS grid

Fallback for browsers without support for CSS grid

Do these need merged in a particular order btw?

Yes, styles should be merged first @dstufft

Hi @nlhkabu! ^.^
I'm curious if there's some reason to not have 2 sponsors per row, when using CSS Grids?


Store relative path in the compiler stat for ignored modules

I'm submitting a feature request
Webpack version:
1.13.2
Please tell us about your environment:
Windows 10, Windows 7
Current behavior:
After including es6-promise to my project I see absolute path inside comiler state json file. It is looks like
...
"node_modules\\es6-promise\\dist\\es6-promise.js": 61,
"node_modules\\webpack\\node_modules\\node-libs-browser\\node_modules\\process\\browser.js": 62,
"node_modules\\webpack\\buildin\\module.js": 63,
"ignored D:\\MyProject\\node_modules\\es6-promise\\dist vertx": 64,
...

Expected/desired behavior:
Relative path for ignored entry.
"ignored node_modules\\es6-promise\\dist vertx": 64,

What is the motivation / use case for changing the behavior?
It causes some problems with version control.
#1315
I already implemented rohitlodha's solution, but the problem still there when chunks collection grows. manifest chunk always added last. So dependent chunks like vendor get a new hash.

Particular solution with es6-promise module is ignoring vertx dependency
new webpack.IgnorePlugin(/vertx/)

yep need to be fixed

If the problem is just that one behavior and not something larger, #3147 should fix it.


Operator less overriding for Data causes compilation error for exception signature

Fixes the problem for overriden less operator for Data. The problem occurs at Centos 7. The error is:
include/hazelcast/client/serialization/pimpl/Data.h:90:95: error: declaration of ‘bool boost::operator<(const boost::shared_ptr&, const boost::shared_ptr&) [with T = hazelcast::client::serialization::pimpl::Data; U = hazelcast::client::serialization::pimpl::Data]’ has a different exception specifier
const boost::shared_ptrhazelcast::client::serialization::pimpl::Data &rhs);
^
Added the same exception signature as defined at the boost shared_ptr less operator.

Test PASSed.


Implement grade classes

Implementing the grade elements:
Grade:
getId(): long
setId(id: long): void
getBelongsTo(): long
setBelongsTo(moduleId: long): void
getMark(): long
setMark(mark: long): void
GradeManager:
getGrade(long moduleId, long degreeId, long semesterId, long userId): Grade
createGrade(long moduleId, long degreeId, long semesterId, long userId): Grade
getGrades(long moduleId, long degreeId, long semesterId, long userId): List
updateGrade(long moduleId, long degreeId, long semesterId, long userId, long gradeId): Grade
deleteGrade(long moduleId, long degreeId, long semesterId, long userId): void
GradeDao:
create(grade: Grade): void
read(gradeId: long): Grade
readByModule(moduleId: long): List
readByStudent(studentId: long): List
update(grade: Grade): void
delete(gradeId: long): void
@route(path = "api/grades")
GradeController:
https://github.com/endpoint(method = HttpMethod.POST)
addGrade(RequestContext requestContext, HttpResponse httpResponse)
@route(path = "{gradeId}")
https://github.com/endpoint(method = HttpMethod.PUT)
updateGrade(RequestContext requestContext, HttpResponse httpResponse)
@route(path = "{gradeId}")
https://github.com/endpoint(method = HttpMethod.DELETE)
deleteGrade(RequestContext requestContext, HttpResponse httpResponse)
@route(path = "modules/{modId}/grades")
https://github.com/endpoint(method = HttpMethod.GET)
getGradesByModId(RequestContext requestContext, HttpResponse httpResponse)
Implementing InMemoryGradeDao and SQLGradeDao:
InMemoryGradeDao:
Purpose: Stores grade data in memory using data structures such as HashMap and ArrayList.
Use case: Ideal for testing and development as it enables fast data manipulation without database overhead.
SQLGradeDao:
Purpose: Interacts with an SQL database to perform CRUD operations on note data.
Use case: Used in production environments to ensure persistent and consistent data storage.

i think many of the paths are from the old version.
here is the new:

i think its ready to merge. i did not test it locally but the code looks good to me.
one remark is: the Grade object in the backend uses "belongsTo" to represent the moduleId. in the frontend i used "moduleId". this if you want to leave it like that we need to rewrite before the response is sent so that belongsTo is renamed to moduleId. but we can fix that in another pr.


We should define how nomination for the TOC works

https://github.com/cloudfoundry/community/blob/main/TOC.md#candidate-eligibility omits any details of how, where and when (until when) self-nomination can occur.

create a stub election folder with README, voters and ballot.md files
define election cycle in e-X form
Announce election cycle and specify automatically included voters (e-4 weeks)
Accept TOC nominations and voter eligibility additions (e-4 through e-2)
nominations close / prep ballot system (1 to 2 days)
Voting e-2 through e-0
2 days later announce
TOC takes on roles immediately
Annual cycle happens based on when the first election will actually happen (avoid august and december)
nominations flow through PRs

Should not have been closed. Push only partially resolved.

This was done, for example in 2022


Resize and Rotate example's select div not positioned correctly

Describe the Bug
The select div for a node is offset incorrectly in the resize and drag example. This side-effect leaves a clickable div so selection of nodes interfere with other nodes that overlap this div
Your Example Website or App
https://stackblitz.com/edit/react-ts-baealr?file=App.tsx
Steps to Reproduce the Bug or Issue
Copy-paste the example code
Expected behavior
The selected div should not interfere with other nodes' selection
Screenshots or Videos

Platform

Browser: Chrome latest
reactflow latest

Additional context
No response

#2156 https://github.com/wbkd/react-flow/issues/2156

#2156

Any update on this? I'm trying to implement resizing to my custom nodes and running into this issue as well. Thanks

This will be fixed with the release of v11.

This is fixed in the new version of the Pro example: https://reactflow.dev/docs/examples/nodes/resize-rotate/