Skip to content

CI: Don't leave required checks pending on documentation-only PRs - #9194

Merged
Esteban82 merged 4 commits into
masterfrom
ci-skip-docs-only-checks
Sep 11, 2026
Merged

CI: Don't leave required checks pending on documentation-only PRs#9194
Esteban82 merged 4 commits into
masterfrom
ci-skip-docs-only-checks

Conversation

@Esteban82

@Esteban82 Esteban82 commented Sep 10, 2026

Copy link
Copy Markdown
Member

Documentation-only PRs leave the required checks (Linux, macOS, Windows, Linux (without optional dependencies), Code Validator) stuck at "Expected — Waiting for status to be reported", which blocks the merge: with paths: on the trigger the workflow never runs, so no status is ever reported for those names. The filtering now happens in a small changes job and the real job is skipped via if: instead, which does report a status and satisfies branch protection.

Assisted-by: Claude Sonnet 5 (implementation) and Claude Opus 5 (review)

The required checks (Linux, macOS, Windows, Linux (without optional
dependencies), Code Validator) are filtered with paths: on the workflow
trigger, so a PR touching only documentation never starts those workflows
and GitHub never receives a status for those check names.  Branch
protection then keeps them at "Expected - Waiting for status to be
reported" and the PR cannot be merged.

Move the path filtering out of the trigger into a small changes job and
gate the real job with if: instead.  A job skipped by a conditional does
report a status and satisfies branch protection, whereas a workflow that
never runs does not.

The changes job checks out the repository because paths-filter only uses
the API for pull_request events; for push it needs git.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
@Esteban82 Esteban82 added the maintenance Boring but important stuff for the core devs label Sep 10, 2026
@Esteban82
Esteban82 marked this pull request as ready for review September 10, 2026 17:44
@seisman

seisman commented Sep 11, 2026

Copy link
Copy Markdown
Member

Make similar changes in docker.yml and docs.yml?

@Esteban82

Copy link
Copy Markdown
Member Author

Make similar changes in docker.yml and docs.yml?

Ok, I will do it tomorrow.

Esteban82 and others added 3 commits September 11, 2026 09:33
…s.yml

Same reasoning as the previous commit, extended to the two remaining
path-filtered workflows per seisman's review comment on #9194.

docs.yml has no pull_request trigger, so the docs job's condition covers
push (gated by the filter), release and workflow_dispatch (always run).

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
docker.yml is the only one of these workflows with its own permissions
block, and declaring one sets every unlisted scope to none.  paths-filter
needs pull-requests: read to list the files of a pull request, so without
it the changes job would have failed on every PR and taken the docker job
down with it.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
docs.yml has no pull_request trigger, so it never posts a status on a PR
and can't be the cause of the pending-required-checks problem this PR
fixes - the change bought nothing there. Worse, it added a new failure
mode on the release event: if the changes job errors out, the docs job
is skipped rather than failed, silently dropping the doc build, the
gh-pages deploy and the release package. Keeping docker.yml, which does
run on pull_request and was the one seisman asked about.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
@Esteban82

Copy link
Copy Markdown
Member Author

Added the same pattern to docker.yml, plus pull-requests: read — it has its own permissions: block, which otherwise defaults every unlisted scope to none and would have made paths-filter fail on every PR.

Left docs.yml out: it has no pull_request trigger, so it never posts a status on a PR and isn't part of the pending-checks problem this PR fixes. Gating it the same way would only add risk on the release event — if the changes job errored, the docs job would be skipped rather than failed, silently dropping the doc build, the gh-pages deploy, and the release package.

@seisman do you still want the same change in docs.yml despite that, or is it fine to leave it as is?

@Esteban82
Esteban82 merged commit 69ee553 into master Sep 11, 2026
13 of 17 checks passed
@Esteban82
Esteban82 deleted the ci-skip-docs-only-checks branch September 11, 2026 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Boring but important stuff for the core devs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants