fix(ci): free us-east-1 public-AMI slot before distribute (closes #86)#87
Conversation
The pre-build --ensure-free guard only freed us-east-2, so the us-east-1 publish could hit the 5-public-AMI quota (observed on the v1.0.0-rc.5 build, where the copy was left private until manually published). Add a matching ensure-free guard for us-east-1 immediately before the copy/publish step. No-op in steady state; never deregisters the 2 newest. Signed-off-by: Kaio Fellipe <kaio6fellipe@gmail.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdded a pre-distribution workflow step to ChangesAMI Distribution Guard
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
OpenSSF Scorecard — 8.3/10 ✅
|
Problem (#86)
On the v1.0.0-rc.5 release, the
Distribute source AMI to us-east-1step failed to publish withResourceLimitExceeded(5-public-AMI quota) because us-east-1 still held 5 AMIs from the former 9-region era. The pre-build--ensure-freeguard only frees us-east-2, and the us-east-1 prune runs in the post-buildprunejob — i.e. after the publish. The copy was left private until I published it manually.Fix
Add a
Pre-distribute free-slot guard (us-east-1)step immediately before the copy/publish step, mirroring the us-east-2 guard:./infra/scripts/ami-prune.sh --regions us-east-1 --keep-latest 2 --ensure-free 1 --apply--ensure-free 1only acts at/near the quota ceiling).working-directory), using the same OIDC role; the role already has the required perms in us-east-1 (AmiPruneinline policy,Resource:*).Validation
actionlintclean (no new findings). Step order confirmed: us-east-2 guard → us-east-1 guard → distribute → post-build prune. The underlyingami-prune.sh --ensure-freepath is already covered by the script's unit tests.Closes #86. Related: #83, #84.
🤖 Generated with Claude Code
Summary by CodeRabbit