fix(amplify-storage-simulator): fix schema of events emitted

Description of changes
The structure and names of events emitted by storage simulator was incorrect.
Properties such as eventName, eventSource etc were not direct descendants of the Record object, they were descendants of an "event" property within the Record.  This does not match the schema of the events delivered to the Lambda functions with an S3 trigger.
Additionally the event names were being constructed using the request method, which is all uppercase and does not match the actual event names.
Ref: Event Message Structure
Also added some error handling around fs.writeFile in handlRequestPut. Since the mock S3 Server relies on request method and not the operation (ie: PutObject etc) to determine the action to take,  scenarios such as CopyObject being used in the t function would be treated as PutObject requests and cause the mock storage server to crash,without cleaning up. (ie: resolver files for graphql mock would remain).   Logging a warning and not crashing seemed "good enough" for this, any other handling would probably require more refactoring than is practical right now.
Breaking Change?
Not really, though it might break a trigger function that is in active development and never been deployed. Any target function that was relying on the incorrect structure would not have worked when deployed unless their was already a logic branch in the function to handle the incorrect structure.
Issue #, if available
N/A
Description of how you validated changes
Added additional tests to validate schema of emitted events.
All tests in yarn test pass.
Tested running amplify mock with linked local, functions still triggered and events have correct structure and eventNames.
Checklist

[x] PR description included
[X] yarn test passes
[x] Tests are changed or added

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Codecov Report

Merging #9652 (71b4fa3) into master (4a87373) will increase coverage by 0.00%.
The diff coverage is 43.75%.

@@           Coverage Diff           @@
##           master    #9652   +/-   ##
=======================================
  Coverage   52.93%   52.94%
=======================================
  Files         829      829
  Lines       45865    45867    +2
  Branches     9789     9789
=======================================
+ Hits        24279    24282    +3
+ Misses      19581    19580    -1
  Partials     2005     2005

Impacted Files
Coverage Δ

packages/amplify-util-mock/src/storage/storage.ts
0.00% <0.00%> (ø)

...s/amplify-storage-simulator/src/server/S3server.ts
84.61% <77.77%> (-0.42%)
:arrow_down:

packages/amplify-storage-simulator/src/index.ts
87.50% <0.00%> (+12.50%)
:arrow_up:

Continue to review full report at Codecov.

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


[JS Client] Rename ERC20 to CEP18

Fix https://github.com/casper-ecosystem/cep18/issues/65

implemented in https://github.com/casper-ecosystem/cep18/pull/69


Nested Documents

Hello everyone,
You put (reviews as Collection) inside Restaurants Collections.
What different between this and reviews collection in the base path, and set rest_id and user_id inside it??

@yahyatabba good question!  There's not much difference, just a different way of organizing the data.  We chose a subcollection mostly because we want this codelab to show off as many parts of Firestore as possible.
Here are a few small differences:

If you wanted to query "ratings for restaurant X ordered by time" then you don't need a custom index when using a subcollection, but you do if you're using a root-level collection.
It's sometimes easier to write good security rules when using subcollections since the path tells you about the expected data.
If we ever need to analyze all reviews across all restaurants, we would not want to use subcollections.


Displaying Detailed Job Progress While Using Run Command

This PR aims at the following

Introduce Live Table Writer
Refactor Printer and split out Job Progress Printer Logic
Get History Events and Print All Job Progress in Table Format

closes #4233

id-only

wait=false

follow


No CouchDB settings

According to https://github.com/benweet/stackedit/blob/master/doc/couchdb-setup.md should it be possible to set the CouchDB URL in Menu > Settings > Advanced > CouchDB URL, but testing with the Docker image from https://registry.hub.docker.com/u/benweet/stackedit/ there is no such option in Menu > Settings > Advanced.

I was able to find it: You need to be in Editing mode, then click the "#" menu on the left, then the Settings link at the bottom (gear icon), and then the Advanced tab. The CouchDB url field is way at the bottom of that list of options.

What does it mean to be in Editing mode? On stackedit.io I can find it without any problems.

@Jasmine-Lognnes If you click the "#" menu, there's a "StackEdit Viewer" option, which just shows the rendered view of your document. In that mode, the "#" menu is just a link to go back to editing again.


python38Packages.lightgbm: 3.1.1 -> 3.2.0

Automatic update generated by nixpkgs-update tools. This update was made based on information from passthru.updateScript.
meta.description for python38Packages.lightgbm is: "A fast, distributed, high performance gradient boosting (GBDT, GBRT, GBM or MART) framework"
meta.homepage for python38Packages.lightgbm is: "https://github.com/Microsoft/LightGBM"
meta.changelog for python38Packages.lightgbm is: ""
Updates performed

Ran passthru.UpdateScript

To inspect upstream changes
Impact

Checks done (click to expand)

built on NixOS

Warning: a test defined in passthru.tests did not pass

0 of 0 passed binary check by having a zero exit code.

0 of 0 passed binary check by having the new version present in output.

found 3.2.0 with grep in /nix/store/n28jy99pwzicv95qrby82wx4xfx7hkpj-python3.8-lightgbm-3.2.0

found 3.2.0 in filename of file in /nix/store/n28jy99pwzicv95qrby82wx4xfx7hkpj-python3.8-lightgbm-3.2.0

directory tree listing: https://gist.github.com/83fe9409c2640ae7cd48d8842662c25a

du listing: https://gist.github.com/deb204cbc194d8597b02856d0017f58f

Rebuild report (if merged into master) (click to expand)

16 total rebuild path(s)

4 package rebuild(s)

4 x86_64-linux rebuild(s)
4 i686-linux rebuild(s)
4 x86_64-darwin rebuild(s)
4 aarch64-linux rebuild(s)

First fifty rebuilds by attrpath
python38Packages.lightgbm
python38Packages.optuna
python39Packages.lightgbm
python39Packages.optuna

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/n28jy99pwzicv95qrby82wx4xfx7hkpj-python3.8-lightgbm-3.2.0 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A python38Packages.lightgbm https://github.com/r-ryantm/nixpkgs/archive/dea14fafdbe9560a1b468ade743703c07c61a185.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/n28jy99pwzicv95qrby82wx4xfx7hkpj-python3.8-lightgbm-3.2.0
ls -la /nix/store/n28jy99pwzicv95qrby82wx4xfx7hkpj-python3.8-lightgbm-3.2.0/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

2 packages marked as broken and skipped:

python38Packages.optuna
python39Packages.optuna

2 packages built:

python38Packages.lightgbm
python39Packages.lightgbm

Maintainer pings
cc @teh @costrouc for testing.

Result of nixpkgs-review pr 117689 at dea14faf run on aarch64-linux 1

2 packages marked as broken and skipped:

python38Packages.optuna
python39Packages.optuna

1 package skipped due to time constraints:

python39Packages.lightgbm

1 package built successfully:

python38Packages.lightgbm

1 suggestion:

warning: python-include-tests
Consider adding a checkPhase for tests, or if not feasible, pythonImportsCheck.
Near pkgs/development/python-modules/lightgbm/default.nix:57:0:
   |
57 |     description = "A fast, distributed, high performance gradient boosting (GBDT, GBRT, GBM or MART) framework";
   | ^


'openssl/e_os2.h' file not found while running python setup.py develop in MAC osx 10.11.3

This is the error message:
build/temp.macosx-10.11-intel-2.7/_openssl.c:423:10: fatal error:
'openssl/e_os2.h' file not found
#include <openssl/e_os2.h>
^
1 error generated.
error: Setup script exited with error: command 'cc' failed with exit status 1

Have you satisfied the requirements here?: http://airbnb.io/caravel/installation.html
brew install pkg-config libffi openssl
env LDFLAGS="-L$(brew --prefix openssl)/lib" CFLAGS="-I$(brew --prefix openssl)/include" pip install cryptography

Thank you kingo55 for providing the link... that worked after resolving the dependences.
I was following the instruction in
https://github.com/airbnb/caravel/blob/master/CONTRIBUTING.md
for setting up development environment, I guess the dependency part is missed in that document.


Can burst-attention be used in Model Inference?

Thanks for the great work and promising performance in model training. are you considering apply and simplify burst-attention on model inference? what gaps are there compared to ring attention with FSDP?

For this first question: yes, burst-attention can used in pre-fill stage of inference. For decoding stage, TP should be a better way. But the switch between Burst and TP can be easily done. We are working on this now.
For the second one: The idea is quite similar with Ring-Flash with FSDP only with different implementation details and different optimization tricks. We think benchmark result is only difference indeed.

looking forward to the preview of The switch between Burst and TP can be easily done, We are working on this now.


Avoid releasing the Stack and Gc mutexes when calling native functions

Currently the vm needs to release the stack and gc mutexes every time a native function is called as it cannot know if the native function may recursively call back into the vm gluon code -> native -> gluon code -> native -> ... etc. For many functions this is not necessary however so some amount of overhead could be avoided by passing on the ownership of the stack and garbage collector.
With locking:
https://github.com/Marwes/gluon/blob/de751ebece1ab252af07320ac1aafd21b0070c17/vm/src/thread.rs#L707-L709
test gluon_rust_boundary_overhead ... bench:     644,076 ns/iter (+/- 163,799)

Without locking:
test gluon_rust_boundary_overhead ... bench:     517,511 ns/iter (+/- 87,103)

