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(rds): database clusters from snapshots #10130

Merged
merged 3 commits into from
Sep 4, 2020

Conversation

njlynch
Copy link
Contributor

@njlynch njlynch commented Sep 2, 2020

Created the DatabaseClusterFromSnapshot to support creating database clusters
from snapshots.

I made some intentional decisions here to avoid exposing as much of the
underlying "base" classes and interfaces as possible, to support future
refactoring as necessary.

fixes #4379


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

Created the `DatabaseClusterFromSnapshot` to support creating database clusters
from snapshots.

I made some intentional decisions here to avoid exposing as much of the
underlying "base" classes and interfaces as possible, to support future
refactoring as necessary.

fixes #4379
@njlynch njlynch requested a review from a team September 2, 2020 15:59
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Sep 2, 2020
@skinny85 skinny85 added the pr/do-not-merge This PR should not be merged at this time. label Sep 3, 2020
Copy link
Contributor

@skinny85 skinny85 left a comment

Choose a reason for hiding this comment

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

I really like it, and I have only one suggestion.

How about we split this into multiple files? Right now, cluster.ts has 726 lines, which gets a little unwieldy.

How about having all of the base stuff like DatabaseClusterBaseProps, DatabaseClusterBase, DatabaseClusterNew, etc. in one file, and then DatabaseCluster and DatabaseClusterProps in another, and DatabaseClusterFromSnapshot and DatabaseClusterFromSnapshotProps in a third?

Of course, a different parceling is also possible. Whatever makes it easy to keep things module-private as much as possible 🙂. Let me know what you think!

@njlynch
Copy link
Contributor Author

njlynch commented Sep 4, 2020

How about we split this into multiple files? Right now, cluster.ts has 726 lines, which gets a little unwieldy.

Sure, seems like the same suggestion was made here and #10162. This one will be the one most impacted by a merge, so I guess we'll do it here... :)

@njlynch
Copy link
Contributor Author

njlynch commented Sep 4, 2020

So I attempted the refactor, but ran into aws/jsii#1980. Given the refactoring would be a purely invisible, internal change, making the decision to postpone until a fix for the above has been released.

@njlynch njlynch removed the pr/do-not-merge This PR should not be merged at this time. label Sep 4, 2020
@mergify
Copy link
Contributor

mergify bot commented Sep 4, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 641011a
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented Sep 4, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 915eb4b into master Sep 4, 2020
@mergify mergify bot deleted the njlynch/rds-cluster-snapshot branch September 4, 2020 12:23
njlynch added a commit that referenced this pull request Sep 14, 2020
See #10130 (review)
for original motivation.

Moves `DatabaseClusterBaseProps`, `DatabaseClusterBase`, `DatabaseClusterNew`,
and `ImportedDatabaseCluster` from `cluster.ts` to
`private/cluster-internal.ts`.

Note that `DatabaseClusterBase` was previously publicly exported; however, that
change has not yet been release, so as long as this is merged before the next
release this won't be a breaking change.

Originally, I thought this refactoring was blocked by
aws/jsii#1980
but thanks to a clarification, I realized I just needed to mark the private
classes as `@internal`.
njlynch added a commit that referenced this pull request Sep 14, 2020
See #10130 (review)
for original motivation.

Moves `DatabaseClusterBaseProps`, `DatabaseClusterBase`, `DatabaseClusterNew`,
and `ImportedDatabaseCluster` from `cluster.ts` to
`private/cluster-internal.ts`.

Note that `DatabaseClusterBase` was previously publicly exported; however, that
change has not yet been release, so as long as this is merged before the next
release this won't be a breaking change.

Originally, I thought this refactoring was blocked by
aws/jsii#1980
but thanks to a clarification, I realized I just needed to mark the private
classes as `@internal`.
mergify bot pushed a commit that referenced this pull request Dec 18, 2021
Add `DatabaseClusterFromSnapshot` to support creating Aurora clusters from snapshots.

Closes #10936.

The logic is implemented similar to PR #10130 where the same feature was implemented for database clusters.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
TikiTDO pushed a commit to TikiTDO/aws-cdk that referenced this pull request Feb 21, 2022
Add `DatabaseClusterFromSnapshot` to support creating Aurora clusters from snapshots.

Closes aws#10936.

The logic is implemented similar to PR aws#10130 where the same feature was implemented for database clusters.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add DbClusterFromSnapshot construct
3 participants