Skip to content

Collapse repeated source-mode ternary in test-smokes-built.yml into one resolve-mode job - #14924

Merged
cderv merged 1 commit into
mainfrom
task/test-smokes-built-resolve-mode
Sep 23, 2026
Merged

cderv merged 1 commit into
mainfrom
task/test-smokes-built-resolve-mode

Conversation

@cderv

@cderv cderv commented Sep 22, 2026

Copy link
Copy Markdown
Member

test-smokes-built.yml derived the build/nightly/release source mode independently at 17 sites: 12 compound job conditions, 1 compound run-name, and 4 short release-family conditions written in a divergent short form. The two idioms already diverged — they agree today only because workflow_run forces nightly and github.event.inputs.source is 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-mode job that computes the mode once, validates it against build/nightly/release (hard-failing otherwise), and exposes it as a job output. All 16 downstream jobs now gate on needs.resolve-mode.outputs.mode instead of re-evaluating the ternary. run-name keeps its own copy since it evaluates before any job exists and has no needs context.

resolve-mode also echoes the triggering workflow_run's id and conclusion from the event payload, since the API exposes no pointer from a workflow_run run 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-mode now 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 (the workflow_run trigger is types: [completed], not just success) now also costs one short runner job where before nothing scheduled at all.

Verification

  • actionlint .github/workflows/test-smokes-built.yml clean
  • Dispatched source=build with a narrow bucket — resolve-mode resolved build, only the build family scheduled, everything else skipped, run succeeded: https://github.com/quarto-dev/quarto-cli/actions/runs/35726105621
  • Dispatched source=nightly with a narrow bucket — resolve-mode resolved nightly, resolve-nightly plus all three OS legs scheduled, build/release families skipped, run succeeded: https://github.com/quarto-dev/quarto-cli/actions/runs/35726404470
  • The workflow_run (post-"Build Installers") path can only be exercised after merge, since workflow_run always runs the default-branch copy of the workflow

No test file, no src/ changes, no changelog entry — internal CI plumbing with no user-visible behavior change.

@posit-snyk-bot

posit-snyk-bot commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 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
cderv force-pushed the task/test-smokes-built-resolve-mode branch from d563bf4 to 7e00ef0 Compare September 23, 2026 13:24
@cderv
cderv merged commit 03f0fdf into main Sep 23, 2026
51 checks passed
@cderv
cderv deleted the task/test-smokes-built-resolve-mode branch September 23, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants