Repository navigation
onboard-openneuro: reporters survive a log with no marker - #116
Merged
Merged
Conversation
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.
Paired with nemarOrg/nemar-cli#1366, which fixes the same file in the repository it is authored in. This is the deployed copy; both must match, and nemar-cli's parity test enforces that.
What is broken today
Actions runs a
run:step underbash -e {0}, and the three failure reporters addset -o pipefail. So when the tee'd CLI log holds no✖:line="$(grep -nF '✖' "$log" 2>/dev/null | tail -n 1 | cut -d: -f1)"grepexits 1, pipefail promotes it to the pipeline's status, and-ekills the step at that assignment, before the named fallback three lines below. Nothing is posted to/webhooks/import-state, so thereportjob'sterminal: prepare=failure copy=failure finalize=failureroll-up is what lands: the pre-change behavior, for exactly the failures the fallback exists for (an OOM, an evicted runner, a cancellation, or a failure early enough that the log was never written).preparewas also the only reporter that never initializedmsg, so underset -uit died at its own[ -z "$msg" ]test withmsg: unbound variable.The change
|| trueon the three grep pipelines, andmsg=""inprepare. Most of the changed lines are the comments explaining why, since a future reader would otherwise read|| trueas defensive noise and remove it.Nothing else differs: this file was byte-identical to nemar-cli's copy before the change, and is byte-identical after it.
Verification
It cannot be verified from this repository, which is the reason the authoring copy lives next to its tests. In nemar-cli#1366 the reporters are extracted from this YAML and executed under
bash -e(previously the fallback was only asserted as a string in the file, which is why this shipped): nine cases across the three stages covering no marker, a missing log, a real CLI failure line still winning, and prepare's upstream-inaccessible branch. Removing|| truefails six of them.The next failing import is the live smoke test: its tracking issue should name a real cause, or the named fallback, rather than the stage roll-up.