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

fix(rds): Make most DatabaseClusterAttributes properties optional #10291

Merged
merged 2 commits into from
Sep 11, 2020

Conversation

njlynch
Copy link
Contributor

@njlynch njlynch commented Sep 10, 2020

The IDatabaseCluster interface has a lot of properties, putting a large strain
on users who want to import clusters via DatabaseClusterAttributes. This
alters the attributes interface to contain almost exclusively optional props,
and lazily throw if any missing properties are accessed.

I believe this is a backwards-compatible change, but someone please double-check
me on that.

fixes #3587


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

The `IDatabaseCluster` interface has a lot of properties, putting a large strain
on users who want to import clusters via `DatabaseClusterAttributes`. This
alters the attributes interface to contain almost exclusively optional props,
and lazily throw if any missing properties are accessed.

I believe this is a backwards-compatible change, but someone please double-check
me on that.

fixes #3587
@njlynch njlynch requested a review from a team September 10, 2020 17:54
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Sep 10, 2020
@skinny85 skinny85 added the pr/do-not-merge This PR should not be merged at this time. label Sep 11, 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.

Love it!

Leaving it with do-not-merge to let @shivlaks chime in, but I'm totally fine with pushing this as-is.

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

mergify bot commented Sep 11, 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
Copy link
Contributor

mergify bot commented Sep 11, 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 0653e6b into master Sep 11, 2020
@mergify mergify bot deleted the njlynch/rds-cluster-attributes branch September 11, 2020 09:11
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

Copy link
Contributor

@shivlaks shivlaks left a comment

Choose a reason for hiding this comment

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

LGTM as well!

*/
readonly port: number;
readonly clusterIdentifier: string;
Copy link
Contributor

Choose a reason for hiding this comment

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

any reason we wouldn't want to just call it clusterId - don't think we expand it out to identifier in many places do we?

*/
readonly instanceIdentifiers: string[];
readonly instanceIdentifiers?: string[];
Copy link
Contributor

Choose a reason for hiding this comment

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

was this why we went with clusterIdentifier for the property name, or was there another reason?

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.

All properties of DatabaseClusterAttributes should not be required
4 participants