Benchmark:
#[bench]
fn gluon_rust_boundary_overhead(b: &mut ::test::Bencher) {
    let vm = new_vm();

    fn test_fn(_: &Thread) -> Status { Status::Ok }
    vm.define_global("test_fn", primitive::<fn (i32)>("test_fn", test_fn)).unwrap();

    let text = r#"
    let for n f =
        if n #Int== 0 then
            ()
        else
            f n
            f n
            f n
            f n
            f n
            f n
            f n
            f n
            f n
            f n
            for (n #Int- 10) f
    \n -> for n test_fn
    "#;
    Compiler::new()
        .load_script(&vm, "test", text)
        .unwrap();

    let mut test: FunctionRef<fn (i32) -> ()> = vm.get_global("test").unwrap();
    b.iter(|| {
        let result = test.call(1000).unwrap();
        ::test::black_box(result)
    })
}
```

There are two alternatives I can see to make this work:

* Change the signature of the [native function](https://github.com/Marwes/gluon/blob/de751ebece1ab252af07320ac1aafd21b0070c17/vm/src/value.rs#L364) to `Box<Fn(&Thread, Context) -> Status + Send + Sync>` [Context](https://github.com/Marwes/gluon/blob/de751ebece1ab252af07320ac1aafd21b0070c17/vm/src/thread.rs#L138-L142). This makes it convenient to work with in Rust but unfortunately it is not really compatible with the C api.

* Use an "internal mutex" for the stack and garbage collector. This means that the native function being called can call an unsafe `Thread::get_lock(&self) -> &mut Stack` as it has knowledge that the virtual machine had the lock before that call and implicitly passes it on to the native function. The native function also has to make sure that it has mutable access to the stack before returning to avoid undefined behaviour again as the vm will assume that the mutable ownership is intact after returning (though the native function could pass say `Status::DoesNotHaveLock` which the vm can check in case the native function cannot get mutable ownership before returning).

Let me know if this is difficult to understand, it deals with some pretty core parts of the vm which can be a bit complicated.

Avoiding the locking in the benchmark did have less of an impact than I initially thought so this is perhaps not of very high priority.

Updated the benchmark so it has a bit less overhead. The overhead seems a bit more significant now.


resuming bug with optimizer under DDP

Error occurs@optimzier.step()
May due to state parameter location.

Potential solution:
consider dist_train.py, L121, add model.set_device before optimizer creation
    optimizer = optim_builder.build(task, task_cfg.optim, model)

Update
can be quick fixed by adding the following code in dist_train.py, L121
# L121
model.set_device(devs[0])
optimizer = optim_builder.build(task, task_cfg.optim, model)


Docker machine give ip which doesn't work

Hello. My problem is that docker machine gives me <IP_ADDRESS> ip.
But this ip doesn't work(i have run nginx container):
kricha:/ $  curl <IP_ADDRESS>:80
curl: (7) Failed to connect to <IP_ADDRESS> port 80: Connection refused

BUT! I can ping this ip:
kricha:/ $  ping <IP_ADDRESS>
PING <IP_ADDRESS> (<IP_ADDRESS>): 56 data bytes
64 bytes from <IP_ADDRESS>: icmp_seq=0 ttl=64 time=2.767 ms
64 bytes from <IP_ADDRESS>: icmp_seq=1 ttl=64 time=0.281 ms
64 bytes from <IP_ADDRESS>: icmp_seq=2 ttl=64 time=0.241 ms
64 bytes from <IP_ADDRESS>: icmp_seq=3 ttl=64 time=0.478 ms
64 bytes from <IP_ADDRESS>: icmp_seq=4 ttl=64 time=0.269 ms
64 bytes from <IP_ADDRESS>: icmp_seq=5 ttl=64 time=0.295 ms
64 bytes from <IP_ADDRESS>: icmp_seq=6 ttl=64 time=0.320 ms
64 bytes from <IP_ADDRESS>: icmp_seq=7 ttl=64 time=0.292 ms

At that time for me works some strange ip:
kricha:/ $  curl <IP_ADDRESS>:80
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<style type="text/css">

ping:
kricha:/ $  ping <IP_ADDRESS>
PING <IP_ADDRESS> (<IP_ADDRESS>): 56 data bytes
64 bytes from <IP_ADDRESS>: icmp_seq=0 ttl=64 time=0.144 ms
64 bytes from <IP_ADDRESS>: icmp_seq=1 ttl=64 time=0.053 ms
64 bytes from <IP_ADDRESS>: icmp_seq=2 ttl=64 time=0.065 ms
64 bytes from <IP_ADDRESS>: icmp_seq=3 ttl=64 time=0.064 ms

if i ping second host from nginx container it also response me from strange ip
kricha:/ $  ping site2.dev
PING site2.dev (<IP_ADDRESS>): 56 data bytes
64 bytes from <IP_ADDRESS>: icmp_seq=0 ttl=64 time=0.073 ms
64 bytes from <IP_ADDRESS>: icmp_seq=1 ttl=64 time=0.065 ms
64 bytes from <IP_ADDRESS>: icmp_seq=2 ttl=64 time=0.058 ms
64 bytes from <IP_ADDRESS>: icmp_seq=3 ttl=64 time=0.056 ms

my info:
kricha:/ $  docker -v
Docker version 1.12.1, build 6f9534c
kricha:/ $  docker-machine -v
docker-machine version 0.8.1, build 41b3b25
kricha:/ $  docker-compose -v
docker-compose version 1.8.0, build f3628c7
kricha:/ $  docker info
Containers: 5
 Running: 4
 Paused: 0
 Stopped: 1
Images: 18
Server Version: 1.12.1
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 48
 Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: null host bridge overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: seccomp
Kernel Version: 4.4.20-moby
Operating System: Alpine Linux v3.4
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 1.953 GiB
Name: moby
ID: JUUN:UBKS:OPSZ:E565:EBI5:HZPE:T5E7:5K3X:XHQX:OQ3N:3CKH:G5EZ
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
 File Descriptors: 38
 Goroutines: 76
 System Time: 2016-10-11T08:20:42.489887069Z
 EventsListeners: 2
No Proxy: *.local, 169.254/16
Registry: https://index.docker.io/v1/
Insecure Registries:
 <IP_ADDRESS>/8

Is it the case that your Docker client is talking to the Docker for Mac VM, but <IP_ADDRESS> is the Docker Machine IP address?  (They're 2 separate VMs)
Try curl localhost:80 (will reply if using D4M), or docker $(docker-machine config) ps (should show containers running in default Machine VM)


UI tests for VMware fails

Version Info
18.1
Describe the bug
A few UI tests for WMware are failing
AppVCenterControllerWT.test01setSettingsAPIvSphere:66 ? NoSuchElement no such ...
AppVCenterControllerWT.test02importServiceTemplate:79 ? NoSuchElement no such ...
AppVCenterControllerWT.test03setSettingsIntoController:92 ? NoSuchElement no s...
How to Reproduce
Steps to reproduce the behavior:

Go to https://yourhost/oscm-app-vmware/
Click on vCenter -> save
See error

Additional context
Refactoring the VMware deployment causes this problem. By default, sample data was in the database before refactoring. Sampledata are now only in the database if they were installed with sampledata = true. To fix the UI test, the vcenter must be added to the test.
See: https://github.com/servicecatalog/oscm-app/blob/master/oscm-app-vmware/resources/csv/vcenter.csv

The cause is of those failures are that the VCenter configuration is missing in the database in case the installation was done without sample data. This needs to be fixed in the installer.

https://github.com/servicecatalog/oscm-app/pull/79

Bug is fiexed. Tests are running again.


release-1.1-20181215-07-40

This is a generated PR that triggers release build, and will be automatically merged
none

@hklai: The following test failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/istio-unit-tests.sh
15a751aad0dbd6e430aafa5d43b97ec4fda04131
link
/test release-unit-tests

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.


Not working on background mode

Your Environment

Plugin version:
Platform: iOS or Android
OS version:
Device manufacturer and model:

Running in Simulator:
React Native version:
Plugin configuration options:
Link to your project:

Context

Expected Behavior

Actual Behavior

Possible Fix

Steps to Reproduce

Context

Debug logs

I use this plugin into react-native project. its working fine when application run or open into the background. But if application close from task manager plugin not work. this issue occurs on android above 8.0.

I have also tested it on Android 8.0 and above. It seems that the high-level RN code components (the listeners such as BackgroundGeolocation.on('location',()=>{}) ) and the low-level Android/IOS native code components (e.g., the debug toast) behaves separately.
The behaviour is that:

upon switching out (pressing HOME button or switching to another APP), both continue to function.
upon close (the square button followed by CLOSE or CLEAR ALL), the RN code components will stop running while the native code components continue to run.

FYI, I have taken all precautions:

in configure(), stopOnTerminate must be set to false; stopOnStillActivity must be set to false
in componentWillUnmount(), BackgroundGeolocation.removeAllListeners() must be commented out

To me, this plugin is merely a native implementation of the background geolocation, plus some linkage to RN. Unfortunately, only the native code components can run after APP close, the RN code components do not run after APP close. Thus, it is not of much usefulness.

Since the name itself says 'BackgroundGeolocation' which contains 'GeoLocation' so I'm wondering if it requires GPS or Location Permission for functioning of this module?

+1 @xuancong84 any work around?

A work around for this would be to save the tracking status in redux persist, then you can fetch the status of the tracking when the app opens again.

So apparently there is no way for this to work if app is killed !

anything update?


Auditing fails for some projects

When I execute the following command:
gh actions-importer audit azure-devops -o output/azure_devops
some of our projects may be migrated, but the others failed.
For the others we retrieve the following error:
There was an error extracting the Azure DevOps pipeline (REDACTED URL). Please reference '3994b5c5018bcbe424598c21c85a90d8ddf23be9' when requesting support.
The full error log (error.txt):
There was an error extracting the Azure DevOps pipeline (REDACTED URL)
Please reference 'REDACTED' when requesting support.
/usr/local/bundle/gems/sorbet-runtime-0.5.10648/lib/types/configuration.rb:296:in call_validation_error_handler_default' /usr/local/bundle/gems/sorbet-runtime-0.5.10648/lib/types/configuration.rb:303:in call_validation_error_handler'
/usr/local/bundle/gems/sorbet-runtime-0.5.10648/lib/types/props/private/setter_factory.rb:184:in raise_pretty_error' /usr/local/bundle/gems/sorbet-runtime-0.5.10648/lib/types/private/methods/call_validation.rb:256:in bind_call'
/usr/local/bundle/gems/sorbet-runtime-0.5.10648/lib/types/private/methods/call_validation.rb:256:in validate_call' /usr/local/bundle/gems/sorbet-runtime-0.5.10648/lib/types/private/methods/_methods.rb:275:in block in _on_method_added'
/usr/local/bundle/gems/sorbet-runtime-0.5.10648/lib/types/props/private/setter_factory.rb:155:in block in nilable_proc' /usr/local/bundle/gems/sorbet-runtime-0.5.10648/lib/types/props/constructor.rb:26:in instance_exec'
/usr/local/bundle/gems/sorbet-runtime-0.5.10648/lib/types/props/constructor.rb:26:in block in construct_props_without_defaults' /usr/local/bundle/gems/sorbet-runtime-0.5.10648/lib/types/props/constructor.rb:23:in each_pair'
/usr/local/bundle/gems/sorbet-runtime-0.5.10648/lib/types/props/constructor.rb:23:in construct_props_without_defaults' /usr/local/bundle/gems/sorbet-runtime-0.5.10648/lib/types/private/methods/_methods.rb:277:in bind_call'
/usr/local/bundle/gems/sorbet-runtime-0.5.10648/lib/types/private/methods/_methods.rb:277:in block in _on_method_added' /usr/local/bundle/gems/sorbet-runtime-0.5.10648/lib/types/props/weak_constructor.rb:14:in initialize'
/usr/local/bundle/gems/sorbet-runtime-0.5.10648/lib/types/private/methods/_methods.rb:277:in bind_call' /usr/local/bundle/gems/sorbet-runtime-0.5.10648/lib/types/private/methods/_methods.rb:277:in block in _on_method_added'
/usr/local/bundle/gems/actions_importer-1.2.18576/lib/valet/services/azure_devops/pipeline/extract_templates.rb:45:in new' /usr/local/bundle/gems/actions_importer-1.2.18576/lib/valet/services/azure_devops/pipeline/extract_templates.rb:45:in call'
/usr/local/bundle/gems/sorbet-runtime-0.5.10648/lib/types/private/methods/call_validation.rb:256:in bind_call' /usr/local/bundle/gems/sorbet-runtime-0.5.10648/lib/types/private/methods/call_validation.rb:256:in validate_call'
/usr/local/bundle/gems/sorbet-runtime-0.5.10648/lib/types/private/methods/_methods.rb:275:in block in _on_method_added' /usr/local/bundle/gems/actions_importer-1.2.18576/lib/valet/services/azure_devops/pipeline/extract_pipeline.rb:125:in pipeline_attributes_from_client'
/usr/local/bundle/gems/actions_importer-1.2.18576/lib/valet/services/azure_devops/pipeline/extract_pipeline.rb:53:in extract' /usr/local/bundle/gems/actions_importer-1.2.18576/lib/valet/services/azure_devops/extract_all_pipelines.rb:38:in block (2 levels) in build_pipelines'
/usr/local/bundle/gems/actions_importer-1.2.18576/lib/valet/models/thread_collection.rb:8:in block in perform_later' /usr/local/bundle/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/executor/safe_task_executor.rb:24:in block in execute'
/usr/local/bundle/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:48:in block in synchronize' /usr/local/bundle/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:48:in synchronize'
/usr/local/bundle/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:48:in synchronize' /usr/local/bundle/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/executor/safe_task_executor.rb:22:in execute'
/usr/local/bundle/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/ivar.rb:170:in safe_execute' /usr/local/bundle/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/future.rb:55:in block in execute'
/usr/local/bundle/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:352:in run_task' /usr/local/bundle/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:343:in block (3 levels) in create_worker'
/usr/local/bundle/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:334:in loop' /usr/local/bundle/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:334:in block (2 levels) in create_worker'
/usr/local/bundle/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:333:in catch' /usr/local/bundle/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:333:in block in create_worker'
We have tried to run it twice - both with the same error.
Any idea what may be wrong? Otherwise I will migrate the rest manually.

@FabianBigler sorry to hear you're running into this issue! Can you please open up a support ticket with GitHub support here to get assistance? That way, we'll be able to triage this accordingly and have a space to share private pipeline details, if they are needed in order to remediate this.


Designer: Update Classes on Revision Page

As a designer I want to update the classes on the revision page so that it pulls in the correct base styling.
Feature: Updated HTML on Revisions Page in Content
  As a designer
  I want to update the classes on the revision page
  So that it displays the correct styling

  Scenario: a user visits the revision page
    Given updated classes
    When a user visits the revision page
    Then they will see the correct styling

@poofichu: Is this done or do we need to move it into the next sprint?

We can close this because the whole revision flow is getting blown up and redone.


New command : ~copyscripts

~copyscripts Sheet1 Sheet2
Function to copy all GSheets scripts from template to another sheet

This would be very cool. I still don't know how to do it. AFAIK, gspread only works with the actual values in the sheets themselves, not the scripts behind them. Perhaps another library does that can work with this? I don't want to make actual HTTP requests to google drive myself

Doable, but only with a user account, according to the discussion at Puzzle World discord server
https://developers.google.com/apps-script/api/reference/rest/v1/projects/create
https://developers.google.com/apps-script/api/reference/rest/v1/projects/updateContent

Do we need to make a new user account to add to the bot?


Support Preact

We are testing Preact support with Iris and discovered a few incompatibilities that need to be resolved before we can move forward.

I also figured out a way to run Storybook using Preact, but wasn't sure if I should include that with this PR. It might help with regression testing though.


Surprised the default "pattern" validator is opinionated. Should it be?

https://github.com/fergaldoyle/vue-form/blob/fd7dbfc5e0ecae296529665ff6b17d93e18c41c2/src/validators.js#L51
We have overrode the built-in pattern validation with a more generic equivalent:
'pattern': function (value, pattern) {
  patternRegExp = new RegExp(pattern);
  patternRegExp.test(value);
}

I realize this would be a breaking change, but adding the start and end to the pattern limits what you can validate.

As far as I can recall, I did this because it follows the HTML5 pattern attribute spec. I.e. the pattern is anchored at the start and end of the input string.
https://stackoverflow.com/questions/9142208/should-i-use-and-in-html5-input-regex-pattern-validation

That's a fair point. I am fine with having to override this behavior then. Thanks for explaining!


refactor(ci): speed up internal testing

Summary
At the moment testing ICT is a big pain point internally. This PR reduces some burdens and improves testing reliance / ease of restarting just 1 test on failure (i.e. if conformance fails, I do not have to wait for IBC & cosmos examples to also finish)
Further, it reduces uneeded flakeyness with the ICS test
Example
before this PR, if I need to rerun a long test (10m+) it would require me to stop, or wait 5-7 minutes for the other to finish.

completed in the above PR since this has been pending 1 month


Configure classpath after running executable

While running older versions of IntelliJ (f.e. 2018.2) the StartupUtil#checkJdkVersion call blocks the launch because of the runtime being used missing the com.sun.jdi.Field class, which is present in the tools.jar which is being resolved by RunIdeBase#resolveToolsJar, but in the current state this seems to be unreachable code since executable is always null

Nice catch, @awildbrysen – thank you!


Unable to read binary file from s3

I'm trying to read a binary file from s3 using get_object(&self, input: &GetObjectRequest)
Very new to this codebase/rust in general, but it seems the try!(hyper_response.read_to_string(&mut body)); in requests.rs:124 is hurting us.

(we later turn that back into bytes in s3.rs:10185 with body: response.body.clone().into_bytes())

What's happening/what do you expect to happen when you read the object from S3?

oh, sorry ...
I get an error "stream did not contain valid UTF-8".
Reading a file from s3 which is valid utf8 works fine (so I have two files in s3, one is a json blob and the other is compressed binary data. The json reads fine, the compressed binary does not).

    let provider = DefaultCredentialsProvider::new().unwrap();
    let s3_client = S3Client::new(provider, Region::UsEast1);

    let mut request = GetObjectRequest::default();
    request.bucket = "some bucket".to_string();
    request.key = "some key containing binary data".to_string();

    let result = s3_client.get_object(&request);
    result.unwrap();

results in
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: S3Error { message: "stream did not contain valid UTF-8" }', src/libcore/result.rs:799
note: Run with `RUST_BACKTRACE=1` for a backtrace.

Thank you, that's very helpful! I agree that it's probably the read_to_string that's causing the issue. @adimarco @matthewkmayer could one of you handle this further as I'm currently unable to access my development machine?

Instead of updating our hand-crafted S3 code, I plan on concentrating landing https://github.com/rusoto/rusoto/pull/321 and https://github.com/rusoto/rusoto/issues/486 to address this.

any progresses? I'm also stuck on this issue.

We could implement a stopgap measure by moving from Strings to bytes.  I'll look into this soon.

This is next on my to-do list after landing https://github.com/rusoto/rusoto/pull/498 .


remove unused int_rnd function

I've removed some noop int casts from rounded numbers, unofrtunatly not 100% sure why they were there, but the tests seem to pass.

I reverted some of the changes, since I think it's better to be explicit in this case. For example, the capnp int fields will throw an exception instead of casting for you if you give it a float.


Synchrously exit ThreadRunner threads

Closes #5216
Fixes OSU-G6

I've omitted the timeout as it will break the synchronicity of the exiting process. If the timeout is something that is wanted, it can be added back, but throwing instead of just logging (and should probably apply to the while loops as well).

Discovered a potential race condition in the current code, will push a fix.
Happens due to Thread = null and setting exit state being far apart.
Not sure why Thread = null is set this early, I'd expect it to be done as a cleanup step when the native thread exits (eg. here). Out of scope, I don't want to accidentally break anything.

Looks correct now, but will wait for a second opinion.


Remove https://github.com/submariner-io/ovn-kubernetes once 0.12 is EOL

Since 0.13, we no longer reference https://github.com/submariner-io/ovn-kubernetes; remove it once 0.12 reaches its EOL (with the release of 0.14).
Depends on #448

@skitt I think this can be done now?

The repository has been deleted.


Make directory dependencies in another repo work with the watch command

The issue
When trying to locally use a library packaged with the swarmion configuration in another app, using directory dependencies with pnpm add file:../../my-swarmion-app/packages/my-package, there is an issue where modified code is not reflected in the app although the watch command is running in the package.
To locally use a package from a swarmion app in another app, the following steps are taken

Run pnpm watch in the package directory. This will clean (remove) the dist folder, re-create it and listen for changes.
Run pnpm add file:... in the app directory. A symlink of the whole package is created to the app's node_modules folder, including the package's dist folder.
Make a change to the package source code, modifying the dist folder with the new code.
The modified code is not reflected in the app.

The problem is that at step 3, tsup will delete the dist folder because of the clean: true config option. Thus breaking the symlink created to the app's node_modules. The changes will not be reflected.
Solution
Remove clean: true from the tsup.config.ts files, as the dist folder is already cleaned when it matters, ie. when runnning package and watch commands.

Great proposition !
To recreate the symlink in the app's node_modules, the  the complete command would be pnpm rm package && pnpm add file:...


New features

These are all branched off of the "cleanup" branch that I have a separate pull request for. I figured I would keep that pull request on its own so that you could at least get a code clean-up (much easier to work with once it's cleaned up a bit) even if you don't like some of these other changes/features that I'm making to behavior. But that branch is already included in this one.
New Features:

Much improved progress display with verbose output — chapter progress and progress bar with percentage per book
Add links to all chapters of all books in the main index file so you can quickly jump to any chapter, e.g. Genesis: 1 2 3 4 5 6 ...
Overhaul of translation: now you just add a folder with translated text files to the locales folder — no more separate branches and translators having to edit the script file. Use the -l flag to select language when running the script, e.g., -l fr, defaults to en
Added Spanish localization
Can switch between standard abbreviations (default) or short, 3-character abbreviations.

These features are great, thank you so much. Sorry it took some time to approve your pull!


boot: use fpath when upath not provided

If the "board-files" path has not been provided by the user as
arguments, use fpath to generate bpath.
Signed-off-by: Julien Masson<EMAIL_ADDRESS>

Thought I pushed this fix... anyway thanks !


Generate a wrong proof

Describe the bug
The proof is '[961, fc6]', which is not in the tree.
I provided 2 wallet addresses:
wallet = [
'0x5ff...54e',
'0x6fb...942',
]
The code is:
wallet_list = [wallet]
mtree = mtree(wallet_list)  # build merkle tree by lib 'merkly'
root = mtree.root    # calculate root
leaf = mtree.leafs   # calculate leafs
proof = mtree.proof(wallet[0])  # print the first wallet address in the wallet list
print('root', root,
'leaf', leaf,
'proof[0]', proof,
)
the output is :
root :
a3ea60c74884e4d8976733e90e586bc56bf738c18c23208b2c4bab42fcc07d10
leaf:
['96120f2536c0e6873e22a4a4c21d8befd3a60a6a04fc0e840c0afee70b38eb36', 'fc669afbb2103e999115554ddba4fabb9d1ea650308c91c143348ca89cb7c256']
proof:  # Why the proof is this? I'm very confused.
[961, fc6]

This happens because when you are printing in the terminal, you have a list of Node but when a class is printed python calls the __repr__ method and in this method Node only shows a hash abbreviation, but you can operate normally.
proof: # Why the proof is this? I'm very confused.
[961, fc6]

Thanks, Lucas, it works!


Fixed #21076 -- Store hashes of session keys in backends

Added the ability to store a one-way hash of the session key instead of storing it as plain-text in the backend to improve security. This is particularly beneficial if a malicious actor only gains access to a read-only version of the backend or an unencrypted backend backup. Further discussion can be found on the django-developers Google group.
The Trac ticket mentioned the ability to turn this feature off since some installs rely upon shared backend stores to handle authentication across applications. I added the SESSION_STORE_KEY_HASH global setting to allow developers to disable this behavior if desired.
Some design considerations:

Ensure we don't break current user sessions
Use a fast hashing algorithm to have minimal performance impact
Store the hashing function used so that we can change the function used gracefully if needed
Expose an API method to hash the key
Support this functionality in all backends (except the cookie backend)

An area of concern:

If a developer currently accesses a Session through the objects manager, they'll need to update their code to hash the key before querying via the session_key or pk fields. For instance,

Session.objects.get(session_key=session_key)

would now need to be:
Session.objects.get(session_key=get_session_key_hash(session_key))

Is there a better way to address this shortcoming?

Great to see that finally being implemented :+1:
When I thought about that topic I imagined it being implemented in a similar fashion to the password hashers in the authentication backend to simply be able to use them, as there are e.g. already password hashers for unsalted and salted MD5 and SHA1 (https://github.com/django/django/blob/1.11.3/django/contrib/auth/hashers.py). If that's not feasible maybe at least using the same format to store the hashs (https://docs.djangoproject.com/en/1.11/topics/auth/passwords/#how-django-stores-passwords) would be an option to make it easier to change the used hasher and its properties later on.

Just a few quick observations:

I'm not sure that we should be using MD5 as it is susceptible to collision attacks.
Perhaps the choice of algorithm should be exposed as a setting to avoid sub-classing for configuration?
The implementation would have to ensure that it is not susceptible to timing attacks.

@Dunedan I actually did this, but in the cookie name. So the cookie set in the client will now be named md5$sessionid instead of sessionid. AFAIK, there is not a good way to query for sessions in the backend by user_id. Therefore, while migrating from unhashed to hashed sessions, we would have to use a try: except: pattern to first query for the hashed session, and then query for the unhashed version if the first did not produce a result. I thought this was undesirable and could be potentially dangerous since the unhashed version of a session could potentially be the same as a hashed version of another session. With the algorithm in the cookie name, we immediately know if we need to query the session backend with the hashed or unhashed value.
@pope1ni

Yeah we should probably just use sha256 since the performance difference is negligible. I'll update the PR.
I'm definitely open to this, but I'd like to get more feedback if this would be desired.
Great call, I didn't think about that. I'll use the django.utils.crypto.constant_time_compare

Great job!
Using the password hashers seems like a good idea to me too, but I believe we need feedback from someone who has more knowledge of this area.

I updated the algorithm to SHA-256 given the feedback. I'm still hesitant to use the contrib.auth.hashers since they are intended for passwords. AFAIK salting and high work factors are not needed for one-way hashing high entropy strings (like sessions), but I'll defer to someone with more expertise in this area.
Could someone give this a proper review?

@aaugustin @malcolmt it looks like you two are the most familiar with the sessions app. If you have time to give this a review it would be greatly appreciated!

Which, actually, means only me... — https://docs.djangoproject.com/en/stable/releases/1.6/

Oh very sorry! RIP @malcolmt

@chris-griffin  could you please apply the suggested changes? and please rebase for django 3.0

I've rebased the changes in the PR to the current master and I'm working on the feedback of @aaugustin.

With this change, we have two concepts of a "session key"
[...]
These two concepts must receive different names and be extremely clearly delineated in the code. Currently it's impossible to tell which variable contains what and to validate there are are no errors.

I'm trying to find an elegant solution for this. Right now I'm tending towards using the names frontend_key and backend_key (for respectively the "clear text session key" and the "hashed if needed session key" as @aaugustin called them). Most importantly I'm trying to stay away from the hashed/unhashed differentiation because the possibility of having both hashed and unhashed keys in the backend makes this very confusing. Suggestions or feedback or is welcome.

Another thing I'm noticing is that the current sessions implementation has a SessionBase class that expects subclasses to implement certain methods, like exists and delete which expect a session key (the frontend_key if we're following the naming convention that I suggested in my previous comment).
This way however, every session backend implementation is responsible for converting the frontend_key into a backend_key which not very DRY, but more importantly it increases the potential for bugs and makes it generally a lot harder to understand at what kind of key you're supposed to be dealing with at different points.
I'd suggest refactoring to have the conversion always happen in one place (probably in SessionBase).
One way to go about this would be to let subclasses of SessionBase not implement the public methods like create and delete that should receive a frontend key, but instead let them implement private _create and _delete methods that are invoked by the public methods and that receive a backend_key. Obviously this would have (breaking) consequences for anyone who has their own custom session backend implementation, though that's kind of the case anyway? Feedback is welcome!

Updated in #12814.


Use lock and synchronization to generate fixed questions for participants.

We want the participants across separate conditions to get the same pretest and posttest questions (not in the same condition). To do so we need to somehow manage the seed.

Currently we generate all the questions for a new participant before hand using lock. We store these questions and then show one by one when getQuery is called. Another option would be to loop over the generators repeatedly to achieve the same effect.


Create better documentation on PyPi

The package summary on PyPi is too vague and minimal, recommend that one of the rST pages be included in setup.py instead.

e.g. https://pypi.org/project/sphinxcontrib-confluencebuilder/

+1 for this - and descirbe all options / have more examples.

The options are in https://sphinxcontrib-confluencebuilder.readthedocs.io/en/latest/configuration.html
The PyPi will just embed one of the existing rst pages.

Done https://pypi.python.org/pypi/sphinxcontrib-confluencebuilder

Looks nice. 🎉

Looks slick in Warehouse too https://pypi.org/project/sphinxcontrib-confluencebuilder/

Looks really nice


http: superfluous response.WriteHeader call (v1.3.0)

Describe the bug
In version 1.3.0, I get the following message at startup. But it was not in v1.2.0.

http: superfluous response.WriteHeader call from github.com/dapr/go-sdk/service/http.(*Server).registerBaseHandler.func3 (topic.go:60)

It seems that the function I need is working. But could you please check why getting the message?
To Reproduce
The following is the sample code.
package main

import (
	"context"
	"log"
	"os/signal"
	"syscall"
	"time"

	"net/http"
	"os"

	"github.com/dapr/go-sdk/service/common"
	daprd "github.com/dapr/go-sdk/service/http"
	flag "github.com/spf13/pflag"
)

var (
	logger  = log.New(os.Stdout, "", 0)
	address string
	wait    int
)

func main() {
	ctx, stop := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM)
	defer stop()

	logger.Printf("Starting...")

	flag.StringVarP(&address, "address", "a", ":8080", "set ip:port of this app")
	flag.IntVarP(&wait, "wait", "w", 0, "set wait seconds after getting signal for testing")
	flag.Parse()

	s := daprd.NewService(address)

	if err := s.AddBindingInvocationHandler("/cron", cronHandler); err != nil {
		logger.Fatalf("Error adding binding handler: %v", err)
	}

	go func() {
		<-ctx.Done()
		logger.Printf("Got signal. shutting down...")
		for i := 0; i < wait; i++ {
			time.Sleep(1 * time.Second)
			logger.Printf("Waited for %d seconds...", i+1)
		}
		s.Stop()
	}()

	go func() {
		for {
			logger.Printf("I'm awake.")
			time.Sleep(1 * time.Minute)
		}
	}()

	if err := s.Start(); err != nil && err != http.ErrServerClosed {
		logger.Fatalf("Error starting service: %v", err)
	}

	logger.Printf("Exit.")
}

func cronHandler(ctx context.Context, in *common.BindingEvent) (out []byte, err error) {
	logger.Printf("Got cron event.")
	return nil, nil
}

Expected behavior
Startup without the message.

Seems this line can be removed: https://github.com/dapr/go-sdk/blob/v1.3.0/service/http/topic.go#L60
Refer to: https://pkg.go.dev/net/http#ResponseWriter
	// Write writes the data to the connection as part of an HTTP reply.
	//
	// If WriteHeader has not yet been called, Write calls
	// WriteHeader(http.StatusOK) before writing the data. If the Header
	// does not contain a Content-Type line, Write adds a Content-Type set
	// to the result of passing the initial 512 bytes of written data to
	// DetectContentType. Additionally, if the total size of all written
	// data is under a few KB and there are no Flush calls, the
	// Content-Length header is added automatically.
	//
	// Depending on the HTTP protocol version and the client, calling
	// Write or WriteHeader may prevent future reads on the
	// Request.Body. For HTTP/1.x requests, handlers should read any
	// needed request body data before writing the response. Once the
	// headers have been flushed (due to either an explicit Flusher.Flush
	// call or writing enough data to trigger a flush), the request body
	// may be unavailable. For HTTP/2 requests, the Go HTTP server permits
	// handlers to continue to read the request body while concurrently
	// writing the response. However, such behavior may not be supported
	// by all HTTP/2 clients. Handlers should read before writing if
	// possible to maximize compatibility.
	Write([]byte) (int, error)

Write will call  WriteHeader(http.StatusOK) automatically, so no need to explicitly call WriteHeader(http.StatusOK).

/assign

https://github.com/dapr/go-sdk/pull/227

Can this issue be closed?


Update to Rails 6

We need to update the app to Rails 6, but this introduces a number breaking changes, especially in Minitest

Done


Allow steps in autoBindSteps to be registered locally instead of globally

I have a use case where each call to autoBindSteps will have its own definitions. Some of these definitions have same patterns. Currently, autoBindSteps registers each step definition globally, which causes errors like the following:

2 step definition matches were found for step "I should be granted access" in scenario "Entering a correct password" in feature "Logging in". Each step can only have one matching step definition. The following step definition matches were found:

By providing a flag to disable global registration (which remains the default, to prevent breaking anything), each call to autoBindSteps will have its own private registration.

No longer needed, see #134


Add/improve JSON downloads

With the biosamples, variants ... data available through handover links it would be nice to enable data downloads. Some ideas:

the biosamples / variants tabs could show a "Download data (JSON)" button; this could be changed to include other options (pop-up menu or such, e.g. for .csv data format)
the current "Download JSON" should better open a new browser page w/ the JSON response; the download of the response isn't very useful, but the fast look at it might be. Could be less prominent, too (e.g. text link; I changed the label).
the data-visualization page will provide file download options through links provided by the api_process method (since there is an option for random samples the handover id might be misleading since it points to the full set)

Implemented everything except for the  data-visualization


path_filestat_get: interpret LOOKUP_SYMLINK_FOLLOW

This PR adds support for passing lookup flags to path_filestat_get. The motivation came from the work on https://github.com/golang/go/issues/58141, especially implementing syscall.Lstat.
Without this change, an alternative implementation is possible using path_open + fd_filestat_get + fd_close because wazero allows passing stats, however, this fails on OSX because LOOKUP_SYMLINK_FOLLOW is translated to O_NOFOLLOW which causes open to fail with ELOOP because wazero doesn't set O_SYMLINK (I can follow up with a fix for that in a different PR).
I updates the tests to use the LOOKUP_SYMLINK_FOLLOW flag since that was the historical behavior being tested; however, I haven't found a paved path for testing with symbolic links. The tests use fstest.FS which ends up creating an internal adapter between fs.FS and sysfs.FS and always returns ENOSYS on calls to Lstat.
It seems that we would want tests that actually work on a local file system (e.g. something in testdata) so we can exercise an actual call to lstat, I wanted to get feedback before making too many changes to the test suite. Let me know what you would recommend!
Signed-off-by: Achille Roussel<EMAIL_ADDRESS>

I maybe found a compromise by implementing Lstat in terms of Stat in the fs.FS adapter; I left comments to explain the reasoning and added tests to exercise path_filestat_get with and without LOOKUP_SYMLINK_FOLLOW.
Let me know if you would like to see anything changed.

interesting point, let's leave it for now. I guess we can't solve this with //go:noescape? In any case, it was only conventional to pass like syscall.Stat. Feel free to change in this PR or next.

Unfortunately //go:noescape only applies to functions that do not have a body (e.g. implemented in assembly) so it won't help in this context.
Thanks for the quick review!


Renaming generated struct from a query that selects from multiple tables

Version
1.26.0
What happened?
I have a query like
-- name: MembersWithExternalId :many
SELECT m.*, mp.external_id
FROM member m
INNER JOIN member_provider mp ON mp.member_id = m.id;

This generates a query and struct like MembersWithExternalIdRow
I want to rename this generated struct to be ExternalMember
I've tried using the config rename to do this in many different forms, but none of the rename configs are working.
overrides:
  go:
    rename:
      members_with_external_id_row: "ExternalMember"
      memberswithexternalidrow: "ExternalMember"
      members_with_external_id: "ExternalMember"
      memberswithexternalid: "ExternalMember"

Relevant log output
No response
Database schema
No response
SQL queries
-- name: MembersWithExternalId :many
SELECT m.*, mp.external_id
FROM member m
INNER JOIN member_provider mp ON mp.member_id = m.id;

Configuration
overrides:
  go:
    rename:
      members_with_external_id_row: "ExternalMember"
      memberswithexternalidrow: "ExternalMember"
      members_with_external_id: "ExternalMember"
      memberswithexternalid: "ExternalMember"

Playground URL
No response
What operating system are you using?
Linux
What database engines are you using?
PostgreSQL
What type of code are you generating?
Go

Is this a user error on my part, or is this just not working? Has anyone successfully managed to do what I'm describing above?

It would be nice if we could re-use the same "custom" struct across different queries.
Continuing with the example above
-- name: MembersWithExternalId :many
SELECT m.*, mp.external_id
FROM member m
INNER JOIN member_provider mp ON mp.member_id = m.id;

-- name MembersWithExternalIdByLastName
SELECT m.*, mp.external_id
FROM member m
INNER JOIN member_provider mp ON mp.member_id = m.id
WHERE m.last_name = @last_name

Being able to configure sqlc so that both of these to return a collection of ExternalMember based on the composition of the columns that they return would be :pinched_fingers:

OK I have a stop gap solution here. In short: use a database view!
CREATE VIEW external_member AS
SELECT m.*, mp.external_id
FROM member m
INNER JOIN member_provider mp ON mp.member_id = m.id;

And then you can create your queries as follows
-- name: MembersWithExternalId :many
SELECT m.*
FROM external_member

-- name MembersWithExternalIdByLastName :many
SELECT m.*
FROM external_member
WHERE m.last_name = @last_name

And this results in
type Querier interface {
    ...
	MatchById(ctx context.Context, id string) (MatchWithTeamName, error)
	MatchByTeamsAndStartDate(ctx context.Context, arg MatchByTeamsAndStartDateParams) (MatchWithTeamName, error)
    ...
}


KeyError in /code/BERT_NER/utils_fine_tune/labels_seg.txt`

Hi,
I'm trying to run E2E_SoftNER.py. I think I have been able to resolve the references to the locations of a lot of the models and files that are associated with the repo, however, I'm getting an error, here's the traceback:
Exception has occurred: KeyError
8
  File "/Users/clemente/src/python/github/StackOverflowNER/code/BERT_NER/softner_segmenter_preditct_from_file.py", line 298, in evaluate
    preds_list[i].append(label_map[preds[i][j]])
  File "/Users/clemente/src/python/github/StackOverflowNER/code/BERT_NER/softner_segmenter_preditct_from_file.py", line 638, in predict_segments
    result, predictions = evaluate(args, model, tokenizer, labels, pad_token_label_id, mode="", path=input_file)
  File "/Users/clemente/src/python/github/StackOverflowNER/code/BERT_NER/E2E_SoftNER.py", line 186, in Extract_NER
    softner_segmenter_preditct_from_file.predict_segments(segmenter_input_file, segmenter_output_file)
  File "/Users/clemente/src/python/github/StackOverflowNER/code/BERT_NER/E2E_SoftNER.py", line 206, in <module>
    Extract_NER(input_file)

It looks like there might be something off with what this code expects for the format of  './utils_fine_tune/labels_seg.txt'. Looking at label_map here, it is just a dictionary that doesn't have a key for 8:
> label_map
{0: 'B-Name', 1: 'O', 2: 'CTC_PRED:0', 3: 'CTC_PRED:1', 4: 'md_label:O', 5: 'md_label:Name'}

whereas preds here seems to be an array with a pretty high number of values:
> preds
array([[ 0,  8, 13, ..., 10,  1,  0],
       [ 4, 13,  1, ...,  7,  3,  9],
       [ 9,  2,  0, ...,  9,  1,  9],
       ...,
       [ 0,  2, 13, ...,  0, 12,  0],
       [ 4,  2,  5, ..., 10,  5,  1],
       [ 4,  2,  6, ...,  9,  9,  9]])

Everything in the utils_fine_tune directory came from the megaupload link you provided, so it could be possible that there was some issue with either the archive, or the data.
If you find the time to take a look at this issue, thanks very much for contributing this code to the community and please let me know if there is anything else you might be interested in from me to help debug or further understand this issue. Hopefully it's just some misunderstanding on my end.

Hi Jeniyat,
Thank you for the contribution!
I'm facing the same error as @cuevasclemente
BERT_NER/softner_segmenter_preditct_from_file.py", line 298, in evaluate
preds_list[i].append(label_map[preds[i][j]])

KeyError: 11
If you could help understand this issue, it would be really helpful!

@cuevasclemente Hi, I am also trying to run E2E_SoftNER.py. You mentioned that you were able to resolve the references to the locations for many models and files. There might be a problem with my understanding, but I'm getting this error: "ValueError: /data/jeniya/STACKOVERFLOW_DATA/POST_PROCESSED/fasttext_model/fasttext.bin cannot be opened for loading!" since this model is not present when called from "StackOverflowNER-master/code/BERT_NER/utils_ctc/prediction_ctc.py", line 30
fasttext_model = fasttext.load_model('/data/jeniya/STACKOVERFLOW_DATA/POST_PROCESSED/fasttext_model/fasttext.bin')
I tried to load the other models in -> StackOverflowNER-master/resources/pretrained_word_vectors/ folder, but get "... wrong file format" error. What models did you use and how did you load them?

Hi, I think some of the files you need to change their file locations. You probably don't have a /data/jeniya/STACKOVERFLOW_DATA directory on your computer, so you would need to change where those files are pointing to on your local computer in prediction_ctc.py


TSDB: Simplify OOO Select by copying the head chunk

Instead of carrying around extra fields in Meta structs which let us approximate what was in the chunk at the time, take a copy of the chunk.
This simplifies lots of code, and lets us correct a couple of tests which were embedding the wrong answer.
Fixes #11837

/prombench main

No substantial differences seen in PromBench.

/prombench cancel


Object property wrongly claimed to be undefined when using Object.defineProperty

TypeScript Version:  2.9.1
Search Terms:
defineProperty
wrongly undefined
undefined
Code
type hash =
{
  [key:string]: any
  _original_values?: {}
}

let ret : hash = { } ;

if ( ret._original_values === undefined )
     Object.defineProperty( ret
                       , '_original_values'
                      , { enumerable: false
                        , value: { } } ) ;

const key = 1, value = 2 ;
ret._original_values[ key ] = value ;

Expected behavior:
It should not say the message: Object is possibly 'undefined'.
Actual behavior:
It does say it
Playground Link:
http://www.typescriptlang.org/play/#src=type hash %3D
{
  [key%3Astring]%3A any
  _original_values%3F%3A {}
}

let ret %3A hash %3D { } %3B

if ( ret._original_values %3D%3D%3D undefined )
     Object.defineProperty( ret
                       %2C '_original_values'
                      %2C { enumerable%3A false
                        %2C value%3A { } } ) %3B

const key %3D 1%2C value %3D 2 %3B
ret._original_values[ key ] %3D value %3B

Related Issues:
No

Control flow analysis only recognizes direct assignments, not assignments via a funciton like Object.defineProperty or Object.assign. In a case like this you'll have to use ret._original_values! to assert that it's not undefined.

Thank you a lot @andy-ms for the explanation. I imagined the first part of the message, I filed the "bug" for documentation or at least as a wish-feature for future references.
Kind of new with typescript, I did not know about the exclamation operator. Thank you for the tip!


Feature Request: Support Ingress

The Rhasspy web UI cannot be accessed through Home Assistant. See https://developers.home-assistant.io/docs/add-ons/presentation/#ingress

I had started this, but I will see if I can get it working this time :)

