fix(ci): keep a main push green when the release run publishes nothing - #805
Merged
Conversation
The three post-release fan-out jobs build their matrix from the release job's output, which is [] whenever the orchestrator finds nothing to release. `matrix: include: []` is not an empty matrix that skips the job -- it is an invalid matrix, so the job never instantiates and the run concludes failed with no failed job anywhere in it to explain why. Any push to main whose commits fall outside every package path hits this: all ten real jobs pass and the run is still red. Each consuming job now tests its own matrix output for emptiness before running. The release job's own comment asserted the behaviour this relies on and had it backwards, so it is corrected rather than left to mislead the next reader.
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.
Any push to
mainwhose commits all fall outside every package path finishes red — while every one of its ten real jobs passes and nothing in the run reports a failure.Two recent examples, both with
failed_jobs=0:151e36f92788390e75956c0eCause
The three post-release fan-out jobs build their matrix from the release job's outputs:
Those outputs are
[]when the orchestrator finds nothing to release.matrix: include: []is not an empty matrix that skips the job — it is an invalid matrix. The job never instantiates, so it appears nowhere in the job list, and the run concludesfailurewith no failed job to point at.The release job's own comment asserted the opposite ("leaves the consuming job's matrix empty and the job skipped"), which is presumably why it was never guarded. That comment is corrected here rather than left to mislead the next reader.
Fix
Each consuming job now tests its own matrix output for emptiness in its
if, alongside the existing branch/event conditions.Verifying this
This PR is itself the test case: it only touches
.github/, so merging it produces amainpush that releases nothing — precisely the condition that currently fails. If the post-merge run is green, the fix holds.Pre-existing, not a regression from the recent CI work — it was simply latent until a main push happened to release nothing.