Commit 18f7bef
committed
fix(webapp): reconcile ECR default policy on existing repos
Mirrors how the existing-repo branch already reconciles cache settings.
SetRepositoryPolicy is idempotent, so applying it on every deploy is
safe and covers two recovery cases that the previous version didn't:
1. A previous repo creation succeeded but SetRepositoryPolicy failed
mid-flight, leaving the repo without a policy. Without
reconciliation, the existing-repo branch would just return the repo
and runners would keep getting 403 Forbidden forever — manual
intervention required.
2. The operator updates DEPLOY_REGISTRY_ECR_DEFAULT_REPOSITORY_POLICY
to grant pull to additional accounts/principals. Existing repos
need to pick up the new value, not just freshly created ones.
The factored `applyEcrRepositoryPolicy` helper is shared between the
create and reconcile call sites, keeping behavior identical.1 parent 2492a30 commit 18f7bef
1 file changed
Lines changed: 59 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
273 | 276 | | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
281 | 284 | | |
282 | 285 | | |
283 | 286 | | |
284 | 287 | | |
285 | 288 | | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
286 | 313 | | |
287 | 314 | | |
288 | 315 | | |
| |||
441 | 468 | | |
442 | 469 | | |
443 | 470 | | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
444 | 496 | | |
445 | 497 | | |
446 | 498 | | |
| |||
0 commit comments