Parser errors though code translates properly

Thanks for this language server, exactly what was looking for right now.
I am trying to use this in nvim to compile some Amiga code targeting 68020 and am getting some Parser errors.  Here's a test case, which compiles but produces that error:
    machine  68020
start:
    move.w    .base(pc,d7.l*2),d1
    end

Hey, thanks for reporting this. Glad the project is useful to you!
The tree-sitter parser is currently missing support for some 68020+ addressing modes, including scaled indexes in this case. I'll make a start on implementing it.

Should this already fix the reported snippet?

Yeah it should. I tested it briefly but haven't tagged a new release yet.

Tried on a second machine. Same, same. So at least I am again convinced that I didn't screw things up completely.

 I'll do some proper testing and sort it tonight.

Just to check how you're linking the nvim lsp config up to your local version rather than expecting a global npm package, the way I do it is to override the cmd option to specify the full path of the script:
lspconfig.m68k.setup {
  cmd = {'node', '/Users/batesgw1/m68k-lsp/server/cli.js', '--stdio'},
   ...

You probably already know all this but I'm tearing my hair out a bit because I'm still seeing that the latest commit resolves the issue for me! I'll keep investigating.

I had completely uninstalled the global variant. If I am doing a ps, I can see the following:
docbobo    12592  2.8  0.5 2735184 82000 pts/4   Sl+  20:43   0:00 node --no-experimental-fetch /home/docbobo/.local/bin/m68k-lsp-server --stdio

It does run however, if I start it with the cmd from above.... So apparently your fix did work - thanks! Now I need to figure out why it didn't work the other way...

Oh - BTW. That executable above was a link to /home/docbobo/Sources/github.com/m68k-lsp/client/node_modules/.bin/m68k-lsp-server
So both should be running code from the same server directory. Or shouldn't they?

No, that's your problem right there. The vscode client still has a dependency on the latest server npm package, which as I haven't make a release yet will still be v0.8.0 and won't include the fix. To test the unreleased server code you need reference it like I described. cli.js is effectively the local filename of the executable.
Mystery solved I think!

I've released v0.8.1 including the fix so you should be able to just install the latest package now. Let me know if you're still having any problems. Thanks again for reporting this.
Just to warn you, I'm aware that there are other 68020+ addressing modes that will currently cause a parser error including base and outer displacements. I've created a separate issue on tree-sitter-m68k and I'll look at this when I get some time.


crypto apis not returning number of bytes written in output buffer

In structure cipher_pkt, there is an output field 'out_len'. This is supposed to return back to the caller number of bytes written in output buffer.
The said field is left uninitialized by the crypto apis (e.g. cipher_ccm_op).

Up to the crypto driver to do so. But heh, now you mentioned this: both mtls and tc shim drivers do not set it. Only the ataes132c and cc2520 do it properly.

Right. Only mtls and tinycrypt shims miss it.
On 02-Nov-2017 1:16 PM, "Tomasz Bursztyka"<EMAIL_ADDRESS>wrote:

Up to the crypto driver to do so. But heh, now you mentioned this: both
mtls and tc shim drivers do not set it. Only the ataes132c and cc2520 do it
properly.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/zephyrproject-rtos/zephyr/issues/4684#issuecomment-341341690,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AM4O3ClzngnenKPYkomUpUSaiQGB2jAvks5syXM-gaJpZM4QPPDV
.

@vakulgarg Is this still an issue?

Yes, it should still be an issue. I do not find any updates or fixes in the mtls, tinycrypt shim drivers.

@tbursztyka @lpereira Will you please provide a fix?

@MaureenHelm Just sent a PR fixing this.
I'm not sure how correct this is, but it seems that, at least on the CCM encryption/decryption, both mbedTLS and TinyCrypt agree on how to calculate the output length.
For the other primitives supported by the TinyCrypt shim but not the mbedTLS shim, I believe things are correct after inspecting the respective TinyCrypt code, but I'd expect someone that knows more about this to review.

@lpereira Thank you!


[FEATURE] Set up a CI/CD pipeline

Description
Let's improve a deployment process by setting up CI/CD pipeline.
Screenshots
No response
Additional information
No response
👀 Have you checked if this issue has been raised before?

[X] I checked and didn't find similar issue

🏢 Have you read the Contributing Guidelines?

[X] I have read and understood the rules in the Contributing Guidelines

Are you willing to work on this issue ?
Yes I am willing to submit a PR!

Hi, thanks for making a PR, please enlighten more on what you plan to do in this issue. Mention tools and steps, thank you.

Okey, i think about using Travis CI. And firstly i would add code-linters (to check eslint and typescript) step to pipeline, and secondly probably some tests. What do you think about it?

Never used Travis, you can make a draft PR so we really see what's to do

hi @Cor4zon still interested in this? never saw that draft PR


[Collaboration] Work with Team 3 to determine if entity exists

Description
Task: Collaborate with team 3 to determine if an entity exists in the game
Feature: Enemies
Since the user has to beat the level 1 boss to be able to advance onwards to level 2, Team 5 requires a conditional check to see if Level 1 boss is alive or not. Hence, collaboration with team 3 (enemies) is necessary in order to develop a method that returns the desired value of True or False which ultimately allows the player to progress the game.
Milestones
List of steps that need to be completed for this task.

[x] Explore how to select the specific entity (Sep. 20)
[x] Develop a method that checks if the entity is placed on map (Sep. 21)
[ ] Implement the conditional in the method that allows the user to transition between levels (Sep. 22)

Completion Deadline: October 4th
Documentation

Enemies feature page
Map transition

Member

Team 3
Team 5

In ForestGameArea.java I have created a method getHeracles() which will let you select Heracles the level 1 boss. I have also created ifHeraclesOnMap() which will let you check if Heracles is placed on the map. That is also in ForestGameArea.java, and finally, in Entity.java there is a method isDead() which will return true if an enemy is dead. This can be used for checking if Heracles is dead.

These methods have been uploaded to main.

Thank you, I will be incorporating the ForestGameArea.ifHeraclesOnMap() method to see if the boss exists or not, much appreciated!


Fix/hocs 4431 create stage fix

I'm never keen for an entities service to access another entities repository, but I understand you'd have a circular reference if you did this 'properly' and it isn't feasible to unpick that as part of this PR..


Added module for managing DNS zones

Added DNS module for registering Route53 zones
Added DNS record creation to S3 site for xpro legacy certs

👍


configs,ext: Updated the gem5 SST Bridge to use SST 13.0.0

This change updates the gem5 SST Bridge to use SST 13.0.0. Changes are made to replace SimpleMem class to StandardMem class as SimpleMem will be deprecated in SST 14 and above. In addition, the translator.hh is updated to translate more types of gem5 packets. A new parameter ports was added on SST's side when invoking the gem5 component which does not require recompiling the gem5 component whenever a new outgoing bridge is added in a gem5 config.
Change-Id: I45f0013bc35d088df0aa5a71951422cabab4d7f7

@hnpl : Can you give this a lookover. You're the closest we have to an expect in this.

It's not a huge problem but this is one of those cases where it's nicer to break up your commits. You made a lot of formatting changes here in addition to just updating the SST bridge. It'd be nice to have these two things segregated so I don't lose focus reviewing. That's not a request for change, just an FYI for the future. You can have more than one commit in a PR.
I trust you've actually run the sst example? I believe that's the only test we have.

The reason that I have put this file within this commit as the file is also related to the SST setup that is needed to run the example entire example.
I can actually split this up into two commits. This example has one more correction to be made. I can revert this file and push another change as a separate commit with configs tag.

This is outside of the scope of this change, but since we updated to SST 13.0.0, we should update the test as well.
Here is the test https://github.com/gem5/gem5/blob/develop/tests/deprecated/nightly.sh#L154. I'm not sure why it says deprecated but not ported to supposedly new tests.
Here is the Dockerfile used for testing https://github.com/gem5/gem5/tree/develop/util/dockerfiles/sst-11.1.0.

Hmm... is this going to break the daily tests?
See https://github.com/gem5/gem5/blob/stable/.github/workflows/daily-tests.yaml#L214 and #436


Completed dinodex. Ready to check

First iteration.

Nice first iteration.  Take a look at the comments, refactor and resubmit.
You'll want to look at the Enumerable module.  Also, think on the single responsibility principle.  Where should the logic reside?  What is the interface you'd like to see in a dinosaur catalog library?
Let me know if you have any questions.


ExceptionFilterAttribute error

    public class CustomExceptionAttribute : ExceptionFilterAttribute
    {
        public override void OnException(ExceptionContext context)
        {
            var exception = context.Exception;

            var errorResp = new ResponseMessage
            {
                Message = exception.Message,
                ErrorCode = "0001",
                Body = exception,
                IsSuccess = false
            };
            var result = new JsonResult(errorResp);
            result.StatusCode = (int)HttpStatusCode.OK;
            context.Result = result;
        }
    }

For Chrome:  Failed to load resource: net::ERR_CONNECTION_RESET

Please a description of the problem that you are having and if possible a sample app that we can use to investigate the issue that you are having. Thanks!

Closing due to lack of response


Move summernote to plugin and make others editors

One option of new editor may be: http://www.sitepoint.com/10-best-html-wysiwyg-plugins/

done


Exteriment settings have plain text links

Type: Bug
Found verifying #15635

Open settings and search python opt

bug
The python.experiments.optInto and python.experiments.optOutFrom settings both have links that are not actually clickable

The settings likly just need to be rendered as markdown (although it would be better to use a proper link with a title too: [some text](https://github.com/microsoft/vscode-python/wiki/AB-Experiments))
Extension version: 2023.1.10241007
VS Code version: Code - Insiders 1.75.0-insider (Universal) (07d6f5b35fac559504dec65e3073d796b2d25a55, 2023-01-26T05:22:17.192Z)
OS version: Darwin x64 22.2.0
Modes:
Sandboxed: Yes

System Info

Item
Value

CPUs
Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz (16 x 2400)

GPU Status
2d_canvas: enabledcanvas_oop_rasterization: disabled_offdirect_rendering_display_compositor: disabled_off_okgpu_compositing: enabledmetal: disabled_offmultiple_raster_threads: enabled_onopengl: enabled_onrasterization: enabledraw_draw: disabled_off_okskia_renderer: enabled_onvideo_decode: enabledvideo_encode: enabledvulkan: disabled_offwebgl: enabledwebgl2: enabledwebgpu: disabled_off

Load (avg)
3, 3, 2

Memory (System)
32.00GB (0.05GB free)

Process Argv
--crash-reporter-id 48781ca2-1705-4f64-9bab-325055aab55d

Screen Reader
no

VM
0%

Also should be fixed for python.defaultInterpreterPath


fix: don't take explicit reference in update_interrupt

This applies https://github.com/rust-osdev/pci_types/pull/22 to https://github.com/rust-osdev/pci_types/pull/21.
It would be great if you could release 0.9.1 containing this fix for consistency. :)

Published as v0.9.1 :)


[Bug]: .cargo/config.toml is not deployed

What happened?
While working on an example app, I found out that .cargo/config.toml is not deployed. Yet this is needed to successfully compile, because the app is using uuid v7 which requires setting specific rustflags and that by default happens in .cargo/config.toml.
More details can be found at https://discord.com/channels/803236282088161321/1109452835214590123.
To reproduce the issue, use tag shuttle-issue-928: https://github.com/hseeberger/ticklist/releases/tag/shuttle-issue-928.
Version
0.16.0
Which operating systems are you seeing the problem on?
macOS
Which CPU architectures are you seeing the problem on?
ARM64
Relevant log output
No response
Duplicate declaration

[X] I have searched the issues and there are none like this.

According to @jonaro00, "hidden" files are not deployed. I suggest to modify the relevant logic to include "hidden" default files/directories like .cargo.

Looking at cargo_shuttle::make_archive, I think I disagree with @jonaro00: hidden(false) is called on the WalkBuilder, i.e. hidden files are not excluded by default.
As .cargo/config.toml is not in any .gitignore or .ignore files, I have no clue why the deploy fails.

Yeah, you're right. I misremembered.
What toolchain are you using locally?
This comment says that the rustcflags should be in a [target] field, and the string should also be split into two. https://www.reddit.com/r/rust/comments/yindaf/comment/iujnbgo/
Perhaps it is an issue with mismatching environments locally/in deployment.

This sparked an idea: https://github.com/shuttle-hq/shuttle/issues/930

I tried locally and in my case at least the .cargo/config.toml file was included in the archive. So it looks like it may not be due to the file missing from the archive. @hseeberger Do you have the project you were deploying available on Github? I can try deploying it as well.

Sorry @hseeberger missed the link in the description. I also ran into the same problem. The project builds locally for me but when deployed it fails because of missing Uuid::now_v7(). It has something to do with how shuttle builds the project.

Are you both using Rust 1.69? Deployment uses 1.68. I didn't see anything related to this but it is after all a source of errors, so just double checking.

Yes, I'm on 1.69.

@jonaro00, I was on 1.69, but I installed 1.68(.2) and the behavior is exactly the same, i.e. cargo shuttle run works but cargo shuttle deploy fails.

I setup a dev environment of shuttle locally and was able to capture the rustc command run by the deployer. I also extracted the rustc command when I built this project manually from the command line. Here they are:
From deployer:
rustc --crate-name ticklist --edition=2021 src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C opt-level=3 -C embed-bitcode=no -C metadata=befa05399f0bfb08 -C extra-filename=-befa05399f0bfb08 --out-dir /opt/shuttle/shuttle-builds/ticklist/target/release/deps -L dependency=/opt/shuttle/shuttle-builds/ticklist/target/release/deps --extern anyhow=/opt/shuttle/shuttle-builds/ticklist/target/release/deps/libanyhow-1638cbbc81c3f7f3.rlib --extern axum=/opt/shuttle/shuttle-builds/ticklist/target/release/deps/libaxum-2ba8f8a7929d7a3b.rlib --extern paste=/opt/shuttle/shuttle-builds/ticklist/target/release/deps/libpaste-f1c151bbee1ee7c1.so --extern serde=/opt/shuttle/shuttle-builds/ticklist/target/release/deps/libserde-b3c9a0db670b0ea6.rlib --extern serde_json=/opt/shuttle/shuttle-builds/ticklist/target/release/deps/libserde_json-20582b8a1e30c74c.rlib --extern shuttle_axum=/opt/shuttle/shuttle-builds/ticklist/target/release/deps/libshuttle_axum-1d72117bc32347b9.rlib --extern shuttle_runtime=/opt/shuttle/shuttle-builds/ticklist/target/release/deps/libshuttle_runtime-c6e9a41d76cdf834.rlib --extern shuttle_shared_db=/opt/shuttle/shuttle-builds/ticklist/target/release/deps/libshuttle_shared_db-03ffa76c6dbdce21.rlib --extern sqlx=/opt/shuttle/shuttle-builds/ticklist/target/release/deps/libsqlx-36d9f86f38b99fed.rlib --extern time=/opt/shuttle/shuttle-builds/ticklist/target/release/deps/libtime-11b310034dddb839.rlib --extern tokio=/opt/shuttle/shuttle-builds/ticklist/target/release/deps/libtokio-09e9586ca212729e.rlib --extern tracing=/opt/shuttle/shuttle-builds/ticklist/target/release/deps/libtracing-eb7198a2f9321a15.rlib --extern uuid=/opt/shuttle/shuttle-builds/ticklist/target/release/deps/libuuid-c29b2407f470ea3a.rlib -L native=/opt/shuttle/shuttle-builds/ticklist/target/release/build/ring-6ed57d11f423598d/out

When built locally:
rustc --crate-name ticklist --edition=2021 src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=236 --crate-type bin --emit=dep-info,link -C opt-level=3 -C embed-bitcode=no -C metadata=c048a64ab8897d86 -C extra-filename=-c048a64ab8897d86 --out-dir /home/romi/src/rust/shuttle/examples/rocket/ticklist/target/release/deps -L dependency=/home/romi/src/rust/shuttle/examples/rocket/ticklist/target/release/deps --extern anyhow=/home/romi/src/rust/shuttle/examples/rocket/ticklist/target/release/deps/libanyhow-5df34bb51d9247ce.rlib --extern axum=/home/romi/src/rust/shuttle/examples/rocket/ticklist/target/release/deps/libaxum-3bd3c50febe49d2f.rlib --extern paste=/home/romi/src/rust/shuttle/examples/rocket/ticklist/target/release/deps/libpaste-bd3fcb0ba9ea8555.so --extern serde=/home/romi/src/rust/shuttle/examples/rocket/ticklist/target/release/deps/libserde-bd5b8be1da3d0c90.rlib --extern serde_json=/home/romi/src/rust/shuttle/examples/rocket/ticklist/target/release/deps/libserde_json-1ccde61105a905b3.rlib --extern shuttle_axum=/home/romi/src/rust/shuttle/examples/rocket/ticklist/target/release/deps/libshuttle_axum-353819e5ca3e714e.rlib --extern shuttle_runtime=/home/romi/src/rust/shuttle/examples/rocket/ticklist/target/release/deps/libshuttle_runtime-c32c783574a846e4.rlib --extern shuttle_shared_db=/home/romi/src/rust/shuttle/examples/rocket/ticklist/target/release/deps/libshuttle_shared_db-f1c0bf27471d55d3.rlib --extern sqlx=/home/romi/src/rust/shuttle/examples/rocket/ticklist/target/release/deps/libsqlx-8be9b4f7a0799602.rlib --extern time=/home/romi/src/rust/shuttle/examples/rocket/ticklist/target/release/deps/libtime-dfa94cfa1b8a0beb.rlib --extern tokio=/home/romi/src/rust/shuttle/examples/rocket/ticklist/target/release/deps/libtokio-fe4f75ef640e22de.rlib --extern tracing=/home/romi/src/rust/shuttle/examples/rocket/ticklist/target/release/deps/libtracing-db764db6906d276c.rlib --extern uuid=/home/romi/src/rust/shuttle/examples/rocket/ticklist/target/release/deps/libuuid-26fdc592e76f2dc5.rlib --cfg uuid_unstable -L native=/home/romi/src/rust/shuttle/examples/rocket/ticklist/target/release/build/ring-de41e7b0d5ffe2b9/out

(Sorry for the long horizontal scroll)
The only significant difference between them is the --cfg uuid_unstable option which is missing from the deployer's command line which I believe is the root cause of compilation failure. Now need to find out why did deployer not pass this option.

Hey @imor, thanks a lot for investigating! I am currently also trying to set up a local dev environment, but as I am a Shuttle newbie, this is taking some time ;-)
Yes, --cfg uuid_unstable is essential for my project to build. Is the deployer not using "standard Cargo"? Sorry if this question sounds stupid, I yet don't know how it is working. Because if you run cargo check (or cargo build or ..) the options under .cargo/config.toml are always considered.
Hence I assume that the deployer does not use cargo, but instead tries to do the same thing. If that is the case, then considering the cargo configuration options seems to be missing.

