Skip to content

fix(ci): skip build job when the image matrix is empty - #49

Merged
bsherman merged 1 commit into
mainfrom
fix/empty-build-matrix-fails-run
Aug 7, 2026
Merged

fix(ci): skip build job when the image matrix is empty#49
bsherman merged 1 commit into
mainfrom
fix/empty-build-matrix-fails-run

Conversation

@bsherman

@bsherman bsherman commented Aug 7, 2026

Copy link
Copy Markdown
Owner

Problem

Scheduled run 31159567125 (bOS Build Desktop) was marked failure with no failing job, no annotation, and empty gh run view --log-failed output.

Every enabled Bazzite variant was already current, so just generate-ci-matrix Bazzite true correctly emitted []. The build-image job then expanded matrix: combo: ${{ fromJson(needs.get-images.outputs.images) }} from an empty array, which GitHub treats as a hard run-level error (Matrix vector 'combo' does not contain any values) rather than a no-op — the job is never created, so nothing reports as failed and no job condition can catch it.

The rest of the pipeline already treated "nothing to rebuild" as a green no-op: create-manifest guards on manifest_images != '[]' and check's "Exit on failure" step short-circuits when images == '[]'. build-image was the only place missing the guard.

This was the first run in the workflow's history to hit an empty matrix. Because the bug is in the shared reusable workflow, bOS Build Server had the same latent failure — it just has 10 enabled variants and hadn't yet had a night where all were unchanged.

Changes

  • build-image.ymlif: ${{ needs.get-images.outputs.images != '[]' }} on the build-image job. This is the fix; it covers desktop and server.
  • build-image.yml / build-desktop.yml / build-server.yml — a changed_only boolean input. The changed-only selection path was previously reachable only from the schedule trigger, so the empty-matrix case couldn't be exercised on demand. Purely additive: scheduled runs still force changed-only regardless, every other trigger defaults to false, and pr-checks.yml needs no change.
  • build-image.ymlget-images writes the selection to $GITHUB_STEP_SUMMARY, so a no-op nightly explains itself on the run page instead of only in the job log.
  • docs/design/build-scheduling.md — operational notes on the guard and the new input. No new ADR; this implements the existing intent of ADR-0003.

Validation

  • just lint passes (shellcheck, yamllint -s, Justfile syntax, generated-recipe lint).

  • just generate-ci-matrix Bazzite true locally still emits [], confirming the failing condition was still live — so the dispatch below reproduced it exactly rather than accidentally testing a non-empty matrix.

  • Dispatched run 31190034809 on this branch with changed_only=true, the same input state that failed as 31159567125:

    Job Result
    Get Bazzite Images for Build success (emitted [])
    Build … Images (…) skipped (was: run-level error)
    Create Manifest (…) skipped
    Check Build Bazzite Images Successful success

    Run concluded success.

Affected variants: all Bazzite and uCore variants — the change is to CI job orchestration only, no image content changes.

A scheduled run where every variant is already current emits an empty
matrix, which GitHub treats as a hard run-level error ("Matrix vector
'combo' does not contain any values") rather than a no-op: no job is
created, nothing reports as failed, and the run is marked failure. The
rest of the pipeline already treated an empty matrix as success --
create-manifest and check both guard on it -- so build-image was the
only place missing the check.

Also add a changed_only dispatch input so the changed-only selection
path, previously reachable only from the schedule trigger, can be
exercised on demand, and report the selection to the run summary so a
no-op run explains itself.
@bsherman
bsherman merged commit 3c07050 into main Aug 7, 2026
30 checks passed
@bsherman
bsherman deleted the fix/empty-build-matrix-fails-run branch August 7, 2026 15:29
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.

1 participant