Commit d920d67
authored
Add post-promotion SHA256 recompute for prod whl/ release packages (#8199)
## Summary
Adds post-promotion SHA256 checksum recompute for prod `whl/` release
packages so wheels published to download.pytorch.org always carry
`x-amz-meta-checksum-sha256` metadata. Only wheels **missing** a
checksum are computed — existing checksums are never recomputed or
clobbered, and only the S3 `pytorch` bucket is written (no R2).
## Changes
### `s3_management/manage_v2.py`
- `--recompute-sha256-pattern` is now **optional** (`nargs="?"`):
- With a value (e.g. `rocm7.1`) → scans only that subfolder under the
prefix (unchanged behavior).
- **Bare, with no value** → scans **all** accelerator subfolders
(`cu*`/`rocm*`/`cpu`/`xpu`) under the prefix in one invocation. Nested
channels (`whl/nightly`, `whl/test`) are excluded because their names
don't match the accelerator patterns.
- New helper `list_accelerator_subdirs()` enumerates those subfolders
via a delimiter listing.
- Combine with `--package-name` / `--package-version` to scope to a
single release.
```bash
# Recompute one release across all prod accelerator subfolders:
python s3_management/manage_v2.py whl --recompute-sha256-pattern \
--package-name torch --package-version 2.12.1
```
### `.github/workflows/release-post-promotion.yml` (new)
- `workflow_dispatch` with inputs `project` (choice, default `torch`)
and `version` (optional override of `PYTORCH_VERSION`).
- Reads `torch`, `torchvision`, `triton`, `triton_rocm`, `triton_xpu`
versions from `release/release_versions.sh` (the triton variants share
`TRITON_VERSION`) and recomputes SHA256 across all prod `whl/`
accelerator subfolders.
- Same OIDC setup as `release-download-pytorch-org.yml`: `id-token:
write`, `environment: promote-env`, role `gha_workflow_promote_wheels`,
region `us-east-1`.
### `.github/workflows/release-download-pytorch-org.yml`
- Added a step that recomputes SHA256 for the promoted package after a
real (non-dryrun) promotion, resolving its version via
`${PACKAGE^^}_VERSION` from `release_versions.sh`.
## Test Plan
- `manage_v2.py` parses cleanly; argparse resolves the three cases
correctly: bare flag → scan-all, explicit value → single subfolder,
omitted → no-op.
- Verified `main` already provides the required version vars in
`release/release_versions.sh`.1 parent 0876801 commit d920d67
3 files changed
Lines changed: 179 additions & 44 deletions
File tree
- .github/workflows
- s3_management
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
| |||
60 | 63 | | |
61 | 64 | | |
62 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
63 | 70 | | |
64 | 71 | | |
65 | 72 | | |
| |||
1686 | 1693 | | |
1687 | 1694 | | |
1688 | 1695 | | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
| 1699 | + | |
| 1700 | + | |
| 1701 | + | |
| 1702 | + | |
| 1703 | + | |
| 1704 | + | |
| 1705 | + | |
| 1706 | + | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
1689 | 1716 | | |
1690 | 1717 | | |
1691 | | - | |
| 1718 | + | |
1692 | 1719 | | |
1693 | 1720 | | |
1694 | 1721 | | |
1695 | 1722 | | |
1696 | 1723 | | |
1697 | 1724 | | |
1698 | | - | |
1699 | | - | |
| 1725 | + | |
| 1726 | + | |
| 1727 | + | |
| 1728 | + | |
1700 | 1729 | | |
1701 | 1730 | | |
1702 | 1731 | | |
1703 | | - | |
1704 | 1732 | | |
1705 | 1733 | | |
1706 | 1734 | | |
| |||
1710 | 1738 | | |
1711 | 1739 | | |
1712 | 1740 | | |
| 1741 | + | |
| 1742 | + | |
| 1743 | + | |
| 1744 | + | |
| 1745 | + | |
| 1746 | + | |
| 1747 | + | |
| 1748 | + | |
| 1749 | + | |
| 1750 | + | |
| 1751 | + | |
| 1752 | + | |
| 1753 | + | |
1713 | 1754 | | |
1714 | 1755 | | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
| 1759 | + | |
| 1760 | + | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
| 1767 | + | |
1715 | 1768 | | |
1716 | | - | |
1717 | | - | |
1718 | | - | |
1719 | | - | |
1720 | | - | |
1721 | | - | |
1722 | | - | |
1723 | | - | |
1724 | | - | |
1725 | | - | |
1726 | | - | |
1727 | | - | |
1728 | | - | |
1729 | | - | |
1730 | | - | |
1731 | | - | |
1732 | | - | |
1733 | | - | |
1734 | | - | |
1735 | | - | |
1736 | | - | |
1737 | | - | |
1738 | | - | |
1739 | | - | |
1740 | | - | |
1741 | | - | |
1742 | | - | |
1743 | | - | |
1744 | | - | |
1745 | | - | |
1746 | | - | |
1747 | | - | |
1748 | | - | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
| 1772 | + | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
| 1778 | + | |
| 1779 | + | |
| 1780 | + | |
| 1781 | + | |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
| 1785 | + | |
| 1786 | + | |
1749 | 1787 | | |
1750 | | - | |
| 1788 | + | |
1751 | 1789 | | |
1752 | 1790 | | |
1753 | 1791 | | |
| |||
1756 | 1794 | | |
1757 | 1795 | | |
1758 | 1796 | | |
1759 | | - | |
| 1797 | + | |
| 1798 | + | |
1760 | 1799 | | |
1761 | 1800 | | |
1762 | 1801 | | |
| |||
1864 | 1903 | | |
1865 | 1904 | | |
1866 | 1905 | | |
| 1906 | + | |
| 1907 | + | |
| 1908 | + | |
1867 | 1909 | | |
1868 | | - | |
1869 | | - | |
| 1910 | + | |
| 1911 | + | |
| 1912 | + | |
| 1913 | + | |
| 1914 | + | |
1870 | 1915 | | |
1871 | 1916 | | |
1872 | 1917 | | |
| |||
1895 | 1940 | | |
1896 | 1941 | | |
1897 | 1942 | | |
1898 | | - | |
| 1943 | + | |
1899 | 1944 | | |
1900 | 1945 | | |
1901 | 1946 | | |
| |||
0 commit comments