Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try harder to delete test S3 logging buckets created during CI #1410

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

yob
Copy link
Contributor

@yob yob commented Dec 11, 2024

We create three CloudFormation Stacks on each build of the elastic stack, confirming instances boot and work as expected. There are specific steps in the build that attempt to delete all resources created for those tests, but from time to time they can fail.

This cleanup step runs at the end of the build and will delete any resources this pipeline might've left behind, regardless of whether they were created in this specific build or not.

I noticed that the AWS Account these test stacks were created in had many old S3 buckets like this:

  • buildkite-aws-stack-test--managedsecretsloggingbuc-XXXXXXXXX

These are the logging buckets created by test stacks to holds access logs for the matching secrets S3 bucket. We attempt to delete them in .buildkite/steps/delete.sh, but some slip through the net.

This should help ensure we pick them up on a future build, and avoid the account growing an unbounded number of these buckets.

We create three CloudFormation Stacks on each build of the elastic
stack, confirming instances boot and work as expected. There are
specific steps in the build that attempt to delete all resources created
for those tests, but from time to time they can fail.

This cleanup step runs at the end of the build and will delete any
resources this pipeline might've left behind, regardless of whether they
were created in this specific build or not.

I noticed that the AWS Account these test stacks were created in had
many old S3 buckets like this:

* buildkite-aws-stack-test--managedsecretsloggingbuc-XXXXXXXXX

These are the logging buckets created by test stacks to holds access
logs for the matching secrets S3 bucket. We attempt to delete them in
`.buildkite/steps/delete.sh`, but some slip through the net.

This should help ensure we pick them up on a future build, and avoid the
account growing an unbounded number of these buckets.
@yob yob requested a review from a team December 11, 2024 00:30
Copy link
Contributor

@DrJosh9000 DrJosh9000 left a comment

Choose a reason for hiding this comment

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

LGTM

@yob yob merged commit 26166a4 into main Dec 11, 2024
1 check passed
@yob yob deleted the try-harder-to-cleanup-logging-buckets branch December 11, 2024 01:02
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