feat(backups)!: Remove stack-level support for configuring DevX Backups #2289
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.
What does this change?
BREAKING CHANGE: DevX Backups can no longer be enabled via the
withBackup
prop, which has been removed.Users should now opt-in/out of DevX Backups at the construct level (i.e. when defining an RDS instance, cluster or DynamoDB table).
We recommend using the
GuDatabaseInstance
orGuDynamoTable
to help with this. If these constructs cannot be used, resources can also be tagged like this:Tags.of(myDatabase).add("devx-backup-enabled", "true")
.Originally we thought that opting-in/out of DevX Backups at the stack-level would be convenient (#2098).
However, the process for opting-in/out of RDS instance backups is more complex than expected (it relies on several properties being configured correctly, not just the tagging), so we have decided to manage this feature at the construct-level rather than the stack-level. Although the stack-level setting works quite well for DynamoDB, we think that it's confusing to manage this feature at two different levels, so have decided to favour consistency and use construct-level opt-in/out for all resource types.
I think managing backups at the construct level also slightly helps in the (admittedly rare) case where different tables or instances in the same stack have different backup requirements.
How to test
N/A - PR only contains deletions.
How can we measure success?
We will have a standardised way to opt-in/out of DevX Backups (at the construct level) and there is less code to maintain.
Have we considered potential risks?
There is a risk that users who already rely on the
withBackup
prop will not add the tag correctly (via other approaches described in the release notes) when upgrading GuCDK.This is mitigated by:
a) Snapshot tests (which will show the tag being removed)
b) DevX Backup Monitoring (which will notify users if backups stop)
Checklist
Footnotes
Consider whether this is something that will mean changes to projects that have already been migrated, or to the CDK CLI tool. If changes are required, consider adding a checklist here and/or linking to related PRs. ↩
If you are adding a new construct or pattern, has new documentation been added? If you are amending defaults or changing behaviour, are the existing docs still valid? ↩