[CI] Split baseline failure capture so it survives ninja exit#189
Merged
Conversation
The baseline lit step combined `ninja check-amd-llvm-spirv | tee` and the `grep | sort > spirv-fails-baseline.txt` capture into a single shell script. Under bash -e + `set -o pipefail`, the non-zero ninja exit (any lit failure makes ninja return 1) aborted the script before the grep ran. With no baseline txt produced, the comment script fell through to the "baseline comparison unavailable" branch — see PR #187 where this was first observed. Split the capture into its own step, mirroring the working PR-head pattern. The lit step still exits non-zero on lit failures (it has continue-on-error: true), but the capture step runs independently via `if: always()` and writes the baseline file regardless.
lamb-j
added a commit
to ROCm/llvm-project
that referenced
this pull request
May 8, 2026
Fixup to the previous commit. The baseline lit step combined ninja and the grep capture into one shell script. Under bash -e + set -o pipefail, the non-zero ninja exit (lit failures) aborted the script before the grep ran, so build/spirv-fails-baseline.txt was never written and the comment script fell through to "baseline comparison unavailable". Split the capture into its own step, mirroring the working PR-head pattern. Same fix applied in companion translator PR ROCm/SPIRV-LLVM-Translator#189 (observed on ROCm/SPIRV-LLVM-Translator#187 after #188 landed).
Contributor
🔴 New failures (0) — likely caused by this PR(none) 🟢 Fixed by this PR (0) — failing on baseline, passing here(none)
|
The amd-staging-psdb ruleset requires context "SPIRV CI - amd-staging / Build & Test". When a workflow has multiple on: triggers (pull_request + workflow_dispatch), GitHub disambiguates the emitted check context with a trailing event suffix — actual context becomes "SPIRV CI - amd-staging / Build & Test (pull_request)", which the rule never matches. Result: required check stays "Pending — Required" forever, blocks non-admin merges. Drop workflow_dispatch (we never used it in practice — pull_request's synchronize/reopened types already cover any retrigger we'd want via the PR UI).
lamb-j
added a commit
to ROCm/llvm-project
that referenced
this pull request
May 8, 2026
When a workflow has multiple on: triggers (pull_request + workflow_dispatch), GitHub disambiguates the emitted check context with a trailing event suffix — actual context becomes "SPIRV CI - amd-staging / Build & Test (pull_request)" instead of the bare "SPIRV CI - amd-staging / Build & Test" the required-check rule expects. Required check stays "Pending — Required" forever and blocks non-admin merges on amd-staging. Drop workflow_dispatch — never used in practice, pull_request's synchronize/reopened types already cover the retriggers we'd want. Same fix in companion translator PR ROCm/SPIRV-LLVM-Translator#189.
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
Follow-up fix to #188. The baseline
check-amd-llvm-spirvstep combined the lit invocation and thegrep > spirv-fails-baseline.txtcapture into a single shell script. Underbash -e+set -o pipefail(the GHA default), the non-zeroninjaexit caused by lit failures aborts the script before the grep runs — so the baseline txt file is never produced and the github-script step falls through to the "baseline comparison unavailable" fallback.Observed on PR #187's most recent run: baseline lit ran, produced 21 FAILs in the log, but the comment came back as "baseline comparison unavailable" instead of the expected "21 pre-existing on baseline" diff.
Fix: split the capture into its own step, matching the existing PR-head pattern (which works for the same reason — the grep is already separate there). The lit step itself still exits non-zero (
continue-on-error: truekeeps the run going), and the new capture step runs independently viaif: always().After this lands, re-running PR #187's workflow should produce the partition comment with all 21 failures in the⚠️ pre-existing bucket.