Skip to content

ci(docs): keep release deploys from overwriting the shared version switcher - #2962

Merged
Andy-Jost merged 1 commit into
NVIDIA:mainfrom
Andy-Jost:ajost/docs-switcher-release-deploy
Sep 30, 2026
Merged

Andy-Jost merged 1 commit into
NVIDIA:mainfrom
Andy-Jost:ajost/docs-switcher-release-deploy

Conversation

@Andy-Jost

Copy link
Copy Markdown
Contributor

Summary

The "Choose Version" dropdown on every cuda.core docs page is driven by one file at the docs root, cuda-core/nv-versions.json, which each page fetches by absolute URL (conf.py, switcher.json_url). Every docs deploy copies its own checkout's copy over that root file, and the deploy action runs with clean: false.

Deploys from main keep the file current. A release built from a release branch overwrote it with that branch's older list, which hides every version released from main after the branch point until the next main deploy restores it. We hit this with cuda-core-v1.2.1 (#2935, #2944, #2946).

This change deletes nv-versions.json and the legacy versions.json from the release build output, next to the existing removal of latest/. Release deploys then leave the root copy alone and main alone owns the dropdown. Two lines, one per build step.

Process consequence

The new version's entry in cuda_core/docs/nv-versions.json is added on main as part of release prep, never on a release branch. That is what already happens for releases tagged on main, where the prep PR merges before the tag.

Not changed

The root objects.inv is also copied from the version being built and is still overwritten by release deploys. That seems desirable, since intersphinx consumers then resolve against the newest release, so it is left as is.

🤖 Generated with Claude Code

…itcher

The "Choose Version" dropdown on every cuda.core docs page is driven by
one file at the docs root, cuda-core/nv-versions.json, which each page
fetches by absolute URL. Every docs deploy copies its own checkout's copy
over that root file. Deploys from main keep it current; a release built
from a release branch overwrote it with that branch's older list, which
hid every version released from main after the branch point until the
next main deploy restored it (seen with cuda-core-v1.2.1, NVIDIA#2935/NVIDIA#2944).

Delete the switcher files from the release build output next to the
existing removal of latest/. The deploy action runs with clean: false, so
the root copy on gh-pages is left untouched and main alone owns it. The
new version's entry is added on main as part of release prep.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@Andy-Jost Andy-Jost added this to the cuda.core 1.3.0 milestone Sep 29, 2026
@Andy-Jost Andy-Jost added bug Something isn't working P0 High priority - Must do! labels Sep 29, 2026
@Andy-Jost Andy-Jost self-assigned this Sep 29, 2026
@github-actions github-actions Bot added the CI/CD CI/CD infrastructure label Sep 29, 2026
@Andy-Jost
Andy-Jost requested a review from leofang September 29, 2026 15:56
@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor
Doc Preview CI
Preview removed because the pull request was closed or merged.

@Andy-Jost Andy-Jost added P1 Medium priority - Should do and removed P0 High priority - Must do! labels Sep 29, 2026

@mdboom mdboom left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense.

@Andy-Jost
Andy-Jost merged commit 5b26bcd into NVIDIA:main Sep 30, 2026
122 of 126 checks passed
@Andy-Jost
Andy-Jost deleted the ajost/docs-switcher-release-deploy branch September 30, 2026 14:09
github-actions Bot pushed a commit that referenced this pull request Oct 1, 2026
Removed preview folders for the following PRs:
- PR #2939
- PR #2953
- PR #2962
- PR #2966
- PR #2968
- PR #2969
- PR #2972
- PR #2974
- PR #2976
- PR #2977
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working CI/CD CI/CD infrastructure P1 Medium priority - Should do

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants