Commit 3c603af
authored
Fix release runner group reconcile: per-ref discovery + _select-release-runner callers (#8387)
Follow-up after the pytorch/pytorch stack that refactored runner
selection into `_select-release-runner.yml` (pytorch/pytorch#190619).
Fixes two bugs in the reconcile automation (#8332) that only hit the
apply path, so PR CI (dry-run) stayed green. Found and verified via an
end-to-end apply test against the prod runner groups.
1. **select-runner callers dropped from the allow-list** — discovery
only matched inline `rel-` labels. After the refactor,
`docker-release.yml`, `build-manywheel-images.yml`, and
`build-almalinux-images.yml` get their runner from
`_select-release-runner.yml` outputs and were excluded. Discovery now
propagates the release-label signal up the `uses:` graph (a workflow is
an entry if it references a `rel-` label *or* invokes a local reusable
that does), keeping the module's "discovered, not hardcoded" design.
2. **Allow-list was a main-only cross-product** — desired = (workflows
discovered on `main`) × (all target refs). But release branches diverge:
a workflow on `main` may be absent on an older release branch, and a
workflow may use release runners on a release branch but not on `main`
(e.g. `docker-builds.yml` on `release/2.13`). GitHub rejects the whole
PATCH if any `selected_workflows` entry doesn't exist at its ref.
Discovery is now **per-ref**, so the allow-list only references
workflows that actually exist and run on release runners at each ref.
Also surfaces the GitHub API response body on HTTP errors — a swallowed
400 body is what obscured bug #2 during debugging.
## Testing
- Unit tests pass (`python3 -m unittest
tools.tests.test_release_manage_runner_groups`).
- **End-to-end apply** reconciled all 5 prod release runner groups to
the correct 19-entry state (`main`: 9, `nightly`: 9, `release/2.13`: 1,
`release/2.12`: 0) and is idempotent on re-run.1 parent cc1468d commit 3c603af
2 files changed
Lines changed: 147 additions & 36 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
85 | 92 | | |
86 | 93 | | |
87 | 94 | | |
| |||
154 | 161 | | |
155 | 162 | | |
156 | 163 | | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
157 | 182 | | |
158 | 183 | | |
159 | 184 | | |
| |||
181 | 206 | | |
182 | 207 | | |
183 | 208 | | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
188 | 216 | | |
189 | 217 | | |
190 | 218 | | |
| |||
194 | 222 | | |
195 | 223 | | |
196 | 224 | | |
197 | | - | |
| 225 | + | |
198 | 226 | | |
199 | 227 | | |
200 | 228 | | |
| |||
222 | 250 | | |
223 | 251 | | |
224 | 252 | | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
229 | 261 | | |
230 | | - | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
231 | 268 | | |
232 | 269 | | |
233 | 270 | | |
| |||
242 | 279 | | |
243 | 280 | | |
244 | 281 | | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
| 282 | + | |
| 283 | + | |
249 | 284 | | |
250 | 285 | | |
251 | 286 | | |
252 | | - | |
253 | | - | |
254 | | - | |
| 287 | + | |
255 | 288 | | |
256 | 289 | | |
257 | 290 | | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
266 | 295 | | |
267 | | - | |
268 | | - | |
269 | | - | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
270 | 319 | | |
271 | 320 | | |
272 | 321 | | |
| |||
376 | 425 | | |
377 | 426 | | |
378 | 427 | | |
379 | | - | |
380 | | - | |
| 428 | + | |
| 429 | + | |
381 | 430 | | |
382 | 431 | | |
383 | 432 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 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 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
156 | 211 | | |
157 | 212 | | |
158 | 213 | | |
| |||
173 | 228 | | |
174 | 229 | | |
175 | 230 | | |
176 | | - | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
177 | 235 | | |
178 | | - | |
179 | | - | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
180 | 243 | | |
181 | 244 | | |
182 | 245 | | |
183 | 246 | | |
184 | 247 | | |
185 | | - | |
186 | 248 | | |
187 | | - | |
| 249 | + | |
188 | 250 | | |
189 | 251 | | |
190 | 252 | | |
| |||
0 commit comments