-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(test-tooling): substrate test ledger fails if WS_PORT not specified #2213
Comments
Thanks for tracking this problem @RafaelAPB I added some more labels. It seems like one of those issues that I would know how to fix quickly because I've seen similar crashes from docker before, so, if you struggle to debug what the problem is just let me know and I can take a stab at it myself. |
Thanks a lot, Peter. I'm not resolving this in the near future. |
Docker expects environment variables passed to the container to be strings. The null coalescing code was making it so that if the test case did not pass in a custom WS_PORT env var, then it would default to using a value for the port that was a number not a string. This would crash the serialization logic within docker that was trying to apply the environment variables to the container when starting it. Switching the type of 9944 default WS port to "9944" (string) fixes it. Also specifying explicitly the `wsPort` variable's type to be string so that the next time someone tries to make this mistake the compiler will slap their hands right away. Fixes hyperledger-cacti#2213 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Simple examples using Cacti tailored for the workshop 2022-11-14. Thanks to @AndreAugusto11 and Monica Gomez monicasrgomez@gmail.com @msrgomez for the amazing work. Works with version 1.0.0 of cactus-tooling. Depends on hyperledger-cacti#2213 Co-Authored-By: Monica Gomez <monicasrgomez@gmail.com> Co-Authored-By: André Augusto <andre.augusto@tecnico.ulisboa.pt> Co-Authored-By: Peter Somogyvari <peter.somogyvari@accenture.com> Signed-off-by: André Augusto <andre.augusto@tecnico.ulisboa.pt> Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt> Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Simple examples using Cacti tailored for the workshop 2022-11-14. Thanks to @AndreAugusto11 and Monica Gomez monicasrgomez@gmail.com @msrgomez for the amazing work. Works with version 1.0.0 of cactus-tooling. Depends on hyperledger-cacti#2213 Signed-off-by: André Augusto <andre.augusto@tecnico.ulisboa.pt> Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt> Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com> Co-Authored-By: Monica Gomez <monicasrgomez@gmail.com> Co-Authored-By: André Augusto <andre.augusto@tecnico.ulisboa.pt> Co-Authored-By: Peter Somogyvari <peter.somogyvari@accenture.com>
Simple examples using Cacti tailored for the workshop 2022-11-14. Thanks to @AndreAugusto11 and Monica Gomez monicasrgomez@gmail.com @msrgomez for the amazing work. Works with version 1.0.0 of cactus-tooling. Depends on hyperledger#2213 Signed-off-by: André Augusto <andre.augusto@tecnico.ulisboa.pt> Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt> Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com> Co-Authored-By: Monica Gomez <monicasrgomez@gmail.com> Co-Authored-By: André Augusto <andre.augusto@tecnico.ulisboa.pt> Co-Authored-By: Peter Somogyvari <peter.somogyvari@accenture.com>
Simple examples using Cacti tailored for the workshop 2022-11-14. Thanks to @AndreAugusto11 and Monica Gomez monicasrgomez@gmail.com @msrgomez for the amazing work. Works with version 1.0.0 of cactus-tooling. Depends on hyperledger-cacti#2213 Signed-off-by: André Augusto <andre.augusto@tecnico.ulisboa.pt> Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt> Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com> Co-Authored-By: Monica Gomez <monicasrgomez@gmail.com> Co-Authored-By: André Augusto <andre.augusto@tecnico.ulisboa.pt> Co-Authored-By: Peter Somogyvari <peter.somogyvari@accenture.com>
Docker expects environment variables passed to the container to be strings. The null coalescing code was making it so that if the test case did not pass in a custom WS_PORT env var, then it would default to using a value for the port that was a number not a string. This would crash the serialization logic within docker that was trying to apply the environment variables to the container when starting it. Switching the type of 9944 default WS port to "9944" (string) fixes it. Also specifying explicitly the `wsPort` variable's type to be string so that the next time someone tries to make this mistake the compiler will slap their hands right away. Fixes #2213 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Simple examples using Cacti tailored for the workshop 2022-11-14. Thanks to @AndreAugusto11 and Monica Gomez monicasrgomez@gmail.com @msrgomez for the amazing work. Works with version 1.0.0 of cactus-tooling. Depends on hyperledger-cacti#2213 Signed-off-by: André Augusto <andre.augusto@tecnico.ulisboa.pt> Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt> Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com> Co-Authored-By: Monica Gomez <monicasrgomez@gmail.com> Co-Authored-By: André Augusto <andre.augusto@tecnico.ulisboa.pt> Co-Authored-By: Peter Somogyvari <peter.somogyvari@accenture.com>
Simple examples using Cacti tailored for the workshop 2022-11-14. Thanks to @AndreAugusto11 and Monica Gomez monicasrgomez@gmail.com @msrgomez for the amazing work. Works with version 1.0.0 of cactus-tooling. Depends on hyperledger-cacti#2213 Signed-off-by: André Augusto <andre.augusto@tecnico.ulisboa.pt> Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt> Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com> Co-Authored-By: Monica Gomez <monicasrgomez@gmail.com> Co-Authored-By: André Augusto <andre.augusto@tecnico.ulisboa.pt> Co-Authored-By: Peter Somogyvari <peter.somogyvari@accenture.com>
Simple examples using Cacti tailored for the workshop 2022-11-14. Thanks to @AndreAugusto11 and Monica Gomez monicasrgomez@gmail.com @msrgomez for the amazing work. Works with version 1.0.0 of cactus-tooling. Depends on hyperledger-cacti#2213 Signed-off-by: André Augusto <andre.augusto@tecnico.ulisboa.pt> Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt> Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com> Co-Authored-By: Monica Gomez <monicasrgomez@gmail.com> Co-Authored-By: André Augusto <andre.augusto@tecnico.ulisboa.pt> Co-Authored-By: Peter Somogyvari <peter.somogyvari@accenture.com> Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>
Simple examples using Cacti tailored for the workshop 2022-11-14. Thanks to @AndreAugusto11 and Monica Gomez monicasrgomez@gmail.com @msrgomez for the amazing work. Works with version 1.0.0 of cactus-tooling. Depends on hyperledger-cacti#2213 Signed-off-by: André Augusto <andre.augusto@tecnico.ulisboa.pt> Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt> Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com> Co-Authored-By: Monica Gomez <monicasrgomez@gmail.com> Co-Authored-By: André Augusto <andre.augusto@tecnico.ulisboa.pt> Co-Authored-By: Peter Somogyvari <peter.somogyvari@accenture.com> Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>
Simple examples using Cacti tailored for the workshop 2022-11-14. Thanks to @AndreAugusto11 and Monica Gomez monicasrgomez@gmail.com @msrgomez for the amazing work. Works with version 1.0.0 of cactus-tooling. Depends on #2213 Signed-off-by: André Augusto <andre.augusto@tecnico.ulisboa.pt> Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt> Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com> Co-Authored-By: Monica Gomez <monicasrgomez@gmail.com> Co-Authored-By: André Augusto <andre.augusto@tecnico.ulisboa.pt> Co-Authored-By: Peter Somogyvari <peter.somogyvari@accenture.com> Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>
Describe the bug
As per our cactus-workshop examples branch, PR #2204, running examples/cactus-workshop-examples/src/main/typescript/test-ledger.ts yields an error. PR #1997 also depends on this issue.
To Reproduce
Run test case examples/cactus-workshop-examples/src/main/typescript/test-ledger.ts
Expected behavior
The test ledger should run without error
Logs/Stack traces
Cloud provider or hardware configuration:
Are you running the software on a dev machine or somewhere in the cloud?
Operating system name, version, build:
Linux 5.15.0-1018-gcp x86_64
NAME="Ubuntu"
VERSION="20.04.3 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.3 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
Hyperledger Cactus release version or commit (git rev-parse --short HEAD):
3ba2ff4
Test tooling version 1.1.2. Bug does not exist in version 1.0.0
The text was updated successfully, but these errors were encountered: