fix(scripts): make arc-check.sh report unavailable data instead of "ok" - #364
Open
yzwooyi wants to merge 1 commit into
Open
fix(scripts): make arc-check.sh report unavailable data instead of "ok"#364yzwooyi wants to merge 1 commit into
yzwooyi wants to merge 1 commit into
Conversation
- --el: warn and continue when admin_peers is unavailable or the EL endpoint is unreachable, instead of printing "Connected: 0 peers" and aborting the report on a jq iterate-null error - proposal history: count heights whose /proposal-monitor lookup failed and exclude them from the verdicts instead of counting them as ok - nodes not in the validator set no longer get the red "never selected as proposer" verdict - progress bar: replace seq-based padding (off by one at 0%/100%, two chars on BSD seq) with printf padding; guard total == 0 - add scripts/test_arc_check.sh with an inline mock of the CL/EL RPCs
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.
Closes: #363
scripts/arc-check.shreported four failure modes as healthy, or aborted the report. This PR fixes them; when every height is reachable and the node is a validator, the output wording is unchanged.--elnode withoutadminnamespace →Connected: 0 peers, thenjq: Cannot iterate over null, exit 5, Proposal History never runsWARN: admin_peers unavailable: Method not found (is the admin namespace enabled?), report continues; transport failure also warns instead ofdie/proposal-monitorheights silently skipped but counted →All 50 proposals decided successfully: yesProposal data unavailable for N/M heights (not counted); verdicts use only fetched heightsnever selected as proposernot in validator set (expected for non-validator nodes); red verdict kept for in-set validators with 0 proposals; a node that did propose is alwaysokregardless of key decoding#at 0 % (two on macOS,seq 1 0counts down) and.at 100 %printf '%*s' N '' | trpadding,total == 0guardedTesting
scripts/test_arc_check.sh: inline pythonhttp.servermock of the CL endpoints (/health,/status,/network-state,/proposal-monitor) and the EL JSON-RPC (admin_peers), shapes taken fromcrates/malachite-app/src/rpc/types.rs/handlers.rs. Scenarios: admin namespace disabled, missing heights, node not in validator set, node in set with own proposals, bar padding.main:PASS: 5 FAIL: 8(cases 1–3 fail as expected). With this PR:PASS: 13 FAIL: 0.bash -n scripts/arc-check.shclean. Run on macOS 27.0 with the stock/bin/bash3.2.57, jq 1.7.1, python 3.11.15; the test only needs bash, jq, curl, python3.