feat(cli): changes to run to work better with detached stdin (no shell)#426
Conversation
🦋 Changeset detectedLatest commit: f11ab86 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Coverage Report
📁 File Coverage (11 files)
|
endersonmaia
left a comment
There was a problem hiding this comment.
for me Anvil never gets healthy
docker inspect --format "{{json .State.Health.Log }}" my-go-dapp-anvil-1 | jq .
...
"ExitCode": 2,
"Output": "/usr/local/bin/eth_isready: 7: 1: parameter not set\n"
...
It was introduced when defining set -u in the eth_isready in cartesi/sdk.
An easy fix should be something like
BLOCK_NUMBER=${1:-}
if [ -n "$BLOCK_NUMBER" ]; then
...
Hmm, that's for another PR right? How did it work before? |
|
Maybe we should rethink how to do this better, because today docker compose is always executed in the background with |
I'll send that PR.
We're focusing on testing the It fails without |
35b34cc to
1ac383d
Compare
c9b9951 to
3dd477c
Compare
1ac383d to
75b6333
Compare
3dd477c to
52306dd
Compare
4cfa5ca to
f11ab86
Compare
|
Changed the code to not run compose detached if TTY is not attached |
| // stdio: "inherit", | ||
| // input: composeFile.build() | ||
| // }); | ||
|
|
There was a problem hiding this comment.
This was commented when migrated from YAML to TS, and compose file being passed via stdin.
When executed for the first time, it downloads on the backgound but it doesn' t gives any feedback to the user, looks like it's stuck.
We need a solution for this, but won't blok this PR for that.
This makes
cartesi runto work better with detached stdin, by not running the shell at the end.You can test this by running
cartesi run < /dev/null.The goal is to make
runwork well when it's launched from another spawn.The application deployment had to be moved from the shell loop to before the shell is called, so it happens with this new mode.