cicd: pin CI helper/action checkouts to PR head (#479) - #491
Conversation
The ubuntu-latest helper jobs and every Spyre job's sparse .github/actions
checkout used bare actions/checkout, resolving to the synthetic merge commit
GITHUB_SHA instead of the PR head that build-hf-adapters tests. This made the
generated matrix and composite actions drift from the code under test whenever
a PR was behind main. Resolve all checkouts to a single env.TARGET_REF mirroring
build-hf-adapters' ${PR_HEAD_SHA:-$GITHUB_SHA} plus the Test-With inputs.ref.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Benjamin Sznajder <benjams@il.ibm.com>
arielge
left a comment
There was a problem hiding this comment.
It probably makes more sense to use the GITHUB_SHA for everything - this means changing the behavior of build-hf-adapters, not the ref used in the test matrix
Per review, resolve the PR/merge-commit drift by pointing build-hf-adapters at GITHUB_SHA (what actions/checkout already defaults to) instead of pinning every helper/action checkout to the PR head. Reverts the _test_matrix ref overrides. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: Benjamin Sznajder <benjams@il.ibm.com>
…s into benjams/issue_479
I fixed according to your recommendation |
|
⚙️ Auto-merge enabled — dispatched Automated: enabling auto-merge requests the gate, so the PR is not left waiting on a check nobody asked for. Re-enabling auto-merge on this same commit will not dispatch again. |
❌ spyre-test: failureTriggered by: /spyre-test comment Plan (build waves + dependencies, per arch)amd64 flowchart LR
subgraph Lamd64_0["amd64 L0 · 1 parallel"]
n_amd64_torch_spyre_torch_spyre_dev["torch-spyre/torch-spyre-dev 🔴<br/>image · 72411d836e22"]
end
subgraph Lamd64_1["amd64 L1 · 1 parallel"]
n_amd64_hf_adapters_hf_adapters_dev["hf-adapters/hf-adapters-dev<br/>image · 3bc9e820f99f"]
end
subgraph Lamd64_2["amd64 L2 · 1 parallel"]
n_amd64_spyre_inference_spyre_inference_dev["spyre-inference/spyre-inference-dev<br/>image · 5b917b35d3f4"]
end
n_amd64_torch_spyre_torch_spyre_dev --> n_amd64_hf_adapters_hf_adapters_dev
n_amd64_hf_adapters_hf_adapters_dev --> n_amd64_spyre_inference_spyre_inference_dev
classDef sPending fill:#eceff1,stroke:#90a4ae,color:#37474f
classDef sBuilding fill:#fff8e1,stroke:#f9a825,color:#5d4037,stroke-width:2px
classDef sOk fill:#e8f5e9,stroke:#43a047,color:#1b5e20
classDef sReused fill:#e3f2fd,stroke:#1e88e5,color:#0d47a1
classDef sFailed fill:#ffebee,stroke:#e53935,color:#b71c1c,stroke-width:2px
classDef sDropped fill:#f5f5f5,stroke:#bdbdbd,color:#9e9e9e
class n_amd64_torch_spyre_torch_spyre_dev sOk;
class n_amd64_hf_adapters_hf_adapters_dev sFailed;
class n_amd64_spyre_inference_spyre_inference_dev sDropped;
❌ build failed (1) — do not mergeBuild: built 1 · failed 1 · dropped 1
Tests: passed 0 · blocking 0 · advisory 1 · infra/inconclusive 0 · no signal 0 Failures by kind
Before merging, consider:
|
Summary
build-hf-adapters-based test jobs used the PR head (${PR_HEAD_SHA:-$GITHUB_SHA}), while helper jobs and the Spyre jobs'.github/actionssparse checkouts used bareactions/checkout, which defaults to the synthetic merge commitGITHUB_SHA.main, this drift meantgenerate-matrixcould emit legs for adapters that exist only in the merge commit, which then fail against the PR-head code; likewise a PR modifying a composite action ran the merged version, not the PR's.env.TARGET_REF(=inputs.ref || github.event.pull_request.head.sha || github.sha, mirroringbuild-hf-adapters) and pins everyactions/checkoutref:to it — 6 ubuntu-latest helper jobs plus all 26 Spyre test jobs (13 suites × first-run + retry) sparse.github/actionscheckouts.generate-module-config-matrixto reuse the sharedTARGET_REFinstead of re-deriving it.Test plan
yaml.safe_load)actions/checkoutsteps carryref: env.TARGET_REFin their ownwith:; none leaked intosetup-python/gather-runner-info/save-failed-suite-descriptor/build-hf-adaptersmain, confirmgenerate-matrixand the Spyre jobs report the same checked-out SHA and no phantom model legs appeargithub.sha🤖 Generated with Claude Code