Repository navigation
[docs] Skip the RtD PR build for code-only PRs - #64547
Merged
elliot-barn merged 1 commit intoJul 6, 2026
Merged
Conversation
Narrow the post_checkout skip-guard so a code-only PR (one that touches python/ray/ or rllib/ but no doc/ sources) skips the Read the Docs PR preview instead of running a full Sphinx build. The guard now keys only on doc/ (excluding doc/.claude/) and .readthedocs.yaml. Rationale: - The RtD PR check is not a required merge gate, so a red or timed-out RtD build on a code PR is noise and queue pressure on the shared RtD slots, not a blocker. - The large majority of PR-triggered RtD builds are for PRs that touch no doc source, so their authors never use the preview. - Docstring-driven API-reference changes are still rendered post-merge: RtD builds /en/master/ on every master push and Buildkite runs doc_build. This moves that residual coverage from a non-gating premerge preview to the post-merge build. Mixed PRs that touch both doc/ and code still build, since the guard still matches doc/. Follow-up to ray-project#64480 (the doc/.claude/ exclusion). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Signed-off-by: Douglas Strodtman <[email protected]>
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the .readthedocs.yaml configuration to exclude Python code directories (python/ray/ and rllib/) from triggering Read the Docs (RTD) PR preview builds. This change ensures that code-only pull requests skip the RTD build, reducing pressure on shared RTD slots while still relying on post-merge master builds and Buildkite doc builds to render API-reference changes. There are no review comments, so I have no feedback to provide.
elliot-barn
approved these changes
Jul 6, 2026
elliot-barn
enabled auto-merge (squash)
July 6, 2026 17:53
elliot-barn
pushed a commit
that referenced
this pull request
Jul 9, 2026
## Why are these changes needed? The `post_checkout` skip-guard in `.readthedocs.yaml` currently triggers a full RtD Sphinx build on any PR that changes `doc/`, `python/ray/`, or `rllib/`. Because `python/ray/` and `rllib/` are in that pathspec (autodoc renders their docstrings into the API reference), a **code-only PR that touches no doc source still runs a full RtD build**. That preview is low value: - The `docs/readthedocs.com:anyscale-ray` PR check is **not a required merge gate** (PRs merge with it pending/red), so a failing build on a code PR is noise and queue pressure on the shared RtD slots, not a blocker. - The large majority of PR-triggered RtD builds are for PRs that touch no doc source at all, so their authors never open the preview link. This PR narrows the guard to doc-source paths (`doc/` minus `doc/.claude/`, plus `.readthedocs.yaml`), so code-only PRs skip the preview. Docstring-driven API-reference changes are still rendered post-merge: RtD builds `/en/master/` on every master push and Buildkite runs `doc_build`. Mixed PRs that touch both `doc/` and code still build, since the guard still matches `doc/`. Follow-up to #64480 (the `doc/.claude/` exclusion), same guard, same RtD-preprocessor constraints (single-line expression, `:!` exclude shorthand, no shell comments in the block). > **Draft:** holding until post-merge doc-build monitoring is in place, so a docstring change that breaks the API reference on master is caught promptly once code PRs stop rendering it premerge. ## Related issue number N/A ## Checks - [ ] I've signed off every commit (`git commit -s`). - [x] I've made sure the tests are passing. (Config-only change; no test surface.) Signed-off-by: Douglas Strodtman <[email protected]> Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]> Signed-off-by: elliot-barn <[email protected]>
400Ping
pushed a commit
to 400Ping/ray
that referenced
this pull request
Aug 18, 2026
## Why are these changes needed? The `post_checkout` skip-guard in `.readthedocs.yaml` currently triggers a full RtD Sphinx build on any PR that changes `doc/`, `python/ray/`, or `rllib/`. Because `python/ray/` and `rllib/` are in that pathspec (autodoc renders their docstrings into the API reference), a **code-only PR that touches no doc source still runs a full RtD build**. That preview is low value: - The `docs/readthedocs.com:anyscale-ray` PR check is **not a required merge gate** (PRs merge with it pending/red), so a failing build on a code PR is noise and queue pressure on the shared RtD slots, not a blocker. - The large majority of PR-triggered RtD builds are for PRs that touch no doc source at all, so their authors never open the preview link. This PR narrows the guard to doc-source paths (`doc/` minus `doc/.claude/`, plus `.readthedocs.yaml`), so code-only PRs skip the preview. Docstring-driven API-reference changes are still rendered post-merge: RtD builds `/en/master/` on every master push and Buildkite runs `doc_build`. Mixed PRs that touch both `doc/` and code still build, since the guard still matches `doc/`. Follow-up to ray-project#64480 (the `doc/.claude/` exclusion), same guard, same RtD-preprocessor constraints (single-line expression, `:!` exclude shorthand, no shell comments in the block). > **Draft:** holding until post-merge doc-build monitoring is in place, so a docstring change that breaks the API reference on master is caught promptly once code PRs stop rendering it premerge. ## Related issue number N/A ## Checks - [ ] I've signed off every commit (`git commit -s`). - [x] I've made sure the tests are passing. (Config-only change; no test surface.) Signed-off-by: Douglas Strodtman <[email protected]> Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]> Signed-off-by: 400Ping <[email protected]>
dstrodtman
added a commit
that referenced
this pull request
Oct 14, 2026
…ild commit line (#66805) ## Description The Read the Docs PR preview skips any PR that changes nothing under `doc/` or `.readthedocs.yaml`. #64547 deliberately left `python/ray/` out of that check, to keep code-only PRs off the shared build slots. The trade-off is that a PR that edits only docstrings changes the rendered API reference, yet gets no preview and no render check before merge. This PR adds an opt-in. If any commit message on the PR has a line that starts with `@rtd-build`, the `post_checkout` guard builds the docs. It follows the existing `@microcheck` commit-line convention. PRs without the line behave exactly as they do today, and the change can only add builds, never skip one that would have run. Ray squash-merges with the PR title and body, so the line never reaches `master`. `doc/source/ray-contribute/ci.md` documents the opt-in next to the existing explanation of when the preview skips. This PR's own commit carries `@rtd-build`, so its RtD build log should open with "A commit message in this PR requests a build with @rtd-build". That confirms the new path on the real RtD runner. ## Related issues None. I searched open PRs for `readthedocs skip`, `rtd build`, `readthedocs.yaml post_checkout`, and `RTD preview python/ray`, and found no overlapping work. ## Additional information **Testing.** I extracted the `post_checkout` script from the YAML with `yaml.safe_load`, exactly as RtD reads it, and ran it under `dash`, the `/bin/sh` on RtD's builders. The test repo was a shallow clone with `origin/master` pinned to the PR's base: | Case | Expected | Result | |---|---|---| | Change under `python/ray/` only, no line | skip (183) | 183 | | Change under `python/ray/` only, `@rtd-build` line | build (0) | 0 | | `@rtd-build` mentioned mid-sentence only | skip (183) | 183 | | Line in an earlier commit, later commit without it | build (0) | 0 | | Change under `doc/` | build (0) | 0 | | Branch (non-PR) build | build (0) | 0 | RtD's runner strips surrounding single quotes from arguments, so I also ran the two `@rtd-build` cases with the quotes removed. Both gave the same result. The new lines avoid the constructs the existing comment warns the runner drops: no backslash escapes, no `printf`, and no shell comments inside the block. Pre-commit passed on both files. **AI assistance.** This change was drafted with Claude Code. I reviewed every line and ran the tests above. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Douglas Strodtman <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
Why are these changes needed?
The
post_checkoutskip-guard in.readthedocs.yamlcurrently triggers a full RtD Sphinx build on any PR that changesdoc/,python/ray/, orrllib/. Becausepython/ray/andrllib/are in that pathspec (autodoc renders their docstrings into the API reference), a code-only PR that touches no doc source still runs a full RtD build.That preview is low value:
docs/readthedocs.com:anyscale-rayPR check is not a required merge gate (PRs merge with it pending/red), so a failing build on a code PR is noise and queue pressure on the shared RtD slots, not a blocker.This PR narrows the guard to doc-source paths (
doc/minusdoc/.claude/, plus.readthedocs.yaml), so code-only PRs skip the preview. Docstring-driven API-reference changes are still rendered post-merge: RtD builds/en/master/on every master push and Buildkite runsdoc_build. Mixed PRs that touch bothdoc/and code still build, since the guard still matchesdoc/.Follow-up to #64480 (the
doc/.claude/exclusion), same guard, same RtD-preprocessor constraints (single-line expression,:!exclude shorthand, no shell comments in the block).Related issue number
N/A
Checks
git commit -s).