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

feat(backups)!: Remove stack-level support for configuring DevX Backups #2289

Merged
merged 1 commit into from
May 1, 2024

Conversation

jacobwinch
Copy link
Contributor

@jacobwinch jacobwinch commented Apr 30, 2024

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 or GuDynamoTable 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

  • I have listed any breaking changes, along with a migration path 1
  • I have updated the documentation as required for the described changes 2

Footnotes

  1. 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.

  2. 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?

Copy link

changeset-bot bot commented Apr 30, 2024

🦋 Changeset detected

Latest commit: 6fa0d16

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@guardian/cdk Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@jacobwinch jacobwinch force-pushed the jw-remove-with-backup branch 3 times, most recently from a8abc87 to 30d857b Compare May 1, 2024 10:03
@jacobwinch jacobwinch marked this pull request as ready for review May 1, 2024 10:03
@jacobwinch jacobwinch requested a review from a team as a code owner May 1, 2024 10:03
Copy link
Contributor

@michaelwmcnamara michaelwmcnamara left a comment

Choose a reason for hiding this comment

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

Great work!

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` or `GuDynamoTable` 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")`.
@jacobwinch jacobwinch force-pushed the jw-remove-with-backup branch from 30d857b to 6fa0d16 Compare May 1, 2024 13:08
@jacobwinch jacobwinch enabled auto-merge (squash) May 1, 2024 13:08
@jacobwinch jacobwinch merged commit fa0719b into main May 1, 2024
2 checks passed
@jacobwinch jacobwinch deleted the jw-remove-with-backup branch May 1, 2024 13:10
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