verify-deployment.sh reports "Testnet was reset" when the Stellar CLI is simply not installed
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 85/100
Research direction
Start by reproducing with env PATH=/usr/bin:/bin bash scripts/verify-deployment.sh, then read the fetch block at lines 22-28, where 2>/dev/null hides the missing-command error. Add a command -v check for stellar and sha256sum/shasum at the top of both scripts and scripts/testnet-demo.sh, which calls stellar from line 47. Done when a missing tool exits 3 at once with a clear message, exit 3 is documented in the script header and README, and bash -n scripts/*.sh passes.
Written by the indexing model from the issue text.
Description
Written against commit 78d0a89; later commits may have moved things, so check the code first.
Size: Trivial
Description
scripts/verify-deployment.sh has three documented exit codes: 0 the network holds the pinned code, 1 it holds different code, 2 "the code could not be fetched (no network, or the contract is gone: Testnet is reset from time to time)". The fetch is stellar contract fetch ... 2>/dev/null inside an if, retried three times with a 5-second sleep. If stellar is not installed, the shell's command not found is thrown away by 2>/dev/null, the loop retries twice, and the script ends with COULD NOT FETCH ... the network may be unreachable, or Testnet was reset and the contract is gone and exit code 2. A new contributor who skipped the CLI install is told something false, after 10 seconds, and the weekly CI job would report a missing tool the same way as a real Testnet reset.
Current state
scripts/verify-deployment.shlines 22-28.scripts/testnet-demo.shcallsstellarfrom line 47 on without any check.- README "Run it, from nothing" lists the CLI as a requirement but nothing checks it.
What to build
Check for the tools at the top of the script (command -v stellar, and sha256sum or shasum) and fail with a message that names the missing tool and where to get it, with a different exit code from the documented 0/1/2 (use 3 and document it in the script header and the README paragraph that lists the codes). Do the same at the top of testnet-demo.sh.
Acceptance criteria
- With
stellarremoved fromPATH(env PATH=/usr/bin:/bin bash scripts/verify-deployment.sh), the script prints the missing-tool message at once, without retrying or sleeping, and exits3. - With the CLI present, behaviour and exit codes
0/1/2are unchanged. - README and the script header document exit
3. -
bash -n scripts/*.shpasses.
Out of scope
Installing the CLI for the user.
Verification
Run the command above, and the normal run (needs network).
- Dominant language
- Rust
- Stars
- 2
- Forks
- 2
- Avg merge
- 49m
- Merged PRs (30d)
- 1
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Sorogate/example-consumer
-
documentation good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Sorogate/example-consumer#17 ·
-
documentation good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Sorogate/example-consumer#16 · 1 comment · 1 reaction ·
-
documentation good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Sorogate/example-consumer#15 ·
-
enhancement good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Sorogate/example-consumer#14 ·
-
enhancement good first issue help wanted
Difficulty 2/5 Half a day Newbie friendliness 80/100
Sorogate/example-consumer#12 ·
All issues in Sorogate/example-consumer
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
antithesishq/bombadil#361 ·
Maintainers usually reply within 1 day
-
test(executor_l0): assert execute() TaskOutcome, not only bus events / 断言 execute() 返回的 TaskOutcomeOpentype:debt
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
skaiy/wild_agentos#425 ·
Maintainers usually reply within 1 day
-
Default-import note suggests `import * as process` for velt:process, which does not name the builtinOpen
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
bug ticket
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
cratestack/cratestack#1154 ·
Maintainers usually reply within 1 day
-
status:needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day