CI: Check versioned release notes exist before releasing#1907
CI: Check versioned release notes exist before releasing#1907cpcloud wants to merge 3 commits intoNVIDIA:mainfrom
Conversation
Add a check-release-notes job to the release workflow that verifies the versioned release-notes file (e.g. 13.1.0-notes.rst) exists and is non-empty for each package being released. The job blocks doc, upload-archive, and publish-testpypi via needs: gates. Helper script at toolshed/check_release_notes.py parses the git tag, maps component to package directories, and checks file presence. Post-release tags (.postN) are silently skipped. Tests cover tag parsing, component mapping, missing/empty detection, and the CLI. Refs NVIDIA#1326 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Ensures the release-notes check validates the tagged tree, not the default branch HEAD. Without this, manually triggered runs could validate the wrong commit. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
There was a problem hiding this comment.
I started my review by asking Cursor to look only at the purely technical aspects. For completeness, I'm pasting the response below (no need to read it yet). The main thing it surfaced is what looks like a pre-existing workflow design issue: in the current release.yml on main, all paired with a single git-tag is not really usable. I'll post a separate comment with a more detailed analysis of that point.
I think it would be most useful to decide first, at a high level, what we want to do about all, before revisiting the lower-level details.
I played around with some possible UI/input shapes in PR #1947 (see screenshots in the PR description). Not sure whether you want to make that kind of change in this PR. A simpler alternative that would seem fine to me would be to remove all for now, in this PR, and remove the corresponding all handling from the new check_release_notes.py script. If we go that route, I think that would leave only the much simpler tag-parsing finding to worry about.
Separate high-level question: is toolshed/ the intended home for this script, or would ci/tools/ be a better fit? I could imagine either, but I expected ci/tools/ first.
Findings
• Medium: toolshed/check_release_notes.py:27 makes component=all mean “all four packages must have release notes for the same tag
version”, and toolshed/tests/test_check_release_notes.py:77 explicitly enshrines that with v13.1.0. That does not match this repo’s
actual versioning split: the issue being fixed is about the shared v13.x line for cuda-bindings/cuda-python, while cuda-core and
cuda-pathfinder release under their own tag families and note files such as cuda_core/docs/source/release/0.7.0-notes.rst and
cuda_pathfinder/docs/source/release/1.5.3-notes.rst. I verified locally that toolshed/check_release_notes.py --git-tag v13.1.0
--component all now fails by demanding nonexistent cuda_core/docs/source/release/13.1.0-notes.rst and
cuda_pathfinder/docs/source/release/13.1.0-notes.rst, so if all is still meant to support repo-level releases, this gate is
incorrect.
• Low: toolshed/check_release_notes.py:31 introduces tag parsing that disagrees with the parser already used later in the same release
flow at ci/tools/validate-release-wheels:25. For example, a historical tag like cuda-core-v0.1.1rc1 is interpreted here as version
0.1.1rc1, while wheel validation interprets the same tag as 0.1.1; .post1 tags are skipped here but still normalized later. That
gives one workflow two different definitions of the release version, which is a maintenance trap and a likely source of false
failures if rc/post tags are ever reused.
|
Generated with Cursor GPT-5.4 Extra High Fast Analysis: Can
|
Summary
check-release-notesjob to the release workflow that verifies the versioned release-notes file (e.g.13.1.0-notes.rst) exists and is non-empty for each package being releaseddoc,upload-archive, andpublish-testpypijobs vianeeds:gates so releases cannot proceed with missing notes.postNtags are silently skipped (no notes file expected)toolshed/check_release_notes.pywith 20 pytest testsTest plan
check-release-notesjob runs in CI on a test release dispatch.postNtags skip without failureCloses #1326
🤖 Generated with Claude Code