fix(ci): skip build job when the image matrix is empty - #49
Merged
Conversation
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.
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.
Problem
Scheduled run 31159567125 (
bOS Build Desktop) was marked failure with no failing job, no annotation, and emptygh run view --log-failedoutput.Every enabled Bazzite variant was already current, so
just generate-ci-matrix Bazzite truecorrectly emitted[]. Thebuild-imagejob then expandedmatrix: 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-manifestguards onmanifest_images != '[]'andcheck's "Exit on failure" step short-circuits whenimages == '[]'.build-imagewas 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.yml—if: ${{ needs.get-images.outputs.images != '[]' }}on thebuild-imagejob. This is the fix; it covers desktop and server.build-image.yml/build-desktop.yml/build-server.yml— achanged_onlyboolean input. The changed-only selection path was previously reachable only from thescheduletrigger, so the empty-matrix case couldn't be exercised on demand. Purely additive: scheduled runs still force changed-only regardless, every other trigger defaults tofalse, andpr-checks.ymlneeds no change.build-image.yml—get-imageswrites 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 lintpasses (shellcheck,yamllint -s, Justfile syntax, generated-recipe lint).just generate-ci-matrix Bazzite truelocally 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:Get Bazzite Images for Build[])Build … Images (…)Create Manifest (…)Check Build Bazzite Images SuccessfulRun concluded success.
Affected variants: all Bazzite and uCore variants — the change is to CI job orchestration only, no image content changes.