The deployer uses the same function in the builder crate as local run, and it uses cargo (as a lib) internally (it will soon use the hosts installed cargo instead).
I suspect the issue could be about either working directories, or if the .cargo/config.toml file already exists in the container and gets ignored when unpacking.

Shuttle uses a "global" Cargo configuration (i.e. $CARGO_HOME/config.toml) to patch the shuttle-* crates and to register their crates.io mirrors. This global config takes precedence over the per-project configuration. Not sure if the local run does that, too?
I ran into pretty much the same issue and ended up forking the uuid crate and patching it in.

It would be interesting though if there was a RUSTFLAGS field (or similar) in the Shuttle.toml, where one could pass such things.
Back when I hit this issue, there was still the FFI boundary Shuttle had to worry about, and certain cfg flags could potentially break FFI compatibility (something like tokio_unstable when combined with tracing, where it would embed spans into the structs).
With the boundary gone, Shuttle should be much more flexible and introducing something like that should cause little-to-no problems IMO

It would be interesting though if there was a RUSTFLAGS field (or similar) in the Shuttle.toml, where one could pass such things. Back when I hit this issue, there was still the FFI boundary Shuttle had to worry about, and certain cfg flags could potentially break FFI compatibility (something like tokio_unstable when combined with tracing, where it would embed spans into the structs).
With the boundary gone, Shuttle should be much more flexible and introducing something like that should cause little-to-no problems IMO

Thank you for the great summary! Yes, I also think this should be possible to implement now. I like the suggestion of using Shuttle.toml for this, then we just need to sort out how we will write them to the cargo config (or even passing them as args when building the project binary?).

What if the global cargo config in Shuttle was instead injected into any existing user's cargo config (or created if not present)?

@hseeberger This should be possible in 0.27 🤞, haven't verified.


Timeline reports incorrect GPU memory usage

Please make sure that this is a bug. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:bug_template
System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): Yes
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu
Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:
TensorFlow installed from (source or binary): conda (binary)
TensorFlow version (use command below): 1.14 gpu
Python version: 3.6.7
Bazel version (if compiling from source):
GCC/Compiler version (if compiling from source):
CUDA/cuDNN version: 10.0
GPU model and memory:

You can collect some of this information using our environment capture
script
You can also obtain the TensorFlow version with: 1. TF 1.0: python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)" 2. TF 2.0: python -c "import tensorflow as tf; print(tf.version.GIT_VERSION, tf.version.VERSION)"
Describe the current behavior
My objective is to measure the amount of GPU memory needed by BERT during the inference process. I have already set the TF_FORCE_GPU_ALLOW_GROWTH (or a paraphrase thereof, I don't remember the exact flag) to true. NVIDIA-SMI shows a usage of ~2500 MB for a batch size of 227.

Even if the allow growth is true, the tensorflow allocation is taking place in steps. I see the same peak usage in nvidia-smi for batch sizes 16, 32, 64 and then it jumps up suddenly. Usage for batch sizes 128 through 227 is as above, while for batch size 228, it is suddenly 4495MB. Hence, this measurement does not serve my purpose. It clearly depends more on the allocator behaviour than the network size + activations size.

Timeline visualisation in chrome trace format shows a peak allocation on GPU_0_bfc as ~418MB for a batch size of 227. This is way too low. If I compare it with nvidia-smi trace (peaking at ~2500MB) this makes no sense.

Tensorboard visualisation somehow shows the BERT node as using 175MB. Again, it makes no sense.

Describe the expected behavior
Please help me get an accurate measurement of how much memory my current model and batch size is really taking to run on a GPU with TF. The only trustworthy metric I see in this labyrinth is nvidia-smi, but only for the batch sizes at which it suddenly steps up.
Code to reproduce the issue
Provide a reproducible test case that is the bare minimum necessary to generate the problem.
Can use the google research bert and profile for memory using ProfilerHooks.
Other info / logs
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.

@smr97, In order to expedite the trouble-shooting process, please provide a code snippet to reproduce the issue reported here. Thanks!

This can be reproduced with this repository. You just need to add the hooks for profiling. I have a modified model which is unfortunately proprietary, but this issue is definitely generic, and can be reproduced as above.

Any update on this issue? I am also trying to find the accurate GPU memory usage by models. I am loading a resnet(99MB) and inception v3(92MB) model with a tf serving docker image, with the TF_FORCE_GPU_ALLOW_GROWTH flag. Based on reports of nvidia-smi, the GPU usage differs on machines with different capacity. You can find my observations in a comment here

Hi There,
We are checking to see if you still need help on this, as you are using an older version of tensorflow which is officially considered end of life . We recommend that you upgrade to the latest 2.x version and let us know if the issue still persists in newer versions. Please open a new issue for any help you need against 2.x, and we will get you the right help.
This issue will be closed automatically 7 days from now. If you still need help with this issue, please provide us with more information.


Factorytest.ino warnings and errors when trying to build in Arduino IDE

I encountered various errors/problems when trying to build/flash the ..\examples\core2_for_aws\FactoryTest\FactoryTest.ino, on a desktop PC with MS Windows 11 Pro and running Arduino IDE 1.8.19.  A part of the errors have the same origin as discussed in issue #3: the lack of an IMU in the M5Stack TOUGH.
Starting with the following warning:
                 from C:\Users\pauls2\Documenten\Arduino\2022-03-03_M5Stack_TOUGH_FactoryTest\2022-03-03_M5Stack_TOUGH_FactoryTest.ino:21:
C:\Users\<Username>\Documents\Arduino\libraries\FastLED\src/fastspi.h:145:23: note: #pragma message: No hardware SPI pins defined.  All SPI access will default to bitbanged output
 #      pragma message "No hardware SPI pins defined.  All SPI access will default to bitbanged output"

I did not do anything to solve this warning.
Then Errors related to a non existant IMU:
FactoryTest:448:12: error: 'class M5Tough' has no member named 'IMU'
    if (M5.IMU.Init() == 0) {

FactoryTest:612:8: error: 'class M5Tough' has no member named 'IMU'
     M5.IMU.getAccelData(&accX, &accY, &accZ);
        ^~~
C:\Users\<Username>\Documents\Arduino\libraries\M5Tough-master\examples\core2_for_aws\FactoryTest\FactoryTest.ino: In function 'void MPU6886Page()':
FactoryTest:1755:12: error: 'class M5Tough' has no member named 'IMU'
         M5.IMU.getAccelData(&accX, &accY, &accZ);

For this fact I removed: a) the checkIMUInit() function; b) the checkIMUInit() function; c) the MPU6886Page() function.
Then:
FactoryTest:473:31: error: call of overloaded 'begin(int, int, int)' is ambiguous
     Wire1.begin(21, 22, 100000);
                               ^
In file included from C:\Users\<Username>\Documenten\Arduino\libraries\ArduinoECCX08\src/ECCX08.h:24,
                 from C:\Users\<Username>\Documenten\Arduino\libraries\ArduinoECCX08\src/ArduinoECCX08.h:23,
                 from C:\Users\<Username>\Documenten\Arduino\libraries\M5Tough-master\examples\core2_for_aws\FactoryTest\FactoryTest.ino:13:
C:\Users\<Username>\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.2\libraries\Wire\src/Wire.h:79:10: note: candidate: 'bool TwoWire::begin(int, int, uint32_t)'
     bool begin(int sda=-1, int scl=-1, uint32_t frequency=0); // returns true, if successful init of i2c bus
          ^~~~~
C:\Users\<Username>\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.2\libraries\Wire\src/Wire.h:80:10: note: candidate: 'bool TwoWire::begin(uint8_t, int, int, uint32_t)'
     bool begin(uint8_t slaveAddr, int sda=-1, int scl=-1, uint32_t frequency=0);

To solve this ambiguity error:
In line 478 I changed: Wire1.begin(21, 22, 10000); into: Wire1.begin((uint8_t)21, 22, 10000); . The same in line 1947.
Then:
../FactoryTest.ino:466:49: warning: control reaches end of non-void function [-Wreturn-type]
int checkAETCC608AInit() causes a warning because the function does not return anything.
I changed it into: void checkAETCC608AInit().
After all these corrections the sketch built and flashed to my M5Stack TOUGH, but the unit switched off immediately after only showing the text "motor test" at the bottom of the display and sounding a dualtone bleep.
A next build failed with the error that the dynaming memory was full (102%).
The sketch uses 1344717 bytes of the program storage. The maximum is 1310720 bytes.
In an attempt to solve this I changed, where possible, Serial.print() commands with static texts into Serial.print(F("...")); however there were not that many of these commands. More in number were combined Serial.printf() commands.
I didn't find yet a solution to the memory full error.

You can try using this partitioning scheme.

Thank you. I go to try it in some days. I am now busy with another project.


[AIRFLOW-XXX] GSOD related changes to CONTRIBUTING.md

This PR is for a Technical writer review of the GSOD (Google Summer of Docs) documentation update.

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@2abf0f5). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master     #356   +/-   ##
=========================================
  Coverage          ?   80.01%
=========================================
  Files             ?      610
  Lines             ?    35176
  Branches          ?        0
=========================================
  Hits              ?    28145
  Misses            ?     7031
  Partials          ?        0

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 2abf0f5...d4f6ac2. Read the comment docs.

Hey @efedotova -> I reviewed the changes and squashed them into single change so far. I am happy to make a PR to apache repository and ask community what they think so far. I will need to close that PR and open a new one for Apache - we can continue working in the same way as we did so far, but it will be a different link. Are you OK with that?

yes, sure

Понедельник, 7 октября 2019, 17:24 +03:00 от Jarek Potiuk<EMAIL_ADDRESS>
Hey  @efedotova -> I reviewed the changes and squashed them into single change so far. I am happy to make a PR to apache repository and ask community what they think so far. I will need to close that PR and open a new one for Apache - we can continue working in the same way as we did so far, but it will be a different link. Are you OK with that?
—
You are receiving this because you were mentioned.
Reply to this email directly,  view it on GitHub , or  mute the thread .

--
Elena Fedotova


Jenkins credentials for Deepak and Bill

@kltm could we give @wdduncan and @deepakunni3 credentials to log in and administer Jenkins here?
https://build-exp.berkeleybop.io/job/Knowledge Graph Hub/
(Please close if they already have cred's, or don't want them)

They will need to send me their preferred email address, user name, and have Signal ready to use. When done:

[ ] @wdduncan
[ ] @deepakunni3


[Feature Request] REST API with Cognito User Pool authorization

Is your feature request related to a problem? Please describe.
Amplify CLI provides a way to create a REST api (API Gateway + lambda) with IAM authorization. in the JS docs, there are manual steps to add cognito user pool as the authorizator for the requests to API gateway: https://aws-amplify.github.io/docs/js/api#cognito-user-pools-authorization (however, this could be improved, see step 11 below). Amplify iOS (https://github.com/aws-amplify/amplify-ios/pull/312) and Android also supports this API with user pools as the auth mechanism.
The pain point is here is that Amplify CLI doesn't support creating API Gateway + Cognito User Pool authorizator. I'm opening this issue here to provide more details around what needs to done to enable API Gateway with Cognito.
The following steps show how to set up an API endpoint with APIGateway and Lambda source. The auth configured will be Cognito User Pool.

Initialize an amplify project. amplify init

Create an API Gateway which proxies requests to an AWS Lambda with no authorization needed. amplify add api.

? Please select from one of the below mentioned services: `REST`
? Provide a friendly name for your resource to be used as a label for this category in the project: `restAPI`
? Provide a path (e.g., /items) `/items`
? Choose a Lambda source `Create a new Lambda function`
? Provide a friendly name for your resource to be used as a label for this category in the project: `restwithuserpoolinte22de6072`
? Provide the AWS Lambda function name: `restwithuserpoolinte22de6072`
? Choose the function template that you want to use: `Serverless express function (Integration with Amazon API Gateway)`
? Do you want to access other resources created in this project from your Lambda function? `No`
? Do you want to edit the local lambda function now? `No`
Succesfully added the Lambda function locally
? Restrict API access `No`
? Do you want to add another path? `No`
Successfully added resource apid7c040db locally

Create Cognito User Pool. Run amplify add auth

Using service: Cognito, provided by: awscloudformation

 The current configured provider is Amazon Cognito.

 Do you want to use the default authentication and security configuration? Default configuration
 Warning: you will not be able to edit these selections.
 How do you want users to be able to sign in? Email
 Do you want to configure advanced settings? No, I am done.
Successfully added resource restwithuserpoolintea05fdd00 locally

Provision the resources. Run amplify push to provision the API Gateway, Lambda, and the Cognito User Pool.

In amplifyconfiguration.json. update authorizationType to AMAZON_COGNITO_USER_POOLS like so

{
    "UserAgent": "aws-amplify-cli/2.0",
    "Version": "1.0",
    "api": {
        "plugins": {
            "awsAPIPlugin": {
                "apid7c040db": {
                    "endpointType": "REST",
                    "endpoint": "https://endpoint.execute-api.us-west-2.amazonaws.com/devo",
                    "region": "us-west-2",
                    "authorizationType": "AMAZON_COGNITO_USER_POOLS"
                }
            }
        }
    }
}

Find your API name. Run amplify console to open the AWS Console. The latest deployment activty logs will indicate the API Gateway that is provisioned. There will be a Resource ID that looks like <api name> (api). Navigate to API Gateway console, select your API.

Find your Cognito User Pool name by click on the Authentication tab in the AWS Console.

Add Cognito User Pool as an authorization mechanism. Select Authorizers, click on "+ Create New Authorizer",