Any update? This would be really useful, because I can't access Rhasspy through my Nabu Casa Cloud URL without ingress.


is there any limit for the number of events related_events property can hold?

I have rule with frequency rule type. As a user i can specify num_events to any integer value. However, in cases where the nun_event is a large value say 1000 or 10,000, will related_events in such cases be able to send/hold 999 or 9999 events in itself.
Is there any limitation to what no. of events related_events can store at a time?
@Qmando , Please help!
Thanks..

@Qmando
I validated the max number events that related_events can hold. It is always 1 less that num_events value with no limit. While testing i gave num_events=1051(for testing purpose) and it is returning 1050 related events in related_events array from elastalert.
So i am assuming that it num_events can have value as large as 100000 and related_events(100000-1).
:)
Hope this is helpful to someone.


Basic accessibility improvements

Description
Put some missing alt attributes
Put document language declaration
Increase contrast colors between text and background
Motivation and Context
Puting alt attributes in the img tag are required for screen readers.
Putting a language declaration is to also to screen readers to know in what language the page is written.
And some colors were a bit flat or light, so darkening it is great to get better visualization for people who have some visual impairment.

Thanks @samu101108 👍
That's great!
I just removed the changes that were unrelated before merging it back (package.json, package-lock file, etc.)
And ignore my 57a5a19860bb9562927986310a688a83cf68319a commit. I thought GitHub would let me discard the changes to some of the files... but apparently when they say delete, they did mean delete 😄 I reverted that delete in a later commit.


bug(tree): Scroll sometimes jumps when tree is clicked

Might be fixed here: https://github.com/adobe/react-spectrum/pull/2725


Pickling does not work for compress_index()'d NNDescent objects (=> PyNNDescentTransformer not picklable by default)

Say I try to dump a pipeline with a PyNNDescentTransformer object in it, I get:
  File "/path/to/clus.py", line XXX, in yyy
    pickle.dump(estimator, modelf)
  File "/path/to/.venv/lib/python3.8/site-packages/pynndescent/pynndescent_.py", line 929, in __getstate__
    self._init_search_graph()
  File "/path/to/.venv/lib/python3.8/site-packages/pynndescent/pynndescent_.py", line 957, in _init_search_graph
    for tree in self._rp_forest
AttributeError: 'NNDescent' object has no attribute '_rp_forest'

The reason is that compress_index() deletes _rp_forest, which seems to be needed by the __getstate__ pickling logic.

Yes, that is definitely an issue. I'll have to see what the best way to make that all work is going to be.

Yes, that is definitely an issue. I'll have to see what the best way to make that all work is going to be.

I'm having trouble reproducing this -- I added some tests, but at least locally they ran fine. I'll see what the CI says about them.

I'm having trouble reproducing this -- I added some tests, but at least locally they ran fine. I'll see what the CI says about them.

