Skip to content

ci: add cleanup for leaked capacity reservations#9051

Merged
ryan-mist merged 3 commits intoaws:mainfrom
ryan-mist:clean-reserved-capacity
Apr 3, 2026
Merged

ci: add cleanup for leaked capacity reservations#9051
ryan-mist merged 3 commits intoaws:mainfrom
ryan-mist:clean-reserved-capacity

Conversation

@ryan-mist
Copy link
Copy Markdown
Contributor

Fixes #N/A

Description

  • add cleanup script for leaked capacity reservations from E2E tests

How was this change tested?

  • manual testing

Before

ryanmist@c889f3b6ff52 clean % aws ec2 describe-capacity-reservations --query "length(CapacityReservations)" --region us-east-2 --filters Name=state,Values=active
51

Running Script

ryanmist@c889f3b6ff52 clean % go run main.go --expiration 12h
...
{"level":"info","ts":1775170622.596391,"caller":"clean/main.go:96","msg":"discovered resourceTypes","type":"CapacityReservations","ids":["cr-001d3a9fb4622fc63",...,"cr-0ff9b3a16b5fb1391"],"count":51}
{"level":"info","ts":1775170638.682019,"caller":"clean/main.go:102","msg":"deleted resourceTypes","type":"CapacityReservations","ids":["cr-001d3a9fb4622fc63",...,"cr-0ff9b3a16b5fb1391"],"count":51}
...

After

ryanmist@c889f3b6ff52 clean % aws ec2 describe-capacity-reservations --query "length(CapacityReservations)" --region us-east-2 --filters Name=state,Values=active
0

Does this change impact docs?

  • Yes, PR includes docs updates
  • Yes, issue opened: #
  • No

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ryan-mist ryan-mist requested a review from a team as a code owner April 3, 2026 01:10
@ryan-mist ryan-mist requested a review from jmdeal April 3, 2026 01:10
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

Preview deployment ready!

Preview URL: https://pr-9051.d18coufmbnnaag.amplifyapp.com

Built from commit 378b8e2aab943b7714572f1dbf180bd6db559ea7

Comment thread test/hack/resource/pkg/resourcetypes/capacityreservation.go
Comment thread test/hack/resource/pkg/resourcetypes/capacityreservation.go
joshuakguo
joshuakguo previously approved these changes Apr 3, 2026
Copy link
Copy Markdown
Contributor

@joshuakguo joshuakguo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

Copy link
Copy Markdown
Contributor

@joshuakguo joshuakguo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@ryan-mist ryan-mist merged commit dec349e into aws:main Apr 3, 2026
17 checks passed
@ryan-mist ryan-mist deleted the clean-reserved-capacity branch April 3, 2026 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants