Commit 6c93bdf
authored
Add prod (whl) S3 dependency updates gated behind promote-env (#8260)
## What
`update-s3-dependencies.yml` currently updates the S3 HTML dependency
listings for **nightly** and **test** only. This adds an opt-in path to
also
update **prod** (`whl`), gated behind the protected `promote-env`
(mirroring
`release-download-pytorch-org.yml`).
## Changes
- **Workflow**: new `include-prod` input (choice, default `disabled`)
and a
new `update-prod` job that:
- runs `environment: promote-env` (so prod updates require the
environment's
approval/protection rules),
- assumes `arn:aws:iam::749337293305:role/gha_workflow_promote_wheels`
and
uses the prod R2 secrets (`R2_ACCOUNT_ID` / `R2_ACCESS_KEY_ID` /
`R2_SECRET_ACCESS_KEY`), matching `release-download-pytorch-org.yml`,
- only runs in `update-packages` mode when `include-prod == enabled`.
- **`s3_management/update_dependencies.py`**: new `--stable-only` flag
so the
prod job updates only the `whl` prefix rather than redundantly rewriting
`whl/nightly` and `whl/test` under the protected environment. Default
behavior (nightly + test, and `--include-stable`) is unchanged.
## Behavior
- Default dispatch: unchanged — the existing `update` job updates
nightly + test under `pytorchbot-env`.
- With `include-prod=enabled`: the `update-prod` job additionally
updates the
prod `whl` index for the selected package, subject to `promote-env`
approval.
- Honors the existing `dryrun` input.
## Not a duplicate
No existing open PR adds prod dependency updates / promote-env gating to
`update-s3-dependencies.yml`.
## Test plan
- `python -c "import ast; ast.parse(...)"` on `update_dependencies.py`
(OK).
- YAML parses; jobs are `update` + `update-prod`;
`update-prod.environment ==
promote-env`; `include-prod` input present.
- Recommend a `dryrun=enabled`, `include-prod=enabled` dispatch to
confirm the
prod job only touches the `whl` prefix.
AI assistance (Claude) was used for this change.
---------
Signed-off-by: Andrey Talman <atalman@users.noreply.github.com>
Co-authored-by: Andrey Talman <atalman@users.noreply.github.com>1 parent f75bb0d commit 6c93bdf
2 files changed
Lines changed: 70 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
38 | 46 | | |
39 | 47 | | |
40 | 48 | | |
41 | 49 | | |
42 | 50 | | |
43 | 51 | | |
| 52 | + | |
| 53 | + | |
44 | 54 | | |
| 55 | + | |
45 | 56 | | |
46 | 57 | | |
47 | 58 | | |
| |||
139 | 150 | | |
140 | 151 | | |
141 | 152 | | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1329 | 1329 | | |
1330 | 1330 | | |
1331 | 1331 | | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
1332 | 1337 | | |
1333 | 1338 | | |
1334 | 1339 | | |
| |||
1407 | 1412 | | |
1408 | 1413 | | |
1409 | 1414 | | |
1410 | | - | |
1411 | | - | |
1412 | | - | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
1413 | 1422 | | |
1414 | 1423 | | |
1415 | 1424 | | |
| |||
0 commit comments