It seems like CI failed with some other errors related to changes in sklearn. I'm fixing those now, and we'll see what we get, but there is certainly something a little odd going on. In terms of what may be at issue here: somehow the _rp_forest is getting deleted without the _search_forest getting constructed. I can't trivially rule out that such a thing is possible via some code path, but I am struggling to generate one that makes it happen. It's definitely a little bit of a corner case, but it also definitely needs to be fixed. Any test cases you can provide would be greatly appreciated.

It seems like CI failed with some other errors related to changes in sklearn. I'm fixing those now, and we'll see what we get, but there is certainly something a little odd going on. In terms of what may be at issue here: somehow the _rp_forest is getting deleted without the _search_forest getting constructed. I can't trivially rule out that such a thing is possible via some code path, but I am struggling to generate one that makes it happen. It's definitely a little bit of a corner case, but it also definitely needs to be fixed. Any test cases you can provide would be greatly appreciated.

Hi, this was in 0.5.1, and I thought I'd replicated this on master too, but not sure. It seems to be fixed on the current master. Thanks!
Just for completeness here is what was broken:
# -*- coding: utf-8 -*-
import numpy as np
import pickle

from pynndescent import PyNNDescentTransformer
from sklearn import metrics
from sklearn.cluster import DBSCAN
from sklearn.pipeline import make_pipeline
from sklearn.datasets import make_blobs
from sklearn.preprocessing import StandardScaler

