ci: gate on relay interop's real exit code instead of grep-scraping stdout - #43
Merged
Merged
Conversation
…tdout Replaces `interop_out=$(relay interop ... 2>&1) || true` + a grep of stdout for ERROR/FAIL with a plain `relay interop --strict --protocol LIN ./target/release/rust-lin` invocation whose real exit code gates the step directly. The old form silently tolerated both a genuinely broken run and any future change to relay interop's output format, since `|| true` swallowed the real exit code before the grep ever ran. --protocol LIN restricts the check to rust-lin's own protocol and --strict fails on a missing convert rather than treating it as an innocuous skip -- matching the pattern already fixed in rust-RCP (SoundMatt/rust-RCP#171) and go-RCP/go-LIN's existing clean form. The surrounding job is already correctly named 'conformance' (not 'interop'), so no rename needed here, unlike rust-RCP's fix. Verified locally against the exact relay v2.0.4 build this job installs: a real rust-lin binary produces RESULT: PASS / exit 0; mutation-tested against a deliberately broken binary, confirmed RESULT: FAIL / exit 1 (the previous || true form would have swallowed this). Also confirmed no job-id collisions exist in this workflow (5 unique job ids, none duplicated) before pushing, after the job-collision bug found while fixing rust-RCP's identical pattern. SoundMatt/RELAY THEME-K (#125) / INTEROP-04 (#149). Signed-off-by: Matt <47545907+SoundMatt@users.noreply.github.com>
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
Fixes the exit-code-swallowing anti-pattern in SoundMatt/RELAY's
INTEROP-04 (#149), against the pattern defined in
docs/INTEROP-ARCHITECTURE.md(THEME-K, SoundMatt/RELAY#125). Same fix already merged for rust-RCP:
rust-RCP#171.
What changed
Replaces
interop_out=$(relay interop ... 2>&1) || true+ a grep ofstdout for
ERROR|FAILwith a plainrelay interop --strict --protocol LIN ./target/release/rust-lininvocation whose real exit code gatesthe step directly. The old form silently tolerated both a genuinely
broken run and any future change to
relay interop's output format,since
|| trueswallowed the real exit code before the grep ever ran.The surrounding job is already correctly named
conformance(not"interop"), so — unlike the rust-RCP fix — no rename was needed here.
Verification
cargo build --release --locked/cargo test --release --locked/cargo fmt --checkclean (pure CI YAML change, no Rust sourcetouched)
none duplicated) — checked deliberately after the rust-RCP fix hit
exactly this bug on its first push
relay v2.0.4build this jobinstalls: a real
rust-linbinary producesRESULT: PASS/ exit 0;mutation-tested against a deliberately broken binary, confirmed
RESULT: FAIL/ exit 1 (the previous|| trueform would haveswallowed this)