type in a Name
select Cognito as the type
Select the Cognito UserPool
For Token Source, enter Authorization
Once completed, refresh the page.

Enable requests to the API with the Cognito User Pool Authorizer as the authorization mechanism.

Select Resources on the left, Under Resources, and each individual resource path, select Any. You will see a Test section, Method Request, Method Response, Integration Request, etc
Click on Method Request, under Settings, Authorization, click on edit. In the drop down, select the User Pool authorizer, then click on the check mark to save it.
Repeat this for each of the resource paths
Click on Actions, deploy API, and select the deployment stage, and click Deploy.

There are some additional gotcha's that need to be noted here:

the configuration file will be overwritten on amplify push, so developer will need to programmatically instantiate Amplify.

Describe the solution you'd like
A clear and concise description of what you want to happen.
amplify add api

Restrict API Access? Yes
Cognito User Pool or IAM? Cognito User Pool
Auth access? [create|update|delete]
Unauth access? [create|update|delete]

Alternatives
JS docs could use some improvements with step number 11, for example it doesn't guide the develop to re-deploy the API. iOS and Android Amplify docs will be written simiarly.
Dedupped to
https://github.com/aws-amplify/amplify-cli/issues/3058
https://github.com/aws-amplify/amplify-cli/issues/1016 (Just realized this one is for API + API Key, not user pool)

@lawmicha thanks for opening the issue, I see the customer need here and this is something the CLI could support out of the box. I take this to the team for discussion and get back to you.

I agree this is really important. API+Lambda+Cognito did not work out of the box for me!

I need this feature. Cognito User Pool Authorization provides us to powerful and useful permission management.

I spent hours banging my head on this and went through multiple tutorials and digging through code. Thank you for such a great walk-thu and this needs to be added!

Great walk through. Thanks a lot. Hope this automation is added soon. for such an important feature. It is essentially the same as AdminQueries API. It should be easy for the Amplify team to copy what has done over.

@lawmicha I wondered if something may have changed or if perhaps a step is missing. I have tried a couple times, at first with the auth I already had set up and the removed all the api, functions & auth and tried again and it doesn't seem to generate amplifyconfiguration.json. Where do you see that file generated? I've also tried searching for plugins and authorizationType I apologize if I am just missing it some how.
I had previously tried manually adding the Cognito Authorizer in another project and realized when I ran push again for some changes the Authorizer got trashed, so I'm hoping this will solve that. Thanks for any info you can provide.

@lawmicha I wondered if something may have changed or if perhaps a step is missing. I have tried a couple times, at first with the auth I already had set up and the removed all the api, functions & auth and tried again and it doesn't seem to generate amplifyconfiguration.json. Where do you see that file generated? I've also tried searching for plugins and authorizationType I apologize if I am just missing it some how.

Hi @smakinson, amplifyconfiguration.json is used in iOS and Android projects. Sorry I should have clarified. Are you using Amplify CLI with your JS app? (amplify init -> which type of project). I believe JS should be aws_exports.json or something

I had previously tried manually adding the Cognito Authorizer in another project and realized when I ran push again for some changes the Authorizer got trashed, so I'm hoping this will solve that. Thanks for any info you can provide.

This sounds like expected behavior but also a problem if amplify push reverts any manual changes done through AWS Console. If confirmed, then a developer that is using APIGateway with Cognito authorizator may need to provision it a different way (serverless, SAM CLI/ manually through AWS Console / or even Amplify CLI and then manually edit some cloud formation files)

@lawmicha Thanks for your response, you are correct, it is a javascript project. Hoping to find a way around it losing the Authorizer within Amplify.
aws-exports.js shows:
// WARNING: DO NOT EDIT. This file is automatically generated by AWS Amplify. It will be overwritten.
so it seems that is not the file I want. I'll keep digging.

@smakinson aws-exports.js will be reverted after amplify push. So maybe the APIGateway still has the authorizer set up but the configuration file in the app is reverted. this will be same issue with amplifyconfiguration.json. You can also programmatically configure Amplify.API without using aws-exports.js, although that will mean you need to transfer all the values over to code, and configure Amplify.Auth programmtically and any other categories you have as well
I just want to note that this is a feature request, and not necessarily steps for developers to follow and get working, they are steps provided to assist in turning this into an Amplify CLI feature. Following these steps are not supported by Amplify CLI. As we've seen the issue with the configuration file being overwritten.

@lawmicha Incase this is helpful for others I thought I'd post up here what I am looking at doing with the cloudformation template, and if you have a moment I have 2 questions, one general and the other (without taking too much of your time) if you might know the fix for an error:

Do you know at what point backend-config.json and the myApi-cloudformation-template.json gets overwritten and if I will lose any manual changes there? Kinda making this still risky if changes are easily lost...so is this even a good idea?

I have it working if I hardcode my POOL ARN in the last bit of this and I'm trying to change now to get it based on the current environment based on https://aws-amplify.github.io/docs/cli-toolchain/quickstart#custom-cloudformation-stacks  Since I'm editing an existing resource I think a few steps aren't relevant, but I have modified backend-config.jsonby adding an additional item to the dependsOnarray for the REST api, added:

"myApi": {
  "service": "API Gateway",
    "providerPlugin": "awscloudformation",
    "dependsOn": [
    {
      "category": "function",
      "resourceName": "myFunc",
      "attributes": [
        "Name",
        "Arn"
      ]
    },
    {
      "category": "auth",
      "resourceName": "myAuthResource",     // from amplify status
      "attributes": [
        "UserPoolId"
      ]
    }
  ]
}

in the Parameters section of the myApi-cloudformation-template.json added:
"authmyAuthResourceUserPoolId": { // The format out here is `<category><resource-name><attribute-name>
  "Type": "String"
}

the methods have the authorizer attached by adding the following under x-amazon-apigateway-any-method
"security": [
  {
    "CognitoAuthorizer": []
  }
],

and further down in the file I'm trying to reference it like:
"securityDefinitions": {
  "CognitoAuthorizer": {
    "type": "apiKey",
      "name": "Authorization",
      "in": "header",
      "x-amazon-apigateway-authtype": "cognito_user_pools",
      "x-amazon-apigateway-authorizer": {
      "providerARNs": [
        {
          "authmyAuthResourceUserPoolId": {   // The format out here is `<category><resource-name><attribute-name>

            "Fn::GetAtt": [
              "authmyAuthResource",   // I've tried this with and without the auth category prefix
              "Outputs.UserPoolId"
            ]
          }
        }
      ],
        "type": "cognito_user_pools"
    }
  }
}

The error in question is the one  I see when I run amplify-push:
Template error: instance of Fn::GetAtt references undefined resource authmyAuthResource
Maybe I'm just mistyping something, hopefully this can be helpful for anyone in a javascript amplify project until the cli supports it. Thanks for any insight.

Thanks @smakinson for posting your details. I'm not very familar with those files you are asking about in your questions. + @SwaySway et al to help answer

Hello @smakinson,
Your API specific changes in backend-config.js and myApi-cloudformation-template.json are changed when you run amplify update API.

I have it working if I hardcode my POOL ARN in the last bit of this and I'm trying to change now to get it based on the current environment based on https://aws-amplify.github.io/docs/cli-toolchain/quickstart#custom-cloudformation-stacks

The docs here specify a way to get the user pool id into another stack. What you are looking for is the UserPoolArn. For that you'll need to import will be different, I've detailed this below.
You'll need to use a different ref for the ARN such as "Ref": "authMyAuthResourceNameUserPoolArn" and add that as a parameter in the template.
        "authMyAuthResourceNameUserPoolArn": {
          "Type": "String"
        }

In parameters.json you'll need to point to the auth stack to reference the UserPoolArn
    "authMyAuthResourceNameUserPoolArn": {
        "Fn::GetAtt": [
            "MyAuthResourceName",
            "Outputs.UserPoolArn",
            "Arn"
        ]
    }

Currently arn is not included in the outputs of the auth stack, this is something we can consider as a part of this feature request. For this you'll want to export the Arn as well from the auth stack.
  UserPoolArn:
    Value: !GetAtt UserPool.Arn
    Description: Arn for cognito userpool

The last thing here to edit would be to change the backend-config.json to denote that the api resource depends on the auth stack.
	"api": {
		"demorest": {
			"service": "API Gateway",
			"providerPlugin": "awscloudformation",
			"dependsOn": [
				{
					"category": "function",
					"resourceName": "demoRestFN",
					"attributes": [
						"Name",
						"Arn"
					]
				},
				{
					"category": "auth",
					"resourceName": "MyAuthResourceName",
					"attributes": [
						"UserPoolArn"
					]
				}
			]
		}
	}

All that's left here is to run amplify env checkout <current-env-name> and  amplify push.

@SwaySway Thank you for your help. I currently have manually setup an api for this, do you think its worth (risky?) going this route or would it be better to wait on the feature request and change it then?

This is a great workaround for now for creating Cognito Authorizers. Perhaps in a similiar vein, Is it safe to edit lambdaFunction-cloudformation-template.json? When does it get overwritten ? If I needed to add custom resources (ie a lambda policy), is the recommended approach to modify this cfn template ? Im looking for an analogy to the CustomResources.json template in the api/stacks folder.

I'm trying to accomplish the same thing (calling API GW with Cognito Auth) and made it work with above method.
However: my call only succeeds if I use an ID Token to authenticate:
let init = {
            headers: { Authorization: `Bearer ${(await Auth.currentSession()).getIdToken().getJwtToken()}` }
        }
API.get('xxx', '/items', myInit).then( result => {
      console.log(result);
    })

It's not working with an access token:
let init = {
            headers: { Authorization: `Bearer ${(await Auth.currentSession()).getAccessToken().getJwtToken()}` }
        }
API.get('xxx', '/items', myInit).then( result => {
      console.log(result);
    })

Fails with 401 and body { "message" : "unauthorized"}
I'd expect an access token to work instead of an id token. Is there anything I'm doing wrong?

What's the latest status on this?
Been scratching my head for hours trying to figure out why this was not working out of the box. The latest CLI makes you go through steps to set it all up, but does not build a CloudFormation template that actually works.
Again, it is blowing my mind how often I have to fix this stuff myself in vs having the Amplify CLI do what it is supposed to do. Does the Amplify product team not have any QA engineers?

I got this working using @lawmicha 's steps and @jwoehrle 's code. To my understanding, I'm going to have to follow these steps every time we deploy (though I haven't tested this part yet). Is there any other workaround that will work automatically?

@jwoehrle code is a worthy workaround. Sadly amplify has been the clunkiest library I've ever used so far.

Any news on getting this implemented? Overriding the amplify config manually is a time-consuming process for a feature that should already be there.

I'm trying to accomplish the same thing (calling API GW with Cognito Auth) and made it work with above method.
However: my call only succeeds if I use an ID Token to authenticate:
let init = {
            headers: { Authorization: `Bearer ${(await Auth.currentSession()).getIdToken().getJwtToken()}` }
        }
API.get('xxx', '/items', myInit).then( result => {
      console.log(result);
    })

It's not working with an access token:
let init = {
            headers: { Authorization: `Bearer ${(await Auth.currentSession()).getAccessToken().getJwtToken()}` }
        }
API.get('xxx', '/items', myInit).then( result => {
      console.log(result);
    })

Fails with 401 and body { "message" : "unauthorized"}
I'd expect an access token to work instead of an id token. Is there anything I'm doing wrong?

Here's from the documentation.
With the COGNITO_USER_POOLS authorizer, if the OAuth Scopes option isn't specified, API Gateway treats the supplied token as an identity token and verifies the claimed identity against the one from the user pool. Otherwise, API Gateway treats the supplied token as an access token and verifies the access scopes that are claimed in the token against the authorization scopes declared on the method.
My last comment got deleted, pretty good Team.

Hi how can I get  those tokens in Android  Java ?

Is this being worked on? This seems like a very important feature and i was surprised when it did not work out of the box. Have been trying to solve an issue for some hours now and stumbled upon this now

Is this being worked on? This seems like a very important feature and i was surprised when it did not work out of the box. Have been trying to solve an issue for some hours now and stumbled upon this now

This would be a very useful feature! For now, we have to set the authorizer for all resources after every "amplify update api", because amplify overwrites the template file  : (

This would be a very useful feature! For now, we have to set the authorizer for all resources after every "amplify update api", because amplify overwrites the template file  : (

I love Amplify and this is an feature that I’d very much like to see implemented, like the many others in this thread :) could you please share any status updates, dear Amplify Team?

I've also just come across this issue. My first thought was to simply update the generated cloudformation file, however... the template used by the CLI to generate the CloudFormation config is located here:
https://github.com/aws-amplify/amplify-cli/blob/master/packages/amplify-category-api/resources/awscloudformation/cloudformation-templates/apigw-cloudformation-template-default.json.ejs
In your generated API folder, e.g. amplify/backend/api/myapi there'll be another file called api-params.json which I believe is used to control the template generation process. e.g. running amplify update api will update the params and then re-generate the CloudFormation file. This explains why any update commands will re-generate the cloudformation file and overwrite any changes you've made.
My second thought is to somehow define cloudformation customizations in a separate file, and then somehow hook into the amplify push process to merge the customizations into the generated template. If anyone is keen to help me look, let me know!

Hi, is there any roadmap for this feature request? I also face this issue. IMO, it is a fundamental feature (API-Gateway authentication using Cognito User Pool) and it should be supported. What is the point of creating API-Gateway and Cognito, both by Amplify CLI, but cannot use them together?
Thanks.

Here's what I did to add the Custom Authorizer to the API's CloudFormation template.
It's worth noting that AdminQueries has COGNITO_USER_POOLS Authorizer, so I copy-pasted parts of the template there.
Add securityDefinitions to your API name properties ( Resources > <API name> > Properties )
Example:
          "securityDefinitions": {
            "Cognito": {
              "type": "apiKey",
              "name": "Authorization",
              "in": "header",
              "x-amazon-apigateway-authtype": "cognito_user_pools",
              "x-amazon-apigateway-authorizer": {
                "providerARNs": [
                  {
                    "Fn::Join": [
                      "",
                      [
                        "arn:aws:cognito-idp:",
                        {
                          "Ref": "AWS::Region"
                        },
                        ":",
                        {
                          "Ref": "AWS::AccountId"
                        },
                        ":userpool/",
                        {
                          "Ref": "<your_user_pool>"
                        }
                      ]
                    ]
                  }
                ],
                "type": "cognito_user_pools"
              }
            }
          },

This defines the Custom Authorizer called "Cognito" that's based on your user pool. <your_user_pool> should then be added to the CF's template parameters: (Top level > Parameters, just below env and authRoleName/unauthRoleName)
    "<your_user_pool>": {
      "Type": "String",
      "Default": "<your_user_pool>"
    },

This validates the Ref created through securityDefinitions. Finally, add this to the paths > x-amazon-apigateway-any-method (for ANY) and for all paths:
parameters:
                  {
                    "name": "Authorization",
                    "in": "header",
                    "required": false,
                    "type": "string"
                  }

Top level (inside paths):
                "security": [
                  {
                    "Cognito": []
                  }
                ],

Note that Cognito accepts an array of OAuth scopes, mine's empty. AdminQueries has aws.cognito.signin.user.admin as an OAuth scope.
I'm guessing this follows the same logic as https://github.com/aws-amplify/amplify-cli/issues/4351 , a manual adding of permissions to the policy, which can be pushed to a project. I tried using amplify pull on a separate branch and the CF edits stuck. I haven't tried amplify pull on a separate project though that shares the amplify configuration.

Setting this up was a bit unclear for me, but eventually I got it through a combination of @brymartinez and @SwaySway post's. Thanks for that!
This consolidates those posts into one to make it easier for future dwellers to implement this functionality.
The following will apply to the JavaScript Amplify library.
STEP 1
Set up the appropriate parameters coming into your REST API's CloudFormation (CF) template. This is found in: ./amplify/backend/api/<the name of your api>/parameters.json.
From my guess this file acts as a way for the backend resources to pass values to each other just as long as they have been set in the resources CF template Outputs key.
Add the following key/value after whatever key/values are there already or within the empty object. For me this was an empty file, but for you it could have preexisting values. You'll find name for auth in ./amplify/backend/backend-config.json under the "auth" key.
You'll have to check the ./amplify/backend/auth/<the name of your auth>/<name of your auth>-cloudformation-template.yml to see if UserPoolId is being outputted. I'd be surprised if it wasn't.
AuthCognitoUserPoolId is a descriptive name I gave it. This will be used in the next step as reference to the UserPoolId.
  "AuthCognitoUserPoolId": {
    "Fn::GetAtt": ["auth<name for auth>", "Outputs.UserPoolId"]
  }

STEP 2
Set up the appropriate Parameters, securityDefinitions, security, and parameter values in your REST API's CF template. This is found in ./amplify/backend/api/<the name of your api>/<the name of your api>-cloudformation-template.json.
In the "Parameters" key add the following key/value:
"AuthCognitoUserPoolId": {
      "Type": "String",
      "Description": "The id of an existing User Pool to connect. If this is changed, a user pool will not be created for you.",
      "Default": "NONE"
    },

In "Resources" > "<your api name>" > "Properties" > "Body" add the following key/value. This is creating the authorizer and the AuthCognitoUserPoolId parameter is being used her to reference the Cognito user pool you want to use.
I originally thought AuthCognitoUserPoolId was the literal user pool id value, but I got an error when I added that as the key for the parameter.
The "Cognito" key is a custom name and you can name it anything.
"securityDefinitions": {
            "Cognito": {
              "type": "apiKey",
              "name": "Authorization",
              "in": "header",
              "x-amazon-apigateway-authtype": "cognito_user_pools",
              "x-amazon-apigateway-authorizer": {
                "type": "cognito_user_pools",
                "providerARNs": [
                  {
                    "Fn::Join": [
                      "",
                      [
                        "arn:aws:cognito-idp:",
                        {
                          "Ref": "AWS::Region"
                        },
                        ":",
                        {
                          "Ref": "AWS::AccountId"
                        },
                        ":userpool/",
                        {
                          "Ref": "AuthCognitoUserPoolId"
                        }
                      ]
                    ]
                  }
                ]
              }
            }
          },

In "Resources" > "<your api name>" > "Properties" > "Body" > "paths" > "<your path/s name>" >  "x-amazon-apigateway-any-method" > "parameters" add the following key/value to the array. This is defining the Authorization header as a parameter that has the token.
This has to be added to all of the methods to which you want to apply this authorization. It will be under the appropriate http method key such as "get", "post", etc. I didn't apply it to "options" because it's not needed.
{
                    "name": "Authorization",
                    "in": "header",
                    "required": false,
                    "type": "string"
                  }

In "Resources" > "<your api name>" > "Properties" > "Body" > "paths" > "<your path/s name>" >  "x-amazon-apigateway-any-method" > "security" add the following key/value. Like the parameter above it needs to be added to any methods you want this authorization to apply. This has to be the same as the name you gave the key in the "securityDefinitions" object.
This will select this authorizor for the method. If it's not added when you go into the API Gateway console and select the method you'll see NONE in the Auth setting even though the Cognito authorizer has been setup and is an option in the dropdown menu.
For anything other than OAuth2 type security scheme this must be empty.
"security": [
                  {
                    "Cognito": []
                  }
                ],

That's it for the implementation of the infrastructure. Run amplify push to set it all up.
From what I can tell the configuration setup doesn't get overridden with updates. But I've not thoroughly tested it.
For usage, this is what I'm doing:
import { API, Auth } from 'aws-amplify'

....

 const apiName = '<your api name>'
      const path = '/<your api path>'
      const myInit = {
        body: {
          test: 'test'
        },
        headers: {
          Authorization: `Bearer ${(await Auth.currentSession())
            .getIdToken()
            .getJwtToken()}`
        },
        response: true,
        queryStringParameters: {}
      }
      const finaliseImportResp = await API.post(apiName, path, myInit)

For reference here's some AWS documentation:

 AWS tute to set up Cognito user pool as authorizer
API Gateway OpenAPI extensions

From my experience working with Amplify when I run amplify api add and I go through and choose express backend```` I am unable to update the AGW's.  Firstly,  I can't make any changes to Access-Control-Allow-Headers```. Secondly, I am unable to send my Access Token so I can crack it in the Express Backend function (which could be more control over what a user can/can't do). Additionally, if we follow the documentation's on sending access/id tokens we are unable to get that data pass the AGW even though it's suggested in the documentation. Having this handled from the cli would be easier for other devs.

From my experience working with Amplify when I run amplify api add and I go through and choose express backend```` I am unable to update the AGW's. Firstly, I can't make any changes toAccess-Control-Allow-Headers```. Secondly, I am unable to send my Access Token so I can crack it in the Express Backend function (which could be more control over what a user can/can't do). Additionally, if we follow the documentation's on sending access/id tokens we are unable to get that data pass the AGW even though it's suggested in the documentation. Having this handled from the cli would be easier for other devs.

@johnEthicalTechnology Thank you so much for this. Could you also explain how to restrict the api access?

Setting this up was a bit unclear for me, but eventually I got it through a combination of @brymartinez and @SwaySway post's. Thanks for that!
This consolidates those posts into one to make it easier for future dwellers to implement this functionality.
The following will apply to the JavaScript Amplify library.
STEP 1
Set up the appropriate parameters coming into your REST API's CloudFormation (CF) template. This is found in: ./amplify/backend/api/<the name of your api>/parameters.json.
From my guess this file acts as a way for the backend resources to pass values to each other just as long as they have been set in the resources CF template Outputs key.
Add the following key/value after whatever key/values are there already or within the empty object. For me this was an empty file, but for you it could have preexisting values. You'll find name for auth in ./amplify/backend/backend-config.json under the "auth" key.
You'll have to check the ./amplify/backend/auth/<the name of your auth>/<name of your auth>-cloudformation-template.yml to see if UserPoolId is being outputted. I'd be surprised if it wasn't.
AuthCognitoUserPoolId is a descriptive name I gave it. This will be used in the next step as reference to the UserPoolId.
  "AuthCognitoUserPoolId": {
    "Fn::GetAtt": ["auth<name for auth>", "Outputs.UserPoolId"]
  }

STEP 2
Set up the appropriate Parameters, securityDefinitions, security, and parameter values in your REST API's CF template. This is found in ./amplify/backend/api/<the name of your api>/<the name of your api>-cloudformation-template.json.
In the "Parameters" key add the following key/value:
"AuthCognitoUserPoolId": {
      "Type": "String",
      "Description": "The id of an existing User Pool to connect. If this is changed, a user pool will not be created for you.",
      "Default": "NONE"
    },

In "Resources" > "<your api name>" > "Properties" > "Body" add the following key/value. This is creating the authorizer and the AuthCognitoUserPoolId parameter is being used her to reference the Cognito user pool you want to use.
I originally thought AuthCognitoUserPoolId was the literal user pool id value, but I got an error when I added that as the key for the parameter.
The "Cognito" key is a custom name and you can name it anything.
"securityDefinitions": {
            "Cognito": {
              "type": "apiKey",
              "name": "Authorization",
              "in": "header",
              "x-amazon-apigateway-authtype": "cognito_user_pools",
              "x-amazon-apigateway-authorizer": {
                "type": "cognito_user_pools",
                "providerARNs": [
                  {
                    "Fn::Join": [
                      "",
                      [
                        "arn:aws:cognito-idp:",
                        {
                          "Ref": "AWS::Region"
                        },
                        ":",
                        {
                          "Ref": "AWS::AccountId"
                        },
                        ":userpool/",
                        {
                          "Ref": "AuthCognitoUserPoolId"
                        }
                      ]
                    ]
                  }
                ]
              }
            }
          },

In "Resources" > "<your api name>" > "Properties" > "Body" > "paths" > "<your path/s name>" > "x-amazon-apigateway-any-method" > "parameters" add the following key/value to the array. This is defining the Authorization header as a parameter that has the token.
This has to be added to all of the methods to which you want to apply this authorization. It will be under the appropriate http method key such as "get", "post", etc. I didn't apply it to "options" because it's not needed.
{
                    "name": "Authorization",
                    "in": "header",
                    "required": false,
                    "type": "string"
                  }

In "Resources" > "<your api name>" > "Properties" > "Body" > "paths" > "<your path/s name>" > "x-amazon-apigateway-any-method" > "security" add the following key/value. Like the parameter above it needs to be added to any methods you want this authorization to apply. This has to be the same as the name you gave the key in the "securityDefinitions" object.
This will select this authorizor for the method. If it's not added when you go into the API Gateway console and select the method you'll see NONE in the Auth setting even though the Cognito authorizer has been setup and is an option in the dropdown menu.
For anything other than OAuth2 type security scheme this must be empty.
"security": [
                  {
                    "Cognito": []
                  }
                ],

That's it for the implementation of the infrastructure. Run amplify push to set it all up.
From what I can tell the configuration setup doesn't get overridden with updates. But I've not thoroughly tested it.
For usage, this is what I'm doing:
import { API, Auth } from 'aws-amplify'

....

 const apiName = '<your api name>'
      const path = '/<your api path>'
      const myInit = {
        body: {
          test: 'test'
        },
        headers: {
          Authorization: `Bearer ${(await Auth.currentSession())
            .getIdToken()
            .getJwtToken()}`
        },
        response: true,
        queryStringParameters: {}
      }
      const finaliseImportResp = await API.post(apiName, path, myInit)

For reference here's some AWS documentation:

 AWS tute to set up Cognito user pool as authorizer
API Gateway OpenAPI extensions

@johnEthicalTechnology Thank you so much for this. Could you also explain how to restrict the api access?

The above solution no longer works due to some changes in how cloud formation templates are generated / overridden in AWS Amplify (which is now done with CDK instead of directly modifying the cloud formation template). I threw together a gist for an override.ts file which should be put in your API folder instead as an update to the wonderful solution put together by @johnEthicalTechnology:
https://gist.github.com/evankirkiles/9de81f026a2e2c961a2b6a3d80d35519
Feel free to recommend changes!

The above solution no longer works due to some changes in how cloud formation templates are generated / overridden in AWS Amplify (which is now done with CDK instead of directly modifying the cloud formation template). I threw together a gist for an override.ts file which should be put in your API folder instead as an update to the wonderful solution put together by @johnEthicalTechnology:
https://gist.github.com/evankirkiles/9de81f026a2e2c961a2b6a3d80d35519
Feel free to recommend changes!

@evankirkiles Thanks for sharing! Your gist worked great for me.


⚠ T:Riza Roblox Proxy has degraded performance

In b68faf5, T:Riza Roblox Proxy (https://rprxy.triza.dev) experienced degraded performance:

HTTP code: 200
Response time: 2290 ms

Resolved: T:Riza Roblox Proxy performance has improved in a1ac945.


Fix grammar mistake in VAE tutorial

Fixes a tiny grammar mistake in the VAE tutorial found here.
...makes it clear what me mean... -> ...makes it clear what I mean...

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.Ken Oung seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.

You may also need to merge with dev once https://github.com/uber/pyro/pull/1369 is landed.


Skip no-op git fetches from the registry

Quoting https://github.com/CocoaPods/CocoaPods/issues/4989#issuecomment-193801376:

this new, preview API should help: https://developer.github.com/changes/2016-02-24-commit-reference-sha-api/. It's helped Homebrew dramatically reduce the number of no-op git fetchs which also will make things better for your users as a no-op API HTTP call is significantly faster for you (and less expensive for GitHub) than a no-op git fetch.

Cargo could use this to determine that its local copy of rust-lang/crates.io-index is already up to date and it doesn’t need to git fetch.
In addition to limit the risk of hitting GitHub’s rate limiting on git traffic (see #2452) this can maybe make "Updating registry" faster.
It doesn’t seem rare in my Cargo using to see "Updating registry" multiple times within a few minutes, while the registry has had an average of one commit per ~half hour since its creation.
Servo may be more of a pathological case, but we have a ./mach cargo-update command that call cargo update in each of four "top-level" crates (that each have a Cargo.lock file), causing the registry to be updated four times within a few seconds. Updating the registry seems to often dominate the time taken by this command (and cargo update in general).

This seems reasonable to do eventually, but I don't want to start using unstable GitHub APIs as we're not really watching updates to the API.
It'd be nice though to see some benchmarks about how fast this is such as:

How fast is the HTTP request vs a noop fetch?
How fast is a HTTP request followed up by a fetch? (vs just a fetch)

Also worth thinking about what the behavior should be when the registry isn't Github hosted.

I am seeing the HTTP request take 440 (+/- 10) ms and a noop fetch take 1350 (+/- 150) ms but occasionally up to 4 seconds.
At those numbers, HTTP request followed if necessary by fetch would save time if less than 2/3 of registry updates require a fetch which is certainly true in my usage.

Thanks for the data @dtolnay! I'd actually be pretty curious to test this out and see what kind of perf gains we get in practice. We could perhaps even go as far as having an environment variable flag to test it out unstable-y for awhile.
Note that the referenced github API support was in preview when first introduced, but this appears to no longer be the case, so we should be good to go in that sense!
@sfackler I would expect this logic to be along the lines of when updating a git index which has the host of "github.com" the special logic takes effect, so it should be quite easy to continue to support arbitrary registries not on github. We could then implement fast paths for other registries in the future as well if need be.

Cool. I could see having a "github-like" flag in custom registry config to enable the fast path for stuff hosted on e.g. GitHub for Enterprise.

I'd be interested in trying this with the rust repo. Cargo fetches that ungodly slowly, but that may be the actual fetching itself rather than the would-be fast path.

I just want to follow up and say this change has been a noticeable improvement for me.


Investigate boundary time publisher behavior in playlists

As a developer I need to understand whether boundary time publishers can be used to implement segments.
Acceptance criteria

Boundary time publisher are well understood and documented accordingly.

Tasks

[x] Check whether boundary time events are sent when crossing times in all possible scenarios (normal playback, seek over).
[ ] Check behavior in playlists: Are boundary times carried over to the next content?
[ ] Update tests, implementation and documentation if improvements are made.

Boundary time observers only fire during normal playback, never as boundary times are crossed because of seek operations.


IHostingEnvironment Updates

See discussion at https://github.com/aspnet/PlatformAbstractions/issues/26. We're going to leave out IApplicationEnvironment as it's intended as a pure BCL abstraction API and instead we're going to add the ContentRootPath property (and maybe file provider) to IHostingEnvironment.
/cc @DamianEdwards @lodejard @JunTaoLuo

public interface IHostingEnvironment
{
    ...

    string ContentRootPath { get; set; }
    IFileProvider ContentRootFileProvider { get; set; }

    string WebRootPath { get; set; }
    IFileProvider WebRootFileProvider { get; set; }
    ...
}

When I saw ContentRoot, I assumed that it was the wwwroot directory.
It seems that isn't the case, but instead ContentRoot is really what I'd expect to be ApplicationRoot and WebRoot is where I put my static content. I don't have a big problem with WebRoot, but ContentRoot is misleading.

We had this conversation last week. I believe @DamianEdwards mentioned that elsewhere they were using something like contentBase as application base and we should follow the precedence.

The prior art I was referring to was the msbuild "build action" concept where "Content" meant it's not input to the compiler, but may get copied to the output, depending on the value of the "Copy to output dir" setting. That, and there isn't really another good name for it :sad: but I'm all ears on suggestions.

We made the following changes in our updates in IHostingEnvironment:

Added ApplicationName. This replaces IApplicationEnvironment.ApplicationName but otherwise contain the same information.
Added ContentRootPath. This replaces IApplicationEnvironment.ApplicationBasePath but otherwise contain the same information.
Removed Configuration
Removed MapPath

The announcement also mentions the removal of the MapPath(string virtualPath) method. Is there still a way to do what MapPath used to do?

I added a code snippet to the announcement to show the MapPath replacement.

Could we create a separate discussion work item for this?

I'll move it


Modernizer support shoutout

Suggestion: You could mention the support for Modernizer detection in the README.
(Or rather, the embedded Modernizer)

Done!


EPIC Formal AnyField support

Description
The worlds needs the Silverstripe-official way to manage the data of related objects with a lightweight way of managing relationships and their fields within the CMS. Something that's simpler than a GridField, but more sophisticated than other rudimentary ways of streamlining how an editor managed a record and fields on a related record. There's some great benefits to having a dedicate Form Field for this, and we already have interested from our user base to make it a reality.
Big story
As Silverstripe CMS editor, I want an intuitive way to manage the data of related records, so that I can easily and reliably edit relationships in a simpler experience than GridField
Success metrics
An official AnyField is gaining adoption, is the preferred solution by Silverstripe bespoke, and is a viable solution for editing related objects with a simple set of fields in a streamlined experience

I'm not 100% sure that adoption by a specific agency/vendor should be a success metric for an epic/a user story.

@jakxnz looks like you created this in the wrong place - anyfield is not related to elemental. I'll migrate it to the .github repo for now


Avoid various racing issues

This change solves the racing issues mentioned in BMO 1598413. Racing can happen when:

stream start and stream destroy runs in parallel

The stream data callback may still run when the stream is being destroyed

stream start and stream reinit runs in parallel

The stream data callback may still run when the stream is being reinitialized

stream stop and stream destroy runs in parallel

The stream data callback is canceled twice but it's probably fine

stream stop and stream reinit runs in parallel

The stream-stop may fail silently since reinit may restart stream after stream-stop is called

stream destroy and stream reinit runs in parallel

The stream-stop may fail silently since reinit may restart stream after stream-stop is called

To avoid the above problems, the stream-start and stream-start should be run in the same task queue where the stream-destroy and stream-reinit tasks are so all these operations are on the same task queue. As a result, they will be executed one by one sequentially, without worrying about racing.

try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=f216376090b35e8c526a7a20b3eb2ecfec8b91cd

try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=cc708ccadeac243fca0c1590bd15d8669fdedf6b


Excel tutorials

:x: Validation status: errors

File
Status
Preview URL
Details

:x:Error

Details

[Error] Cannot sync git repo to specified state. Please make sure the pull request is mergeable. Details: Git merge results in conflict, repository remote url: https://github.com/OfficeDev/office-js-docs-pr, working directory: W:\qhtj-s, target branch: master, target branch commit: 7f408af9243562ad5edc0c03e3ddd1ffeb87eb0d, source branch: excel-tutorials, source branch commit: .

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

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/toc.yml
:white_check_mark:Succeeded

docs/tutorials/excel-tutorial-create-chart.md
:white_check_mark:Succeeded

docs/tutorials/excel-tutorial-create-table.md
:white_check_mark:Succeeded

docs/tutorials/excel-tutorial-freeze-header.md
:white_check_mark:Succeeded

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


UI/UX - AZ Donations require a ZNN balance

Is your feature request related to a problem? Please describe.
Path: Syrius > AZ tab > Donate
Users require a ZNN balance to be able to donate funds to the mothership.
This doesn't consider addresses with 0 ZNN / >0 QSR
Describe the solution you'd like
We can change the requirement to an OR operator:
account has >0 ZNN or >0 QSR
File: https://github.com/hypercore-one/syrius/blob/develop/lib/widgets/modular_widgets/accelerator_widgets/accelerator_donation_stepper.dart

This issue was migrated to https://github.com/zenon-network/syrius/issues/79


Server Function taking struct with empty Vec fails to deserialize

Describe the bug
If a server function takes a MyData struct that contains a Vec, and then that server function is called with an empty Vec, it fails deserialization saying the whole field is missing.
#[derive(Serialize, Deserialize)]
struct Entry {
  id: i32,
}

#[derive(Serialize, Deserialize)]
struct MyData {
   // ... other fields
   some_list: Vec<Entry>,
}

#[server]
fn my_server_fun(data: MyData) {
}

#[component]
fn MyComponent() -> impl IntoView {
  let call_server_fn = create_action(move |_: &()| { my_server_fun(MyData{some_list: vec![]}) });
  view! {
    <button on:click=move || call_server_fun.dispatch() >{"Call server fun"}</button>
  }
}

Fails with:
{"Deserialization":"missing field `some_list`"}

Looking at the data sent over the network, it seems that it uses Multipart Encoding and sends the parameters as:
data[some_list][0]: ...
data[some_list][1]: ...

and when the list is empty, it just doesn't contain any entries for it. This is likely the cause of the issue.
Changing the encoding of the server function to Cbor works, so it's specific to the Url encoding.
Leptos Dependencies
leptos = { version = "^0.5.0-rc1", features = ["nightly"] }
leptos_axum = { version = "^0.5.0-rc1", optional = true }
leptos_meta = { version = "^0.5.0-rc1", features = ["nightly"] }
leptos_router = { version = "^0.5.0-rc1", features = ["nightly"] }

To Reproduce

Call a server function as described above with an empty list
Observe failure

Expected behavior
Server function is correctly called and deserializes its arguments

I have encountered with the same problem. A empty vector cause this error 😥

Some encodings have no method for displaying an empty list of items. Annotate your struct definition with #[serde(default)]. This will cause serde to assume a missing field is to be replaced with the Default::default` implementation of it.
#[derive(Serialize, Deserialize)]
struct MyData {
   #[serde(default)]
   some_list: Vec<Entry>,
}

I missed the fact that this was a nested struct originally. Yes I think @ChristopherPerry6060 has the correct answer here: add #[serde(default)] on the struct field or the whole struct.
@dpytaylo You say you've encountered the same issue: Is that similarly on a nested struct like this?
(I say "nested" because the server functions arguments are, themselves, built into a struct.)
It's also possible this is serde_qs specific behavior that makes encoding and decoding not perfectly reversible. (serde_qs is what's used for this server function URL encoding.)

Yeah so ultimately it's just this known issue with serde_qs: https://github.com/samscott89/serde_qs/issues/78
I guess we could add an attribute to the server fn macro that passes through #[serde(default)].

This is closed by #1762: You can add #[server(default)] to any argument to a server function to indicate that it should use the default value, if absent.


Request support for Tesla Air Conditioner TA36FFML-1232IAW

Log Message

Device matches della_airconditioner with quality of 71%. DPS: {"updated_at":<PHONE_NUMBER>.7287369, "1": true, "2": 230, "3": 250, "4": "hot", "5": "auto", "8": false, "12": false, "13": true, "14": false, "19": "C", "28": 0, "33": false, "102": false, "103": false, "104": false, "105": false, "106": false, "107": 0, "108": 14, "109": false, "110": false, "111": 0, "112": 0, "114": false}

Information about DPS mappings

{"1":"Power","2":"Set Temp","3":"Temp Current","4":"Mode","5":"WindSpeed","8":"Eco","12":"Heat","13":"Screen","14":"Child Lock","19":"Temp Scale","28":"Consumption","33":"Swing Horizontal","102":"Sleep","103":"Clean","104":"Anti-mould","105":"Up-down","106":"Health","107":"Fault","108":"机型","109":"定时开机","110":"定时关机","111":"定时-小时","112":"定时-分钟","113":"Power limit","114":"用电限制开关"}

Power	Boolean
"{true,false}"

temp_set	Integer
{
  "unit": "℃/F",
  "min": 160,
  "max": 900,
  "scale": 1,
  "step": 10
}

temp_current	Integer
{
  "unit": "℃/F",
  "min": -300,
  "max": 1760,
  "scale": 1,
  "step": 10
}

mode	Enum
{
  "range": [
    "cold",
    "hot",
    "wet",
    "wind",
    "auto"
  ]
}

windspeed	Enum
{
  "range": [
    "mute",
    "low",
    "mid",
    "high",
    "auto",
    "strength",
    "mid_low",
    "mid_high"
  ]
}

eco	Boolean
"{true,false}"

heat	Boolean
"{true,false}"

light	Boolean
"{true,false}"

child_lock	Boolean
"{true,false}"

C_F	Enum
{
  "range": [
    "C",
    "F"
  ]
}

power_consumption	Integer
{
  "unit": "kW·h",
  "min": 0,
  "max": 255,
  "scale": 0,
  "step": 1
}

switch_horizontal	Boolean
"{true,false}"

sleep	Boolean
"{true,false}"

clean	Boolean
"{true,false}"

anti_mould	Boolean
"{true,false}"

up_down_wind	Boolean
"{true,false}"

health	Boolean
"{true,false}"

fault_up	Integer
{
  "unit": "",
  "min": 0,
  "max": 30,
  "scale": 0,
  "step": 1
}

model	Bitmap
{
  "label": [
    "0",
    "1",
    "2",
    "3"
  ],
  "maxlen": 4
}

countdown_on	Boolean
"{true,false}"

countdown_off	Boolean
"{true,false}"

countdown_hour	Integer
{
  "unit": "h",
  "min": 0,
  "max": 23,
  "scale": 0,
  "step": 1
}

countdown_min	Integer
{
  "unit": "min",
  "min": 0,
  "max": 59,
  "scale": 0,
  "step": 1
}

power_limit	Integer
{
  "unit": "%",
  "min": 30,
  "max": 100,
  "scale": 0,
  "step": 1
}

power_limit_switch	Boolean
"{true,false}"

Product ID

"model": "TYAUX_F / AUX_LM / TYAUX_J",
"product_id": "wxqdp6ecfkd78zzz",
"product_name": "AUX系列空调-DP新增",

Information about how the device functions

The logs needed are the local logs from when you try to add the device using this integration.

logs are updated.
i just edited "Della air conditioner" and change some names of entities and added horizontal swing switch...
It is now fully working
name: Tesla air conditioner
primary_entity:
  entity: climate
  dps:
    - id: 1
      name: hvac_mode
      type: boolean
      mapping:
        - dps_val: false
          value: "off"
        - dps_val: true
          constraint: mode
          conditions:
            - dps_val: cold
              value: cool
            - dps_val: hot
              value: heat
            - dps_val: wet
              value: dry
            - dps_val: wind
              value: fan_only
            - dps_val: auto
              value: heat_cool
    - id: 2
      name: temperature
      type: integer
      range:
        min: 160
        max: 320
      mapping:
        - scale: 10
          step: 10
          constraint: temperature_unit
          conditions:
            - dps_val: F
              range:
                min: 600
                max: 900
    - id: 3
      name: current_temperature
      type: integer
      mapping:
        - scale: 10
    - id: 4
      name: mode
      type: string
      hidden: true
    - id: 5
      name: fan_mode
      type: string
      mapping:
        - dps_val: mute
          value: "off"
        - dps_val: low
          value: low
        - dps_val: mid
          value: medium
        - dps_val: high
          value: high
        - dps_val: auto
          value: auto
    # preset only works in cooling mode
    - id: 8
      name: preset_mode
      type: boolean
      mapping:
        - dps_val: true
          value: eco
        - dps_val: false
          value: comfort
    - id: 19
      name: temperature_unit
      type: string
    - id: 105
      name: swing_mode
      type: boolean
      mapping:
        - dps_val: true
          value: vertical
        - dps_val: false
          value: "off"
    - id: 107
      type: bitfield
      name: fault_code
secondary_entities:
  - entity: switch
    name: Heat
    icon: "mdi:fire"
    dps:
      - id: 12
        name: switch
        type: boolean
  - entity: switch
    name: Swing horizontal
    icon: "mdi:swap-horizontal"
    dps:
      - id: 33
        name: switch
        type: boolean
  - entity: light
    name: Backlight
    category: config
    icon: "mdi:television-ambient-light"
    dps:
      - id: 13
        name: switch
        type: boolean
  - entity: lock
    name: Child lock
    category: config
    icon: "mdi:hand-right-back-off"
    dps:
      - id: 14
        name: lock
        type: boolean
  - entity: select
    name: Temperature unit
    icon: "mdi:temperature-celsius"
    category: config
    dps:
      - id: 19
        type: string
        name: option
        mapping:
          - dps_val: C
            value: Celsius
          - dps_val: F
            value: Fahrenheit
  - entity: sensor
    class: energy
    category: diagnostic
    dps:
      - id: 28
        name: sensor
        type: integer
        unit: kWh
        class: total_increasing
  - entity: switch
    name: Sleep
    category: config
    icon: "mdi:power-sleep"
    dps:
      - id: 102
        name: switch
        type: boolean
  - entity: switch
    name: Clean
    dps:
      - id: 103
        name: switch
        type: boolean
  - entity: switch
    name: Anti-mould
    category: config
    dps:
      - id: 104
        name: switch
        type: boolean
  - entity: switch
    name: iHealth
    icon: "mdi:creation"
    dps:
      - id: 106
        name: switch
        type: boolean
  - entity: binary_sensor
    name: Fault
    class: problem
    category: diagnostic
    dps:
      - id: 107
        name: sensor
        type: bitfield
        mapping:
          - dps_val: 0
            value: false
          - value: true

No, because if the device isn't recognised as matching that config, then why would I want to handle all the additional bug reports from people who manually decide to use it anyway?
Possibly there is just a small difference, which can be handled by setting one of the dps to be optional, but I can only judge that if you send the log message that is associated with this non-recognition.

makes sense :)
found a log entry 2024-05-13 09:52:48.329 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Loaded device config tesla_airconditioner.yaml 2024-05-13 09:52:48.329 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Not match for Tesla Air conditioner, DPs have incorrect type: [{'103': 'int'}]
i think that there are duplicated dp's 103 and 104 on lines 234 and 251, there should be 113 and 114 for power limit


Jib built image file date 1970 problem

Description of the issue:
Projects are SpringBoot and Vue, Web projects
The front end is placed in the resources/static file.
Recently, I changed it to the Jib package. When Http accesses, the cache is very serious.
The browser is based on the last modification time to determine whether to cache, all 304.
Based on the JIb packaged project, the file modification time is 1970.
Therefore, the browser cannot update the file.
http response header by file all:
last-modified: Thu, 01 Jan 1970 00:00:01 GMT
is not:
Last-Modified:Fri, 21 Jun 2019 06:45:40 GMT
中文描述:
项目是 SpringBoot 和 Vue ，Web项目
前端放在 resources/static 文件内。
最近，改成Jib方式打包。Http访问时，缓存很严重。
浏览器是基于 最后修改时间 判断是否缓存，全 304。
基于JIb打包的项目，文件的修改时间都是 1970 。
因此，浏览器出现无法更新文件。
http 响应的文件头:
last-modified: Thu, 01 Jan 1970 00:00:01 GMT
并不是
Last-Modified:Fri, 21 Jun 2019 06:45:40 GMT

Expected behavior:
I think all the file is 1970, not the right behavior
root@e5946250a9b5:/app# ls resources/ -l
total 24
-rw-r--r-- 1 root root 2432 Jan  1  1970 application.yml
drwxr-xr-x 3 root root 4096 Jan  1  1970 com
-rw-r--r-- 1 root root  966 Jan  1  1970 data.sql
-rw-r--r-- 1 root root  685 Jan  1  1970 rebel.xml
-rw-r--r-- 1 root root  347 Jan  1  1970 schema-h2.sql
drwxr-xr-x 2 root root 4096 Jan  1  1970 static

**I want to see like this: **
root@e5946250a9b5:/app# ls resources/ -l
total 24
-rw-r--r-- 1 root root 2432 Jun 21 15:42 application.yml
drwxr-xr-x 1 root root 4096 Jun 21 15:42 com
-rw-r--r-- 1 root root  966 Jun 21 15:42 data.sql
-rw-r--r-- 1 root root  685 Jun 21 15:42 rebel.xml
-rw-r--r-- 1 root root  347 Jun 21 15:42 schema-h2.sql
drwxr-xr-x 1 root root 4096 Jun 21 15:42 static

Steps to reproduce:

Environment:
MacOS , Maven
jib-maven-plugin Configuration:
<plugin>
                <groupId>com.google.cloud.tools</groupId>
                <artifactId>jib-maven-plugin</artifactId>
                <version>1.3.0</version>
                <configuration>
                    <from>
                        <!--base image-->
                        <image>openjdk:8u212</image>
                    </from>
                    <container>
                        <labels>
                            <MAINTAINER>soulmz</MAINTAINER>
                        </labels>
                        <workingDirectory>/app</workingDirectory>
                        <environment>
                            <!-- 时区 -->
                            <TZ>Asia/Shanghai</TZ>
                            <!-- 强制设置默认 8080端口 -->
                            <SERVER_PORT>8080</SERVER_PORT>
                        </environment>
                        <useCurrentTimestamp>true</useCurrentTimestamp>
                        <!-- 可选操作 -->
                        <ports>
                            <port>8080</port>
                        </ports>
                        <volumes>
                            <volume>/app/logs</volume>
                            <volume>/app/heapdump</volume>
                        </volumes>
                    </container>
                    <to>
                        <image>demo:v1.0.0</image>
                    </to>
                </configuration>
            </plugin>

Log output:
Additional Information:
I think that is a great plugin jib。 thx

Hi @soulmz,
This is the intended behavior and explained in this FAQ: https://github.com/GoogleContainerTools/jib/blob/master/docs/faq.md#why-is-my-image-created-48-years-ago
For now, you can set the current timestamp for the image creation time with <useCurrentTimestamp>, but as explained in the FAQ, you should be aware that this will lead to non-reproducible builds.
While we are at it, we have an open issue for another option (#1609) for more flexible configuration for the creation time.
FTR, #1608 is also slightly related, but #1608 is for the timestamps in the files in an image.

I'm closing this issue, but feel free to re-open if you have more feedback.

@chanseokoh
yeah，I need This feature.
Because you can't guarantee anything, all users can as you have expected such behavior.
It makes me very headache now。


Feature/upgrade to falcon 1 1 0

Coverage remained the same at 99.958% when pulling 9f283a1b181e0ed0e2138146910eb02e03b21e64 on feature/upgrade-to-falcon-1-1-0 into 3a7da753afd188e34824d3bef7cfee2d7cf40581 on develop.


Consider reporting which (perhaps deeply nested) properties fail to meet the specified threshold

Suggestion
If I have a complex, deeply nested type that I want to be (think should be) immutable but it is being reported as something less than that, working out exactly which part falls short is difficult and time-consuming (and heavily manual). It would be great if the reported issue could give some more clues to narrow down where the issue is.

This is something I would like to add.
Figuring out the details of how it should work and integrate with eslint plugins is a little tricky though.


Not possible to update a @vx/grid scale in a performant way?

I would like to update the scale on a Grid component every few milliseconds, in accordance with a mouse drag. I have this working already with plain d3, but I am attempting to rewrite it using react & vx.
You can manipulate a LinePath this way easily by using its innerRef instead of using setState.
But Grid has no innerRef. It looks like Grid just builds an SVG group that wraps a bunch of lines, which makes sense. But without a way to reference the inner refs, it seems that you must rely on setState to update the Grid scales, and this is really non-performant. It is laggy and for anything beyond about 2 updates per second.
Is there a way to update the xScale and yScale on a Grid in a performant way, so that it can be done without lag every few milliseconds?

@williaster Wondering if you might have any ideas?

Sorry for the delay, closing this as it should now be possible with AnimatedGrid from @vx/react-spring (added in 0.0.199), or using a similar approach if you don't want to use react-spring.
https://vx-demo.now.sh/axis includes a demo of AnimatedAxis + AnimatedGrid, and you can check out #787 where it was added.


The version 2 is not workable when variant videos/options on.

The current version of this script is not compatible wherein variant of videos/options is on the webpage,it kept reloading could not stop. Even you have clicked one option it kept rolled back to the original.  Please fix this issue. Thank you. The first version is fine,
https://ibb.co/cYE3Ha

Add this line at the beginning
// @exclude       ://netdna-storage.com/download/
That should fix it.

Thank you. It works now.

It did works,however it couldn't download right away without pop-ups which is inconvenience. I will stick with v.1 unless otherwise.  Thanks for solutions anyway.

Hey, sorry for the delay. I released a new version. It should work fine now.

Sorry, the patch I released was only working on Firefox. Now it works all platforms again :) .

Thank you. It work now.

Hi,Jonny Shuali
The version 4 is still has pop-ups issue when clicked the Download button,it just couldn't execute the process but kept looping pop-ups. And again,version 1 is fine.

You shouldn't click on the Download button. It suppose to click it by itself.
What browser and plugin are you using? Can you take a video so I can see the problem?

I think I found the problem.

I think I found the problem;on that webpage,I didn't block adf.ly which why it kept pop-ups. Now,it solved. Thank you for this good script.


Both: Show service name somewhere on the page at all times?

Generally this is super inconsistent throughout the prototype. Some pages show service name, and some don't.


double faster than int?

Interesting results: https://godbolt.org/z/PsWGoo.
It is not caused by the Debug library on Compiler Explorer. I get similar results on my local machine for the Release build. Why double is faster than int?

Maybe it has to do with the use of doubles in the convert function. I remember reading that before using doubles after ints and viceversa, the ALU has to do some context switches.

Some thoughts!

I'm not sure why the Rep dd; is volatile, but that has no effect here. Be aware making things volatile is not a good way to "make sure the compiler does the work" as it often pessimises too much. But not important here :)
Integer division is considerably slower than floating point division. An integer divide takes ~30-40 cycles for a 32-bit value, and is not pipelined, meaning another divide can't start until the first one finishes. Floating point division is "only" a half-dozen or so cycles.

https://godbolt.org/z/ch9oxo shows the double avg_speed is:
        divsd   xmm0, xmm1

and the int one is:
        mov     eax, edi
        cdq
        idiv    esi

chucking it to analysis view: https://godbolt.org/z/cbW9hr
gives some idea (though really the idiv cost is data-dependent) : for the double it's 1403 cycles for 100 "operations", for the int it's 3668 cycles; so roughly 2-3x slower, which maps pretty well to your observations.

Wow, thanks a lot @mattgodbolt! That explains a lot.

chucking it to analysis view: https://godbolt.org/z/cbW9hr

This is awesome! I was not aware of this feature 😃