📖 [Docs]: GitHub Actions standard warns that a skipped dependency skips the job - #151
Merged
Marius Storhaug (MariusStorhaug) merged 2 commits intoAug 9, 2026
Merged
Conversation
Copilot started reviewing on behalf of
Marius Storhaug (MariusStorhaug)
August 2, 2026 17:45
View session
There was a problem hiding this comment.
Pull request overview
This PR updates the GitHub Actions coding standard to document the “skipped dependency” failure mode where a job listed in needs: is skipped (due to an if:), causing downstream jobs to be skipped while the workflow run still reports success.
Changes:
- Adds a new subsection under “Structure work into jobs and steps” explaining skip-propagation through
needs:and why it can remain invisible in checks. - Introduces avoid/correct YAML examples for (1) removing dead
needs:edges and (2) using status functions with explicit dependency-result checks for optional dependencies. - Clarifies that the pinned linting toolchain does not detect this class of reachability issue.
Copilot started reviewing on behalf of
Marius Storhaug (MariusStorhaug)
August 2, 2026 17:53
View session
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Suppressed comments (4)
src/docs/Coding-Standards/GitHub-Actions.md:262
- The opening claim reads as unconditional, but the subsection later explains that using status functions (for example
always()/!cancelled()) can override the default skip propagation. Adding “By default,” keeps the statement accurate and avoids an internal contradiction in the same subsection.
A job whose `needs:` list contains a **skipped** job is skipped too. This is not
about failure: `if:` on a job is implicitly wrapped in `success()`, and
`success()` is false when a dependency was *skipped*, exactly as it is when one
failed. So adding `needs:` to a job that may not run silently makes every
dependent job conditional on it as well.
src/docs/Coding-Standards/GitHub-Actions.md:281
- In the avoid snippet,
publishdeclaresneeds: [build, lint]but the snippet itself doesn’t define abuildjob. That makes the example invalid as written (copy/paste would fail for an unrelated reason), which distracts from the skipped-dependency trap you’re trying to demonstrate.
publish:
needs: [build, lint]
if: github.event_name != 'pull_request' # runs only when NOT a pull request
src/docs/Coding-Standards/GitHub-Actions.md:284
- This comment says the symptom happens “On push”, but the conditions shown are “non-PR events” in general (
github.event_name != 'pull_request'). Broadening the wording makes the example accurate forworkflow_dispatch,schedule, etc. as well.
# On push, lint is skipped, so publish is skipped — and the run still
# reports success. A real occurrence froze a documentation site for two
# weeks while every run was green.
src/docs/Coding-Standards/GitHub-Actions.md:318
- In GitHub Actions expressions, job IDs containing a hyphen can’t be accessed with dot notation in a
needscontext. Use bracket notation so the example works forintegration-testsconsistently.
if: ${{ !cancelled() && needs.build.result == 'success' && needs.integration-tests.result != 'failure' }}
Marius Storhaug (MariusStorhaug)
marked this pull request as ready for review
August 2, 2026 17:59
Marius Storhaug (MariusStorhaug)
enabled auto-merge (squash)
August 2, 2026 17:59
Marius Storhaug (MariusStorhaug)
disabled auto-merge
August 9, 2026 18:48
Marius Storhaug (MariusStorhaug)
added a commit
that referenced
this pull request
Aug 9, 2026
Marius Storhaug (MariusStorhaug)
marked this pull request as draft
August 9, 2026 18:54
Marius Storhaug (MariusStorhaug)
marked this pull request as ready for review
August 9, 2026 18:56
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…he actionlint claim precisely Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Marius Storhaug (MariusStorhaug)
force-pushed
the
document-skipped-needs-trap
branch
from
August 9, 2026 18:57
b149048 to
c1aebe6
Compare
Marius Storhaug (MariusStorhaug)
deleted the
document-skipped-needs-trap
branch
August 9, 2026 19:03
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 GitHub Actions standard now warns about a failure mode that produces no error, no red check, and no linter finding: a job never runs because a dependency was skipped. Authors connecting conditional jobs with
needs:can now identify the risk before it silently stops a workflow.New: Guidance for skipped dependencies
Structure work into jobs and steps now explains that a job whose
needs:list contains a skipped job is skipped too, while the workflow can still report success. It shows when to remove an impossible dependency edge, when an optional dependency needs an explicit status check, and why a barealways()or!cancelled()can permit work after a failed dependency.The guidance also explains why neither
actionlintnorzizmordetects this reachability problem, so authors must readneeds:andif:together.Technical details
src/docs/Coding-Standards/GitHub-Actions.md, beside the existing job-structure guidance.buildmust succeed andintegration-testsmay be skipped but not fail; it also states that theactionlintevidence used a complete workflow matching the example's shape.src/docs/Coding-Standards/GitHub-Actions.mdIssue convergence sweep: reviewed open MSXOrg/docs issues concerning the GitHub Actions standard and job structure. #149 is the only issue fully satisfied by this diff.
Relevant issues (or links)
Related work