Generalize promotion script and add multi-arch keep-list filter#5109
Open
HereThereBeDragons wants to merge 1 commit intomainfrom
Open
Generalize promotion script and add multi-arch keep-list filter#5109HereThereBeDragons wants to merge 1 commit intomainfrom
HereThereBeDragons wants to merge 1 commit intomainfrom
Conversation
…lter
Renames `promote_from_rc_to_final.py` -> `promote_packages.py` to reflect
its broader scope. The script now handles three orthogonal axes:
--src-version-type {rc, a} (default: rc)
--dest-version {release, rc<N>, a<YYYYMMDD>} (default: release)
--keep-gfx-archs positive arch list, e.g. gfx1201,gfx1010
Common transitions covered: rc -> release (existing default), a -> release,
a -> rc<N>. `--skip-version-promotion` (mutex with the version flags;
requires --keep-gfx-archs) runs only the arch-trim pass on already-
versioned wheels.
Multi-arch keep-list pass — for aggregator wheels (rocm, torch,
torchvision, ...) and per-gfx wheels:
- Per-gfx wheels for non-kept archs are skipped (and deleted with
--delete-old-on-success).
- METADATA / PKG-INFO loses `Provides-Extra: device-gfx<N>` and matching
`Requires-Dist: ...-gfx<N>` lines for non-kept archs.
- requires.txt loses `[device-gfx<N>]` sections and `[device-all]` body
deps for non-kept archs.
- _dist_info.py loses `AVAILABLE_TARGET_FAMILIES.append('gfx<N>')` for
non-kept archs.
- When the package's *default* arch is dropped, three sites are
repointed at keep[0] (so the [device] extra still resolves):
`DEFAULT_TARGET_FAMILY` in _dist_info.py, the bare `extra == "device"`
line in METADATA, and the `[device]` body in requires.txt.
- Single-arch packages are auto-detected and pass through unchanged.
- Empty intersection of keep list and found archs raises ValueError.
Other changes:
- New `tests/promote_keep_list_test.py`: unit tests for the keep-list
helpers, version-string transitions, and argparse mutex/validation.
- `tests/promote_from_rc_to_final_test.py` -> `promote_packages_test.py`.
- third_party/change_wheel_version: skip dir / dist-info / data renames
when old_slug == new_slug, so --skip-version-promotion can repack a
wheel without touching its version. Same-version guard tightened to
use the resolved `new_version`.
- upload_release_packages.py docstring updated to point at the new
script name.
- how_to_do_release.md: new subsections for nightly (`a`) promotion
(a -> release, a -> rc) and the multi-arch `--keep-gfx-archs` /
`--skip-version-promotion` workflows.
Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
Contributor
Author
|
for whatever reason git does not recognize the renaming of |
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.
Renames
promote_from_rc_to_final.py->promote_packages.pyto reflect its broader scope. The script now handles three orthogonal axes:Common transitions covered: rc -> release (existing default), a -> release, a -> rc.
--skip-version-promotion(mutex with the version flags; requires --keep-gfx-archs) runs only the arch-trim pass on already- versioned wheels.Multi-arch keep-list pass — for aggregator wheels (rocm, torch, torchvision, ...) and per-gfx wheels:
Provides-Extra: device-gfx<N>and matchingRequires-Dist: ...-gfx<N>lines for non-kept archs.[device-gfx<N>]sections and[device-all]body deps for non-kept archs.AVAILABLE_TARGET_FAMILIES.append('gfx<N>')for non-kept archs.DEFAULT_TARGET_FAMILYin _dist_info.py, the bareextra == "device"line in METADATA, and the[device]body in requires.txt.Other changes:
tests/promote_keep_list_test.py: unit tests for the keep-list helpers, version-string transitions, and argparse mutex/validation.tests/promote_from_rc_to_final_test.py->promote_packages_test.py.new_version.a) promotion (a -> release, a -> rc) and the multi-arch--keep-gfx-archs/--skip-version-promotionworkflows.