Accept post-release wheel versions in release validation#2178
Accept post-release wheel versions in release validation#2178fallintoplace wants to merge 1 commit into
Conversation
d6e645d to
14302e5
Compare
leofang
left a comment
There was a problem hiding this comment.
Two nits before merge: the argv plumbing on main/parse_args is unused without tests and can be reverted, and the ValueError message should mention the new .postN support so it stops contradicting the behavior. Otherwise the rewrite looks good — also closes a latent unanchored-regex bug where v12.6.2.dev1 would silently validate a 12.6.2 wheel.
| def main() -> int: | ||
| args = parse_args() | ||
| expected_version = version_from_tag(args.git_tag) | ||
| def main(argv: list[str] | None = None) -> int: |
There was a problem hiding this comment.
The argv plumbing here and on parse_args was added for the test file that the prior review asked to drop. Without tests it's dead API surface — recommend reverting to keep the diff minimal.
| raise ValueError( | ||
| "Unsupported git tag format " | ||
| f"{tag!r}; expected tags beginning with vX.Y.Z, cuda-core-vX.Y.Z, " | ||
| "or cuda-pathfinder-vX.Y.Z." | ||
| f"{tag!r} for component {component!r}; expected vX.Y.Z, cuda-core-vX.Y.Z, " | ||
| "or cuda-pathfinder-vX.Y.Z with a valid release version." |
There was a problem hiding this comment.
This message still says vX.Y.Z only and doesn't reflect the new .postN support, so the error contradicts the behavior. Suggest vX.Y.Z[.postN] (and the same for the prefixed variants), or drop the format examples and reference the canonical tag rules.
Summary
validate-release-wheels.postNversions from release tags instead of truncating toX.Y.ZWhy
Post-release tags such as
v12.6.2.post1were parsed as12.6.2, so valid wheels likecuda_bindings-12.6.2.post1-...whlfailed release validation before upload or publishing.Testing
uvx ruff check ci/tools/validate-release-wheelsuvx ruff format --check ci/tools/validate-release-wheels./ci/tools/validate-release-wheels v12.6.2.post1 cuda-bindings <tmp-wheel-dir>./ci/tools/validate-release-wheels v12.6.2 cuda-bindings <tmp-wheel-dir>rejects a12.6.2.post1wheel