Add stateful task sweeper to clean up on stack delete #50
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have some safety concerns about the current implementation as being too naive; this has the potential to destroy the stateful tasks if the sweeper construct itself is inadvertently removed. This could happen if CloudFormation decides to perform a replacement rather than an update, for example. This shouldn't happen but I'd like to think about the safety here some more before merging - or at least hide this behind an opt-in flag until we're more confident. It's a relatively rare use case mostly for dev and temporary e2e test environments.
Fixes: #39