Repository navigation
Release workflow fails for backport tags because check-release-notes runs from the tag checkout #2141
Description
Description
When running the CI: Release workflow from main for a backport release tag, the check-release-notes job can fail before it actually checks the release notes.
Example workflow run:
The run was manually dispatched from main with:
git-tag:v12.9.7component:cuda-bindings
The job failed with:
Run python ci/tools/check_release_notes.py \
+ python ci/tools/check_release_notes.py --git-tag v12.9.7 --component cuda-bindings
python: can't open file '/home/runner/work/cuda-python/cuda-python/ci/tools/check_release_notes.py': [Errno 2] No such file or directory
Error: Process completed with exit code 2.
Root cause
The check-release-notes job checks out the release tag:
- name: Checkout Source
uses: actions/checkout@...
with:
ref: ${{ inputs.git-tag }}For v12.9.7, that means the job checks out the 12.9.x backport branch commit:
v12.9.7 -> a4e89b567d7fa367414b2a1fb1e2bcb706124967
That commit does not contain ci/tools/check_release_notes.py. The checker was added later on main in:
As a result, the release workflow definition from main tries to run a helper script that exists on main, but the job workspace has already been replaced with the older backport tag checkout.
Why this is different from #2062
This is related to, but different from:
Issue #2062 was about the Self-test release-notes checker step failing because pytest ci/tools/tests imported the repo-level conftest.py, which required cuda.pathfinder. That issue was worked around by commenting out the self-test step in:
The current failure happens after that step is skipped/commented out. It fails in the actual Check versioned release notes exist step because the checker script is not present in the checked-out release tag.
Expected behavior
The release workflow should be able to validate release notes for older/backport tags, even when the helper script was introduced after the release branch diverged.
In this scenario, it should either:
- run the checker from the workflow branch/ref, while checking release-note files in the release-tag checkout; or
- avoid running the checker for tags whose checked-out source tree does not contain the checker; or
- otherwise make the
check-release-notesjob robust for backport releases.
Suggested fix
Use separate checkouts for the workflow tooling and the release source tree. For example:
- Checkout the workflow ref/current branch normally so
ci/tools/check_release_notes.pyis available. - Checkout
${{ inputs.git-tag }}into a subdirectory such asrelease-src. - Run the checker from the workflow checkout, but pass the release checkout as
--repo-root:
python ci/tools/check_release_notes.py \
--repo-root release-src \
--git-tag "${{ inputs.git-tag }}" \
--component "${{ inputs.component }}"This keeps the validation logic on main, while validating the release-note files that actually belong to the release tag.
Additional context
The current v12.9.7 release attempt needs this path because v12.9.7 is a backport release from 12.9.x, while the release workflow being dispatched from main includes newer release-checking infrastructure.
Activity
rwgk commentedon May 27, 2026
Issue 2141 Planned Fix
Scope
This plan is based on the current
mainand12.9.xbranches.The goal is to fix
release.ymlso backport releases such asv12.9.7can bereleased cleanly, while mainline releases force an explicit decision about the
corresponding backport release notes.
Current Situation
On
main,.github/workflows/release.ymlhas acheck-release-notesjob that:inputs.git-tag;python ci/tools/check_release_notes.py;empty under the checked-out tree.
On
12.9.x,ci/tools/check_release_notes.pydoes not exist. When the mainworkflow is dispatched for
git-tag: v12.9.7, the checkout moves the workspaceto the
v12.9.7tag, and the checker script is missing. That is the directcause of the
FileNotFoundError/can't open filefailure.There is a second, separate policy issue: even if the script were available, the
current checker would look for
12.9.7-notes.rstin thev12.9.7source tree.That is not the right source of truth. The 12.9.x release notes are maintained
on
main, and the currentmainbranch already contains:cuda_bindings/docs/source/release/12.9.7-notes.rstcuda_python/docs/source/release/12.9.7-notes.rstDocs Publishing Analysis
Release docs are published by
.github/workflows/build-docs.yml, called fromrelease.ymlaftercheck-release-notessucceeds. For release builds, it:inputs.git-tag;build/html/latest;docs/ongh-pageswithclean: false.The public URL depends on the selected component:
component: cuda-pythonpublishes top-level docs, e.g.https://nvidia.github.io/cuda-python/12.9.7/.component: cuda-bindingspublishes component docs, e.g.https://nvidia.github.io/cuda-python/cuda-bindings/12.9.7/.The version selector is driven by
nv-versions.json, which is committed in thedocs source and copied into the built site. The published
nv-versions.jsonalready advertises
12.9.7, but thegh-pagesbranch currently has12.9.6and
13.3.0directories, not12.9.7. That explains the selector-to-404behavior: metadata for
12.9.7is present, but the versioned docs directory hasnot been generated and deployed yet.
latestand13.3.0docs already contain12.9.7-notes.html. The missingpiece is a successful
release.ymldocs job forv12.9.7and the relevantcomponent.
Proposed Workflow Design
Add a new
workflow_dispatchinput to.github/workflows/release.yml:GitHub Actions cannot make this conditionally required based on the selected
component, so the repository checker should enforce the policy.
For
cuda-bindingsandcuda-pythonmainline releases:backport-git-tagmust be provided.not planned.for example
v12.9.7.exist on
main, not on the release tag.For
cuda-bindingsandcuda-pythonbackport releases:step summary reminder if notes are missing from the workflow checkout;
For
cuda-coreandcuda-pathfinder:is desired;
backport-git-tag.Implementation Plan
Update
ci/tools/check_release_notes.py.Add support for:
--backport-git-tag;ci/versions.ymlor an explicit workflow argument;v<version>tag namespace;Update
.github/workflows/release.yml.Change
check-release-notesso it checks out the workflow branch source, notinputs.git-tag, before running the checker. The release tag checkout isstill needed by the docs and upload workflows, but not by the release-note
policy check.
Pass the new input through to the checker:
Add tests in
ci/tools/tests/test_check_release_notes.py.Cover:
cuda-bindingsrelease fails without a backport decision;not plannedis accepted;cuda-core/cuda-pathfindervalidation remains unchanged;Validate locally.
Run the focused checker tests, then inspect the workflow diff. A useful
minimal validation command is:
If the pixi environment lacks pytest, use the existing local test environment
that has already been used for this repository.
Expected Release Operations After The Fix
For a mainline release such as
v13.3.0:component: cuda-bindingsorcomponent: cuda-python;git-tag: v13.3.0;backport-git-tag: v12.9.7if the backport is planned, orbackport-git-tag: not plannedif it is not.For the actual backport release such as
v12.9.7:release.ymlfrommainor from the fix branch containing the updatedworkflow;
git-tag: v12.9.7;component: cuda-bindingsto generate/cuda-bindings/12.9.7/;component: cuda-pythonto generate/12.9.7/.After those docs jobs complete, the existing version selector entries for
12.9.7should stop pointing at 404s.leofang commentedon May 29, 2026
It seems that
check-release-noteswas added recently (between 12.9.6 and 12.9.7), in #1907:Usually, to work around issues hit at the release time, we create a
release/<version>branch and apply patches there. Once the release is out, we forward-port the patches to themainbranch.Another potential gotcha (not hit here) is it is better to trigger the release workflow from the
mainbranch, instead of the backport branch, but it's not the issue here.leofang commentedon May 29, 2026
A similar issue happened in the past: #1120.