X, labels_true = make_blobs(n_samples=1000, n_features=512, centers=5, cluster_std=0.4,
                            random_state=0)

X = StandardScaler().fit_transform(X)

pipeline = make_pipeline(
    PyNNDescentTransformer(n_neighbors=256),
    DBSCAN(eps=0.3, min_samples=10),
)
labels = pipeline.fit_predict(X)

print("Adjusted Rand Index: %0.3f"
      % metrics.adjusted_rand_score(labels_true, labels))

pickle.dump(pipeline, open("pipeline.pkl", "wb"))

Hi, this was in 0.5.1, and I thought I'd replicated this on master too, but not sure. It seems to be fixed on the current master. Thanks!
Just for completeness here is what was broken:
# -*- coding: utf-8 -*-
import numpy as np
import pickle

from pynndescent import PyNNDescentTransformer
from sklearn import metrics
from sklearn.cluster import DBSCAN
from sklearn.pipeline import make_pipeline
from sklearn.datasets import make_blobs
from sklearn.preprocessing import StandardScaler

X, labels_true = make_blobs(n_samples=1000, n_features=512, centers=5, cluster_std=0.4,
                            random_state=0)

X = StandardScaler().fit_transform(X)

pipeline = make_pipeline(
    PyNNDescentTransformer(n_neighbors=256),
    DBSCAN(eps=0.3, min_samples=10),
)
labels = pipeline.fit_predict(X)

print("Adjusted Rand Index: %0.3f"
      % metrics.adjusted_rand_score(labels_true, labels))

pickle.dump(pipeline, open("pipeline.pkl", "wb"))


Add queue to deal with heavy transactions

Add queue to deal with heavy transactions and distinguish the rpc transaction type, deal with the contract transactions.


You can also add this site

https://uiverse.io/
Open-Source UI elements for any project
Create, share, and use beautiful custom elements made with CSS or Tailwind.

thanks
you can fork the repo and add any websites you want. then add a Pull request :)

Thank you for issue. However, the website already exists in the repository :)


Fix exception message

Description
Fixed an exception message (see also #82: the message was not 'not completely right' but even wrong...)

Thanks for the correction!


Nested element node .setChildren not working

Description:
In scenarios where an element node is nested in an XML document, the setChildren method fails, despite the .getItemType() method returning element. As such, there is no way in Ballerina 1.1.0 to set the children/text value of the afformentioned node.
Steps to reproduce:
Executing the main function below will result in the setChildren method panicking on the line "nested.setChildren("New value");
public function main() {
    xml elementNode = xml`<elementNode>Old value</elementNode>`;
    elementNode.setChildren("New value");

    io:println("working", elementNode);

    xml elementNestedNode = xml`<elementNode><nested>Old value</nested></elementNode>`;
    xml nested = elementNestedNode["nested"];

    io:println(nested.getItemType()); // element

    nested.setChildren("New value"); // panicks

    io:println("not working", elementNestedNode); // never called
}

Using getItemType(), it is verified that the node in question is in fact of type ELEMENT.
Affected Versions:
1.1.0
Suggested Labels (optional):
xml, xml functions

Fixed in 1.1.2


Notification: Fix SMTP error handling to avoid useless sending tries

update emailjs
convert to try catch construct with sendAsync() from emailjs
type email notification task

Update:

Fix and simplify SMTP server switch;
Fix logging of missing SMTP backup configuration section
Make EMailNotificationTask a singleton. While at it, also make
RemotePushNotificationTask a singleton
Rename also notifications sourceDescr field to match the new name

Update 2:

Remove SMTP server in use attribute used to optimise the branch prediction

Signed-off-by: Jérôme Benoit<EMAIL_ADDRESS>

@jerome-benoit
Why adding disable flag for backup smtp server instead of not providing the conf. In both case we need to update conf so disabling is just removing the backup conf.
Furthermore, if there is no backup conf, we should notify the Admins when the primary fails and if there is one, we notify  when the backup fails.
Let me know.

@jerome-benoit
Why adding disable flag for backup smtp server instead of not providing the conf. In both case we need to update conf so disabling is just removing the backup conf.

In fact, we do not need to have a backup SMTP relay. The client we use already handle email sending failure correctly and properly queue for resend email according to the error returned.
The code that will trigger the SMTP backup usage is not doing the error type filtering and retry when it should not: - email does not exist anymore on the domain;
- relay under short maintenance;
- ...
The client can put the message in the queue and we can also send it via the SMTP backup and if the backup sending have a failure, we also put the message in the SMTP backup queue. And the same message can then be sent several times.
Instead of removing the SMTP backup code, I've just make it conditional to begin with and disabled it by default.
If we want to re-add the SMTP backup feature, we first have to make sure that the email have not been queued by the emailjs client.

Furthermore, if there is no backup conf, we should notify the Admins when the primary fails and if there is one, we notify when the backup fails.

Ok.
We put the backup in place at the beginning because the email service in 1&1 could be blocked due to spam detections.
When you wrote the email client is handling the smtp server error you mean the oss we are using right?
Have you checked in the logs that the retry is really occurring?
If this is the case, indeed we can disable the backup.
And what about the notification to the admin, useless too?

Ok.
We put the backup in place at the beginning because the email service in 1&1 could be blocked due to spam detections.

The SAP SMTP relay is reliable. Because of the current conditional use if the backup SMTP server, emails try to go through it even if they really do not have to.

When you wrote the email client is handling the smtp server error you mean the oss we are using right?

All emails on a emailjs SMTPClient instance are stacked and they are removed from it if and only if sent successfully.

Have you checked in the logs that the retry is really occurring?

Yes, for all no more existing addresses for example, the backup is used for nothing and the mail is stacked in case of relevant errors. And if the backup allow back mails to be sent, its stack is flushed and people get 'spammed'.
That pattern have occurred for other SMTP error types and that's why some vendor engineers have been 'spammed' on testcharger QA tenant.

If this is the case, indeed we can disable the backup.
And what about the notification to the admin, useless too?

No, I'm working on it to make it generic and cover all SMTP error types. That's why the PR is now a draft.

I'm working on it to make it generic and cover all SMTP error types. That's why the PR is now a draft.

Ok thanks.
So draft = I should not merge?

I'm working on it to make it generic and cover all SMTP error types. That's why the PR is now a draft.

Ok thanks.
So draft = I should not merge?

I think you can't even merge a draft PR, GitHub should not allow it.

After some more testing, the message queueing does not seem to work as described.
So using a backup SMTP will still be required but only when necessary, filtering on the SMTP error type will be added.

Already checked and read your comments!
backupInUse member variable is still there in GitHub:
https://user-images.githubusercontent.com/25266945/106907687-d3702300-66fe-11eb-965c-98445da8597f.png

You then have an issue with your browser cache or GitHub cache. Checkout and pull the branch to read the up to date code.

I simply asked you to remove this handling of the SMTP servers in the first place and you created a singleton instead!
It's neither debatable nor to you to decide.

I’m not going to make code changes that have no sense and degrade memory usage just because.
Unless it’s possible to have a constructive horizontal engineering discussion regarding e-mobility design, I’ve asked to the management to minimise my direct contributions to the e-mobility development to the strict minimum.
--
Jérôme Benoit aka fraggle
Piment Noir - https://piment-noir.org
OpenPGP Key ID : 27B535D3
Key fingerprint : B799 BBF6 8EC8 911B B8D7 CDBC C3B1 92C6 27B5 35D3

I’m not going to make code changes that have no sense and degrade memory usage just because. Unless it’s possible to have a constructive horizontal engineering discussion regarding e-mobility design, I’ve asked to the management to minimise my direct contributions to the e-mobility development to the strict minimum.

How much memory are we talking about? kB?
It's just an SMTP instance.
I don't see the memory optimisation here.


Convert example templates to demonstrate the new proper usage of jq i…

This relies on the jq_rework pull request being merged in to main for the Direktiv project. Do not merge before then.

Just a quick note we will also need to change the workflow templates to provide the new jq syntax


Adjust dapparatus for pDai

This adds LeapDAO network support to Dapparatus.

If we'll use this fork directly from github, maybe will be a good idea to remove build directory from gitignore

https://github.com/leapdao/dapparatus/pull/2#issue-271679862


Refresh on csrf token expiration

Hi,
This is a fix for the issue #1062

Shouldn't it be inside the head tag though ?


direct people to definitions.html to find out if a field is mutable

direct people to definitions.html to find out if a field is mutable when doing a kubectl replace/patch;
add an example of kubectl patch that involves a merge key.
fixes #11141
@nikhiljindal @mikedanese @bgrant0607

Navigating to the models is just too painful.  Let's not do this until #10966 is done, and then link to that.

I've updated the comment to direct people to check the definitions.html. Could someone review this? Thank you.

@nikhiljindal, sorry for the long delay. I've updated the URL as requested. PTAL. Thank you!

LGTM, thanks!

Looks like you need to run hack/run-gendocs.sh for travis and shippable to pass.

Shippable fails at verify-gendocs.sh, but the PR passes the script on my local machine. Close and reopen to trigger shippable and travis.

Travis still complaining "/home/travis/gopath/src/github.com/GoogleCloudPlatform/kubernetes/docs/ is out of date. Please run hack/run-gendocs.sh"

LGTM was before last commit, removing LGTM

LGTM was before last commit, removing LGTM

@k8s-bot test this [contrib/submit-queue: candidate for merging]

Automatic merge from SubmitQueue


Failed to install xdg-utils from Azure CLI

when I enter the following command on the Azure CLI to enable AZDS CLI I get the following error:
You may be prompted for your administrator password to authorize the installation process.
/tmp/tmp_ln81pca/azds-linux-setup.sh: line 88: sudo: command not found
[INFO]    Installing xdg-utils...
/tmp/tmp_ln81pca/azds-linux-setup.sh: line 29: sudo: command not found
[FATAL]   Failed to install xdg-utils.
Azure Dev Spaces CLI not installed properly. Visit 'https://aka.ms/get-azds' for Azure Dev Spaces.

Also, I have enabled Dev Spaces in the Azure portal prior to trying the above command

In what kind of Linux environment are you trying to run the command? I think we may currently assume that you can always "sudo" on a Linux machine.

I installed Azure Kubernetes Service through the Azure portal, not sure but I think it's a Windows machine, and the command is entered using the Portal Azure CLI bash terminal. Sorry if that's not enough info, I'm a bit of a newby at Kube.

Thanks, that's the information I needed. We don't currently support running the dev spaces command line from within the portal bash terminal (aka "cloud shell"). It should work if you try from another place (e.g. your machine) where you have the "az" command line tool installed.

Thanks Stephan, that's a bit weird because this article (which I was following) suggests it's possible:
https://docs.microsoft.com/en-gb/azure/dev-spaces/troubleshooting
The the section Error 'Failed to create Azure Dev Spaces controller' specifies that you can delete the controller using the AZDS CLI
However I will try your suggestion by using this on my local

Sorry about that, the docs are a little unclear. I'll ask our doc writer to update this.


BetterLocation message - show weather

Add option to show current weather in the location, example:
OpenLocationCode 9F2P3CQC+26:  🗺 50.087563,14.420563
BetterLocation | Street view | Panorama | Mapy.cz | Google
🇨🇿 Mikulášská 22, 110 00 Praha 1-Staré Město, Czechia
Sunny +14(12)°C, ← 20 km/h, 0.0 mm
Inspiration taken from  https://wttr.in/Prague (Github)

Closing. Feel free to re-open if interested.
Reason:

probably not as helpful as I was originally thinking
this can be already achieved using via Pluginer (see #117)


Result of PointNeXt in scannet.

Congratulations on your amazing work!
I notice that your paper lists the result of PointNeXt in scannet. However, I can't find the result in the PoinNeXt paper. Could you tell me where the result came from?

It is from the PointNeXt paper (arixv v2).


Support UUID

Do you plan to support UUID type and allow it to be used as a primary key?

Hey, have you tried something like:
# fields.py
from sqlalchemy.dialects.postgresql import UUID
class UUIDField(ModelField, typesystem.String):
    def get_column_type(self):
        return UUID()

# models.py
class Thingy(orm.Model):
    id = UUIDField(default=uuid4, format="uuid", primary_key=True)

@thiagovarela seems it's not enough
when we use as_uuid=False we expect to get an str object from DB
when we use as_uuid=True we expect to get uuid.UUID object from DB
but actually we get asyncpg.pgproto.pgproto.UUID in any case.
Can we implement something like a to_python method?


Memory leaks when close to OOM

Lua functions such as lua_pushlstring can long jump out on failure.
Your code doesn't protect against this, and will end up leaking your mallocd buffer
e.g. https://github.com/philanc/luatweetnacl/blob/master/luatweetnacl.c#L323
Consider using lua_newuserdata instead of malloc so that you get free/automatic clean up!

Thanks. I will look into it.

If I understand correctly (I am a bit naive with the C interface, especially userdata!),
what you suggest  is to replace this sort of sequence using malloc():
char * buf = malloc(buflen);
some_C_func(buf, buflen, x, y, z);
lua_pushlstring (L, buf, buflen);
free(buf);
return 1;
With this:
char * buf = lua_newuserdata(L, buflen);
some_C_func(buf, buflen, x, y, z);
lua_pushlstring (L, buf, buflen);
lua_remove(L, -2); // must remove the userdata from the stack
// let the Lua GC get rid of the allocated userdata later
return 1;
is it correct?

Yes, that would work. No need to call lua_remove either.

A different approach is to use a luaL_Buffer with luaL_buffinitsize. However that only works in 5.2+ (though you can get it via compat-5.3)

but if I don't call lua_remove, the userdata I pushed is not popped and the stack keeps growing...!?  or maybe I just don't get how the stack works?

http://www.lua.org/manual/5.3/manual.html#lua_CFunction

To return values to Lua, a C function just pushes them onto the stack, in direct order (the first result is pushed first), and returns the number of results. Any other value in the stack below the results will be properly discarded by Lua.

Ah, ok! I get it. Thanks for the explanation.

Ok. I did replace all the malloc/free with lua_newuserdata.
Thanks for the suggestion.


[Function builders] Infer function builder from a protocol requirement.

Allow a protocol requirement for a function or property to declare
a function builder. A witness to such a protocol requirement will
infer that function builder when all of the following are two:

The witness does not explicitly adopt a function builder
The witness is declared within the same context that conforms to the
protocol requirement (e.g., same extension or primary type declaration)
The witness's body does not contain a "return" statement (since those
disable the function builder transform).

@swift-ci please smoke test

@swift-ci please test source compatibility

@swift-ci please smoke test

@swift-ci please test source compatibility

@swift-ci smoke test macOS

Debug source compatibility failure in ACHNBrowserUI is unrelated. It passed in Release, so I think we're fine.

What you are thoughts on the situation where closure body is a function body but it has a return just as a force of habit?

I think it's reasonable to have that as a diagnostic path---if there's are explicit returns and we have some sort of type conflict in the returns, in a closure that was matched up against a parameter that has a function builder, try dropping the returns. For this PR, we'd want to recompute the inference path while ignoring the returns to fit in with such a diagnostic.

To make it easier for diagnostics would it be possible to make return of this function reacher e.g. either type or a failure kind - return in the body, used on getter etc.? applyFunctionBuilder should probably do the same thing...

To make it easier for diagnostics would it be possible to make return of this function reacher e.g. either type or a failure kind - return in the body, used on getter etc.? applyFunctionBuilder should probably do the same thing

When we do that diagnostic, we'll want to go through inferFunctionBuilderType again with an "ignore explicit returns" bit on it. Checking for explicit returns early avoids a bunch of name lookups and conformance resolutions that we don't want all the time (because they add incremental dependencies).

I asking because instead of assuming that ‘return`s could be a problem we can get an indication from this method what exactly went from and act on that when trying to call the method again for diagnostics...

I asking because instead of assuming that ‘return`s could be a problem we can get an indication from this method what exactly went from and act on that when trying to call the method again for diagnostics...

If we need more than what I'm suggesting, we can extend the return type. We shouldn't do it proactively because (1) we want to minimize dependencies when not in recovery mode, and (2) we might not need the extra information until we have that diagnostic.

I see that there is a new diagnostic about adding explicit return added by this PR, why not add a reverse case as well and see what needs to be done to support that?

I see that there is a new diagnostic about adding explicit return added by this PR, why not add a reverse case as well and see what needs to be done to support that?

Happy to look at a general improvement for function builders diagnostics to try to address this failure case (an explicit return unexpectedly disabling the function builder transform), but that should be separate. It's a good improvement independent of this PR, and doesn't get significantly harder with this PR.

Sure! It would be great to address that sooner than later though because not having a good diagnostic there is very confusing.

@swift-ci please smoke test

@swift-ci please smoke test

@swift-ci smoke test Linux

I'll do some cleanup after this PR for stuff that still needs it.


error E_PROJECT_OPTIONS tab->Graphics Library should be TFT_eSPI

Describe the bug
I use the TFT_eSPI library from Bodmer. Wen I create the code, in the "_GSLC.h" file it shows this error
Device hardware

MCU: ESP32
Display with link: ILI9341 2.8" resistive https://www.amazon.de/gp/product/B08SBTBRZV/ref=ppx_yo_dt_b_asin_title_o08_s00?ie=UTF8&psc=1
GUIslice config selected:  esp-tftespi-default-xpt2046_int.h

Please confirm whether:

Display works correctly with standalone display driver library examples (eg. TFT_eSPI graphicstest, Adafruit graphicstest, etc.) without GUIslice: I use it in a few own programs with TFT_eSPI
Touch works correctly with standalone touch library examples without GUIslice: I use TFT_eSPI

Expected behavior
I selected in the GUIslice Builder -> General -> Graphics Library ---> TFT_eSPI
Also I enabled the include in the GUIslice_config.h  ->  esp-tftespi-default-xpt2046_int.h
Initialization messages
#error E_PROJECT_OPTIONS tab->Graphics Library should be TFT_eSPI
Additional info
I manually slashed the error message in _GSLC.h file out.
// #error E_PROJECT_OPTIONS tab->Graphics Library should be TFT_eSPI

@umsmin This comes up often enough that I just added it to my faq.pdf with release 0.17.b16.  A future Release will issue  Warning to modify your Project using the Project Options tab after making changes to your User Preferences.
All new projects will use the values inside General preferences  but your existing projects will still have the old values and will need to be modified by going to the Project Options tab and changing the graphics library.
Otherwise your project will continue to use the previous values. Anytime you make changes inside the General Tab you should always double check your values inside your open project.
Paul--

Thanks Paul for this information. Now it's working. But one question, how can I add the background image I've added in the GUIslice Builder. I use the ESP32 and display without SD-card. Must I create a data folder into the project and upload it with the SPIFFS uploader in the Arduino IDE?
Uli

@umsmin You know I wasn't sure myself if spiffs would work or not.  So I made a test program using my builder and it does work but for one minor issue.  After you set use background=true and select your BMP file the builder assumes you are using the SD card for storage:

You need to change this to gslc_GetImageFromFile:

and of course upload your image from your project's sub-folder data before running your App.
Paul--

Sorry for my late replay. This things i know. I uploaded the BMP image with 24 Bit and resolution of 320x240. Added in the Builder config exactly on this rows you shown. But nothing, okay not nothing. Now all pages will be smashed together. When I push any button to get a page, the last screen will also been shown. Also the popups will stay there.
Even your examples with the Logo from Guislice Builder will not be shown.
Thanks Uli

@umsmin Well, once again I did a test with a background BMP loaded from spiffs and it worked fine.  Since you also had a problem with the GUIslice logo I assume you mean you tried the example ex44_bld_spiffs and it failed for you.  I just now ran this example and as expected it also worked fine.
Before you mentioned the example ex44_bld_spiffs I thought it might be your BMP file but the example failing rules that out.   That leaves us with very few answers.  What version of GUIslice API are you using?
Post the number from GUIslice/src/GUIslice_version.h my version is:
#define GUISLICE_VER "<IP_ADDRESS>"

while I used TFT_eSPI version 2.4.72 and there is only one release of TFT_eFEX 0.0.5
If the versions match then the only thing I can think of is that BMP are not being loaded into your data folder correctly.   GUIslice uses SPIFFS but LITTLEFS is another file system and its not same format.
Paul--

The TFT_eSPI version is 2.4.76 but on the Arduino IDE it shows 2.4.79 but when I get your version, nothing changed.
The Guislice version is #define GUISLICE_VER "0.17.0". On the Arduino IDE it shows only version 0.16.0 and 0.17.0 or older.
But also on Github it shows the same. How can I get your version, maybe that's the reason?
Another question what I have, is it possible to make a "Bootscreen"? I tried but it's too late when I get it.
Uli

@umsmin No, I just downloaded GUIslice 0.17.0 and it also worked fine.  So that's not it.
Just for information to get the latest GUIslice API go to the GUIslice repository GUIslice and select the code drop down and then download zip file.
I am at a lost to say what is your problem.  Seems only file corruption is left.  Attached is a stand alone app I just put together using just TFT_eSPI , TFT_eFEX and JPEGDecoder.
It will scan spiffs file system and list all files it finds and if one of them is BMP  or JPG file it will display it on your TFT screen, wait 3 seconds and go find another.
You should open your Serial Monitor and set it to 9600 baud.
If you load images from my supplied data folder you should see this output on your Serial Monitor:
Listing SPIFFS files:
=================================================
  File name                              Size
=================================================
/back1_24.bmp                        230456 bytes
/back2_24.bmp                        230456 bytes
/exit_g24.jpg                         23364 bytes
/exit_n24.jpg                         22943 bytes
/logo.jpg                             31765 bytes
run time in ms: 22237
=================================================

attached is the zip file of this test.
bmp_esp32.zip

@umsmin If you want to create a splash screen or bootscreen at startup please post a new topic so this one doesn't get muddied up.
Paul--

I think that's the problem:
/wasser.bmp                          153666 bytes
`BMP format not recognised.
Now I used a sketch for SPIFFS handling. With this the upload works perfectly.
Thanks
Uli

@umsmin Glad I was able to help.
Paul--

Sure!
You made this great stuff.
Thanks
Uli
I think we can close it


[SPARK-44414][SQL] Fixed matching check for CharType/VarcharType

What changes were proposed in this pull request?
The input/output Attribute is preferred for validation using the __CHAR_VARCHAR_TYPE_STRING type specified in its Metadata.
If not specified, use the Attribute datatype again.
Why are the changes needed?
If the input/output Attribute specifies a __CHAR_VARCHAR_TYPE_STRING tag in its Metadata, then the type specified by __CHAR_VARCHAR_TYPE_STRING should be used for validation.
Otherwise, use the Attribute DataType for verification  to avoid the following exception：
org.apache.spark.sql.AnalysisException: unresolved operator 'AppendData TestRelation [x#8, y#9], true;
'AppendData TestRelation [x#8, y#9], true
+- TestRelation [x#6, y#7]

How to reproduce？
val analyzer = getAnalyzer
// check varchar type
val json1 = "{\"__CHAR_VARCHAR_TYPE_STRING\":\"varchar(80)\"}"
val metadata1 = new MetadataBuilder().withMetadata(Metadata.fromJson(json1)).build()

val query1 = TestRelation(StructType(Seq(
StructField("x", StringType, metadata = metadata1),
StructField("y", StringType, metadata = metadata1))).toAttributes)

val table1 = TestRelation(StructType(Seq(
StructField("x", StringType, metadata = metadata1),
StructField("y", StringType, metadata = metadata1))).toAttributes)

val parsedPlanByName1 = byName(table1, query1)
analyzer.executeAndCheck(parsedPlanByName1, new QueryPlanningTracker())

Does this PR introduce any user-facing change?
Yes. The above code works fine.
How was this patch tested?
new UT

cc @cloud-fan

Is there an end-to-end repro? char/varchar is not officially supported in the type system, or it might not work if you manually construct some arbitrary logical plans.


[DON'T MERGE] OCCA Port

… in prototype, compiles but doesn't work)

All Vector methods are in OccaVector except

Load
SetDataAndSize, NewDataAndSize
MakeDataOwner
operator (), Elem
OwnsData, StealData
AddElementVector
Print, Print_HYPRE
Randomize
CheckFinite
Sundial methods: Vector(N_Vector), ToNVector

I think the only ones that would "need" to be added are

Ownership methods: MakeDataOwner, OwnsData, StealData
AddElementVector

Ones that seem useful for setup or debugging can be copied from Vector -> OccaVector

Randomize, CheckFinite

Tests for all implemented methods are in tests/occa/main.cpp which are currently passing for Serial mode. There is an issue with abs() on OpenCL (ambiguous method) and haven't tried it in CUDA. Similar methods pass for CUDA, found in examples/usingArrays/main.cpp inside the OCCA 1.0 branch, so I'm guessing these will pass for CUDA as well. Regardless, will test later with CUDA.

Changes Unknown when pulling f3939cae28a322eb3ed581cdf9574eb5d09382e7 on occa-dev into ** on master**.

Changes Unknown when pulling a5ef1082bbec44e7d7fe90dc2d4bbe1d9f966fde on occa-dev into ** on master**.


Refactor: Don't use external scanner to parse text tokens

Closes https://github.com/stsewd/tree-sitter-comment/issues/15

Weird, I rebased this PR using GitHub's rebase button, and the commits ended up without my signature :man_shrugging:
https://github.com/stsewd/tree-sitter-comment/commits/master

If you arrived here worried about those commits, it was really me, commits from this PR are signed https://github.com/stsewd/tree-sitter-comment/pull/21/commits, diff is the same :D


Text was not updated properly

"To encapsulate that action, you will create a new method on InventTable and name that method defaultMyInventLocationId."
should be changed to
"To encapsulate that action, you will create a new method on InventTable and name that method myDefaultInventLocationId."
2.
last code line
"inventTable.defaultMyInventLocationId();"
should be changed to
"inventTable.myDefaultInventLocationId();"
Originally posted by @TrudAX in https://github.com/MicrosoftDocs/dynamics-365-unified-operations-public/issues/424#issuecomment-431422574

I re-activated GitHub issue 424.  So closing this one as a duplicate.


[EBPF-592] gpu: improve checks for supported metrics in NVML collectors

What does this PR do?
This PR improves the support check in NVML collectors, so that we don't have repeat attempts to retrieve unsupported metrics.
Motivation
Describe how to test/QA your changes
Possible Drawbacks / Trade-offs
Additional Notes

/merge


Pop link to page into ReadMe

Adding to this - I need to make a little guide on how the vault/project are organized in the README.md as well


renovatebot(deps): update shibbolethidp to v3.4.5

This PR contains the following updates:

Package
Update
Change

net.shibboleth.idp:idp-attribute-api
patch
3.4.4 -> 3.4.5

net.shibboleth.idp:idp-attribute-filter-api
patch
3.4.4 -> 3.4.5

net.shibboleth.idp:idp-attribute-resolver-api
patch
3.4.4 -> 3.4.5

net.shibboleth.idp:idp-core
patch
3.4.4 -> 3.4.5

net.shibboleth.idp:idp-profile-impl
patch
3.4.4 -> 3.4.5

net.shibboleth.idp:idp-profile-spring
patch
3.4.4 -> 3.4.5

net.shibboleth.idp:idp-saml-api
patch
3.4.4 -> 3.4.5

net.shibboleth.idp:idp-saml-impl
patch
3.4.4 -> 3.4.5

Renovate configuration
:date: Schedule: At any time (no schedule defined).
:vertical_traffic_light: Automerge: Disabled by config. Please merge this manually once you are satisfied.
:recycle: Rebasing: Whenever PR becomes conflicted, or if you modify the PR title to begin with "rebase!".
:no_bell: Ignore: Close this PR and you won't be reminded about these updates again.

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

This PR has been generated by Renovate Bot.

PR has been edited
:construction_worker: This PR has received other commits, so Renovate will stop updating it to avoid conflicts or other problems. If you wish to abandon your changes and have Renovate start over you may click the "rebase" checkbox in the PR body/description.


Router should return false if no rules were matched

Currently it returns true in some cases

Now it works as expected. Default "unmatched" handler prints "Command not found" message and returns true because it has processed the command. It can be overridden to return false.


Unresolved reference: println

I just installed this and I have a file that is only a main function with println, the extension however tells me  "Unresolved reference: println", im sure this is a mistake on my side. I tried with the kotlin and kotlinc binaries in the path (im on windows 10 18362). Help would be much apreciated

This was fixed in https://github.com/fwcd/kotlin-language-server/pull/154, but hasn‘t been released yet. In the meantime, you could try a Kotlin project that uses Gradle, e.g. kotlin-quick-start.