Repository navigation
fix: the generated gate fails when a needed job was skipped - #19
Merged
Merged
Conversation
The All checks passed job failed only on failure or cancelled, so a job that ended skipped counted as passed. Today that takes a failed lint, which already fails the gate, but an if: or a paths filter added to the test jobs later would turn "the tests did not run" into a green required check. Every needed job now has to succeed. A job skipped by design is named in MAY_SKIP, and only those may end skipped. The template's own CI already requires success from every job; the generated one now does too, without breaking a library that skips a job on purpose. Closes #16
This was referenced Oct 17, 2026
Merged
Merged
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.
The problem
The generated
All checks passedjob failed only when a needed job endedfailureorcancelled. A job that endedskippedcounted as passed. This is the one check themasterruleset requires, so if anif:or a paths filter is ever added totest-unitortest-integration, "the tests did not run" shows as green. The template's own CI already requiressuccessfrom every job.The decision
Every needed job has to end
success. The jobs named inMAY_SKIPmay also endskipped, and only those. The list is empty in the template.needsand the list reach the shell throughenv:, andjqreports each job that did not pass, by id and result.I considered copying the template's own
all(.result == "success"). That would turn pg-partsmith's gate red on every push tomaster, because itsdependency-reviewjob runs on pull requests only. With the list, that skip is written down in the file as intended, and any other skip fails.Evidence
The rendered step, run with bash
-eo pipefail(as Actions runs it):Before this change, the second case rendered as
[[ "false" == "true" ]](nofailure, nocancelled) and passed. That is the case in the issue, and pg-partsmith run 38169905669 shows it onmaster.actionlint1.7.12 with shellcheck is clean on the generated workflows. The generated gate on the render:ruff/mypyclean, 1 test passed,uv buildOK.For the existing libraries
The libraries have the old step. pg-partsmith would need
MAY_SKIP: '["dependency-review"]'when it takes this change.Closes #16