cmd: the state-file delete prompt and integration Run commands exit 0 on failure
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- Half a day
- Newbie friendliness
- 45/100
Research direction
Start with the prompt in DeleteStateSnapshots in cmd/utils/app/snapshots_cmd.go around lines 1052-1061, where os.Exit(0) is called on read failure. Then look at the integration commands in cmd/integration/commands that use cobra Run and return errors only by logging. Done means a prompt read error exits non-zero, and commands return errors through RunE with defer debug.Exit() in place, verified by running rm-state and rebuild with closed stdin.
Written by the indexing model from the issue text.
Description
Commands that fail or do nothing still exit 0, so scripts and unattended runs cannot tell them from a finished run.
DeleteStateSnapshots(cmd/utils/app/snapshots_cmd.go:1052-1061) callsos.Exit(0)when its prompt cannot read an answer (EOF from a closed stdin, or input that is not a number), the same as for the "Exit" choice.erigon seg rm-stateandintegration commitment rebuildwithout--yesshare it.- Reported in the #24304 review (https://github.com/erigontech/erigon/pull/24304#pullrequestreview-5891007601): after
erigon seg rm-state --domain=commitment,rebuildwithout--yesread EOF at the "remove 0 files?" prompt, did nothing and exited 0. - Most commands in
cmd/integration/commandsuse cobraRun(23 of 30 with #24304); each that logs an error and returns exits 0. #24304 movescommitment rebuildtoRunE. - Fix: exit non-zero on a prompt read error; return errors from the remaining
Runcommands. Each newRunEneedsdefer debug.Exit(), asrebuildhas in #24304: cobra returns beforePersistentPostRunwhenRunEfails, so--pprof.cpuprofileand--traceoutput is never finished.
- Dominant language
- Go
- Stars
- 3.6k
- Forks
- 1.6k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 820
Getting set up
- Ships a Dockerfile or Docker Compose file
- No 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 erigontech/erigon
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
erigontech/erigon#26523 ·
Maintainers usually reply within 1 day
-
flaky test
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
erigontech/erigon#26230 ·
Maintainers usually reply within 1 day
-
txnprovider/txpool: pending nonce counts past gaps in the poolPossibly taken @yperbasis claimed this 7 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
erigontech/erigon#26014 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
tracing: expose custom error selector and raw payload in callTracer revertReasonPossibly taken @lupin012 claimed this 9 days ago. OpenRPC
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
erigontech/erigon#25928 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
txnprovider/txpool: remove redundant blob/commitment length checkPossibly taken @yperbasis claimed this 14 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
erigontech/erigon#25432 ·
Maintainers usually reply within 1 day
All issues in erigontech/erigon
Similar issues
-
enhancement exporter/awskinesis needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
open-telemetry/opentelemetry-collector-contrib#53334 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 83/100
SocialGouv/iterion#3376 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
seaweedfs/seaweedfs#12740 · 2 comments ·
Maintainers usually reply within 1 day
-
area:indexer bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
seanb4t/codegraph-go#385 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day