Skip to content

Conversation

rix0rrr
Copy link
Contributor

@rix0rrr rix0rrr commented Sep 25, 2025

I have observed a lot of occasions where tests are being disturbed because resources are being deleted out from under them; either buckets or roles are being deletd while they are still being deployed.

  • List all resources in CloudFormation, and avoid hard-deleting any resource that is still managed by a CloudFormation stack.
  • In this PR, extend the notion of "staleness" (older than X hours) to stacks and apps, so we don't delete stacks and apps that might potentially still have tests running on them.
  • Increase the staleness period a little, because I've seen cleanup be too eager.
  • Put some time-traceability into the cleanup session's name, so we can start debugging a little easier than with just a random number.

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

I have observed a lot of occasions where tests are being disturbed because
resources are being deleted out from under them; either buckets or roles are
being deletd while they are still being deployed.

- List all resources in CloudFormation, and avoid hard-deleting any resource
  that is still managed by a CloudFormation stack.
- In this PR, extend the notion of "staleness" (older than X hours) to
  stacks and apps, so we don't delete stacks and apps that might potentially
  still have tests running on them.
- Increase the staleness period a little, because I've seen cleanup be too
  eager.
- Put some time-traceability into the cleanup session's name, so we can
  start debugging a little easier than with just a random number.
@rix0rrr rix0rrr requested a review from a team as a code owner September 25, 2025 15:05
@rix0rrr rix0rrr merged commit 28b8013 into main Sep 26, 2025
7 of 8 checks passed
@rix0rrr rix0rrr deleted the huijbers/safer-cleanup branch September 26, 2025 11:33
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