Repository navigation
[doc] Redirect template URLs that 404 since the move to _collections - #66459
Merged
Merged
Conversation
The Ray example and tutorial templates now build from sphinx-collections under /_collections/<target>/. #63971 deleted the in-tree copies, and from Ray 2.56.0 on their old URLs return 404 with no redirect. Add 63 page redirects, one per old URL that was served on 2.55.1, each to the page's /_collections/ path. Page rules without force fire only on 404, so 2.55 and earlier keep serving their own copies. Co-Authored-By: Claude Opus 5.5 (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 documentation redirect paths in doc/redirects/current.yaml to align with the new _collections directory structure. A review comment correctly identified that the redirect for langchain_agent_ray_serve incorrectly retains the content/ segment in the target path, which should be removed to prevent potential 404 errors.
elliot-barn
approved these changes
Sep 24, 2026
nadongjun
pushed a commit
to nadongjun/ray
that referenced
this pull request
Oct 6, 2026
…ay-project#66459) ## Why are these changes needed? The Ray example and tutorial templates are fetched at doc build time through `sphinx-collections` (`doc/source/template_collections.py`) and build under `/_collections/<target>/`. ray-project#63971 deleted the stale in-tree copies, but no redirects were added for the URLs those copies served. Probing docs.ray.io shows where it broke: - `releases-2.55.1` and earlier: the old path, such as `/ray-overview/examples/e2e-rag/README.html`, returns 200. The `/_collections/` path returns 404. - `releases-2.56.0` and later, including `/latest` and `/master`: the old path returns 404. The `/_collections/` path returns 200. So since 2.56.0 became `/latest`, external links and search results pointing at the old template pages have returned 404. Some of the old paths fall under the legacy catch-alls (`/serve/tutorials/*`, `/train/examples/*`, `/tune/examples/*`), which land readers on a generic index instead of the page they wanted. ## What This PR adds 63 `page` redirects to `doc/redirects/current.yaml`, one per removed template URL that was actually served on 2.55.1, each pointing at that page's `/_collections/` path: - 40 move 1:1, so the target is `/_collections/<same path>`. - 23 lived under a `content/` directory the sync no longer produces, so the target drops that segment. A few single-notebook templates now build only a `README`, so those point at the `README`: `unstructured_data_ingestion`, `tune_pytorch_asha`, and `model_composition_recsys`, which was renamed to `model-composition-recsys`. The block sits right after the Ray Data rules and ahead of every wildcard rule, so the specific rules win over the catch-alls. `page` rules without `force` fire only on 404, so 2.55 and earlier keep serving their own in-tree copies. Out of scope, and deliberately skipped: - 9 removed paths that already returned 404 on 2.55.1, because they were excluded from the build. These are the `llamafactory-llm-fine-tune` pages and two `train/tutorials/content/*/README` indexes. - 3 paths whose only 2.55.1 response was a catch-all 301, so they were never pages. ## Related PRs - ray-project#63971 removed the in-tree template copies. - ray-project#66427 fixes the postmerge redirect apply step. Once it merges, this change goes live on the next postmerge run. Until then, a maintainer applies it manually. - Duplicate check: no open PR touches template redirects. The only other open PRs that touch `doc/redirects/` are ray-project#66427 (CI apply gate) and ray-project#66027 (release-gated `master.yaml`), and neither adds these rules. ray-project#66027 also edits `current.yaml`, so whichever merges second might need a trivial rebase. ## Testing - Built the URL list from `git show --name-status 70eade0` (ray-project#63971), keeping deleted pages whose URL isn't produced at HEAD. - Probed every old URL on `releases-2.55.1`, and every candidate target on `/en/master/`. Targets were cross-checked against the `_collections/` docnames in the live `objects.inv`. All 63 targets return 200. - `rtd-redirects validate doc/redirects/current.yaml`: 0 errors. It reports the same 44 pre-existing chain warnings as master and none from the new rules. - `rtd-redirects diff-file --file doc/redirects/current.yaml --base upstream/master --head HEAD --repo .`: 63 add, 0 update, 0 delete. - `rtd-redirects plan --project anyscale-ray --file doc/redirects/current.yaml` against the live project: 63 add, 0 update, 0 delete. The reorders are position shifts from the insertion. - `pre-commit run --files doc/redirects/current.yaml`: passes. - Five `mcp-ray-serve` paths contain spaces, and one also contains parentheses. Read the Docs matches redirects on the Django-decoded request path, so a `%20` request should match the literal space in `from`. I'll confirm that with a live request after apply. ## AI assistance This PR was prepared with AI assistance (Claude Code). I reviewed every added rule and the probe results above. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Douglas Strodtman <[email protected]> Co-authored-by: Claude Opus 5.5 (1M context) <[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 Ray example and tutorial templates are fetched at doc build time through
sphinx-collections(doc/source/template_collections.py) and build under/_collections/<target>/. #63971 deleted the stale in-tree copies, but no redirects were added for the URLs those copies served.Probing docs.ray.io shows where it broke:
releases-2.55.1and earlier: the old path, such as/ray-overview/examples/e2e-rag/README.html, returns 200. The/_collections/path returns 404.releases-2.56.0and later, including/latestand/master: the old path returns 404. The/_collections/path returns 200.So since 2.56.0 became
/latest, external links and search results pointing at the old template pages have returned 404. Some of the old paths fall under the legacy catch-alls (/serve/tutorials/*,/train/examples/*,/tune/examples/*), which land readers on a generic index instead of the page they wanted.What
This PR adds 63
pageredirects todoc/redirects/current.yaml, one per removed template URL that was actually served on 2.55.1, each pointing at that page's/_collections/path:/_collections/<same path>.content/directory the sync no longer produces, so the target drops that segment. A few single-notebook templates now build only aREADME, so those point at theREADME:unstructured_data_ingestion,tune_pytorch_asha, andmodel_composition_recsys, which was renamed tomodel-composition-recsys.The block sits right after the Ray Data rules and ahead of every wildcard rule, so the specific rules win over the catch-alls.
pagerules withoutforcefire only on 404, so 2.55 and earlier keep serving their own in-tree copies.Out of scope, and deliberately skipped:
llamafactory-llm-fine-tunepages and twotrain/tutorials/content/*/READMEindexes.Related PRs
doc/redirects/are [ci][doc] Apply redirects on every run instead of gating on HEAD~1 #66427 (CI apply gate) and [ci][doc] Stage release-gated redirects via doc/redirects/master.yaml #66027 (release-gatedmaster.yaml), and neither adds these rules. [ci][doc] Stage release-gated redirects via doc/redirects/master.yaml #66027 also editscurrent.yaml, so whichever merges second might need a trivial rebase.Testing
git show --name-status 70eade0bd3a([templates] removing outdated templates that are now being synced to ray docs at build time #63971), keeping deleted pages whose URL isn't produced at HEAD.releases-2.55.1, and every candidate target on/en/master/. Targets were cross-checked against the_collections/docnames in the liveobjects.inv. All 63 targets return 200.rtd-redirects validate doc/redirects/current.yaml: 0 errors. It reports the same 44 pre-existing chain warnings as master and none from the new rules.rtd-redirects diff-file --file doc/redirects/current.yaml --base upstream/master --head HEAD --repo .: 63 add, 0 update, 0 delete.rtd-redirects plan --project anyscale-ray --file doc/redirects/current.yamlagainst the live project: 63 add, 0 update, 0 delete. The reorders are position shifts from the insertion.pre-commit run --files doc/redirects/current.yaml: passes.mcp-ray-servepaths contain spaces, and one also contains parentheses. Read the Docs matches redirects on the Django-decoded request path, so a%20request should match the literal space infrom. I'll confirm that with a live request after apply.AI assistance
This PR was prepared with AI assistance (Claude Code). I reviewed every added rule and the probe results above.
🤖 Generated with Claude Code