Skip to content

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

Merged
mergify[bot] merged 2 commits intomasterfrom
njlynch/rds-cluster-attributes
Sep 11, 2020
Merged

fix(rds): Make most DatabaseClusterAttributes properties optional#10291
mergify[bot] merged 2 commits intomasterfrom
njlynch/rds-cluster-attributes

Conversation

@njlynch
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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!

* Identifier for the cluster
*/
readonly port: number;
readonly clusterIdentifier: string;
Copy link
Copy Markdown
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?

* @default - no instance identifiers
*/
readonly instanceIdentifiers: string[];
readonly instanceIdentifiers?: string[];
Copy link
Copy Markdown
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