fix(cli): exit non-zero on issues register logical failures#746
Open
ebios-star wants to merge 1 commit intoentrius:testfrom
Open
fix(cli): exit non-zero on issues register logical failures#746ebios-star wants to merge 1 commit intoentrius:testfrom
ebios-star wants to merge 1 commit intoentrius:testfrom
Conversation
Two logical failure branches in `issues register` previously printed an error then returned (exit code 0), matching the class of bug fixed in entrius#707 for admin/vote/harvest. Both now raise SystemExit(1): - Contract metadata missing: error printed via print_error for consistency with the rest of the command. - Transaction returns is_success=False (ContractReverted, etc.): transaction hash still printed for debugging, then exits non-zero. Add a regression test under TestCliRegisterLogicalFailures.
Collaborator
|
Fold #747 into this PR — same class of fix in |
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two logical failure branches in
gitt issues registerstillreturnwith exit code 0, matching the class of bug fixed in #707 for admin/vote/harvest (which did not touchregister):Error:line and returned (exit 0). Now usesprint_errorfor consistency andraise SystemExit(1).is_success=False(e.g.,ContractReverted) — printed the failure reasons and the transaction hash, then returned (exit 0). Still prints the hash for debugging, now exits non-zero.CI/scripting that chains
gitt issues register && <next-step>previously treated these failures as successes; after this change they propagate the failure correctly.Related Issues
N/A — follow-on to #707.
Type of Change
Testing
TestCliRegisterLogicalFailures::test_register_exits_non_zero_when_contract_metadata_missingto guard the metadata-missing path.uv run --extra dev pytest tests/— all 430 tests pass.Checklist