Collapse repeated source-mode ternary in test-smokes-built.yml into one resolve-mode job - #14924
Merged
Merged
Conversation
Collaborator
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
…ne resolve-mode job The build/nightly/release ternary was hand-copied at 17 sites (12 compound job conditions, 1 compound run-name, 4 short release conditions), and had already diverged into two idioms. Add a resolve-mode job that computes the mode once, validates it, and exposes it as a job output; every downstream job gates on needs.resolve-mode.outputs.mode instead of re-evaluating the expression. run-name keeps its own copy since it evaluates before any job exists and has no needs context.
cderv
force-pushed
the
task/test-smokes-built-resolve-mode
branch
from
September 23, 2026 13:24
d563bf4 to
7e00ef0
Compare
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.
test-smokes-built.ymlderived the build/nightly/release source mode independently at 17 sites: 12 compound job conditions, 1 compoundrun-name, and 4 short release-family conditions written in a divergent short form. The two idioms already diverged — they agree today only becauseworkflow_runforcesnightlyandgithub.event.inputs.sourceis null on that trigger — so a future change to mode resolution needs identical edits in 17 places, and the release family wouldn't even be found by grepping for the compound expression.Add a
resolve-modejob that computes the mode once, validates it againstbuild/nightly/release(hard-failing otherwise), and exposes it as a job output. All 16 downstream jobs now gate onneeds.resolve-mode.outputs.modeinstead of re-evaluating the ternary.run-namekeeps its own copy since it evaluates before any job exists and has noneedscontext.resolve-modealso echoes the triggeringworkflow_run's id and conclusion from the event payload, since the API exposes no pointer from aworkflow_runrun back to its trigger — useful for diagnosing a nightly run after the fact.Followers keep their own mode check alongside
needs: [resolve-mode, ...]even though skip propagation already makes it redundant, matching the existing invariant in.claude/rules/testing/built-version-ci.md.Tradeoffs
One extra runner job, serialized ahead of everything — roughly 15-30s per run, including nightlies. A runner outage or image failure in
resolve-modenow skips all 16 jobs instead of failing at expression-evaluation time: loud rather than silent, but a new single point of failure for the whole workflow. Every non-success "Build Installers" completion (theworkflow_runtrigger istypes: [completed], not just success) now also costs one short runner job where before nothing scheduled at all.Verification
actionlint .github/workflows/test-smokes-built.ymlcleansource=buildwith a narrow bucket —resolve-moderesolvedbuild, only the build family scheduled, everything else skipped, run succeeded: https://github.com/quarto-dev/quarto-cli/actions/runs/35726105621source=nightlywith a narrow bucket —resolve-moderesolvednightly,resolve-nightlyplus all three OS legs scheduled, build/release families skipped, run succeeded: https://github.com/quarto-dev/quarto-cli/actions/runs/35726404470workflow_run(post-"Build Installers") path can only be exercised after merge, sinceworkflow_runalways runs the default-branch copy of the workflowNo test file, no
src/changes, no changelog entry — internal CI plumbing with no user-visible behavior change.