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): add support for update and backup properties to Cluster instances #10324

Merged

Conversation

hixi-hyi
Copy link
Contributor

fixes #9926

Added the following parameters to DatabaseCluster.

  • AutoMinorVersionUpgrade
  • AllowMajorVersionUpgrade
  • DeleteAutomatedBackups

#10092 as a reference, only defined simple parameters.


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

@hixi-hyi
Copy link
Contributor Author

If this policy is acceptable, I can also add these parameters to DatabaseInstance.

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.

Thanks a lot for the contribution @hixi-hyi ! Some small comments, and one question.

packages/@aws-cdk/aws-rds/lib/props.ts Show resolved Hide resolved
packages/@aws-cdk/aws-rds/lib/props.ts Show resolved Hide resolved
packages/@aws-cdk/aws-rds/lib/props.ts Show resolved Hide resolved
/**
* Whether to allow upgrade of major version for the DB instance.
*
* @default - true
Copy link
Contributor

Choose a reason for hiding this comment

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

is this really true by default? The documentation says:

Constraints: Major version upgrades must be allowed when specifying a value for the EngineVersion parameter that is a different major version than the DB instance's current version.

I guess that suggests that the default is, in fact, false...?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Surely the default value for AllowMajorVersionUpgrade may be false.
Reading the documentation, this parameter may not be used routinely and is only needed when changing instance types, but I don't understand exactly what it is. (There was no value for AllowMajorVersionUpgrade in the results of aws rds describe-instances)

The @default value is currently written from the Cloudformation documentation.
However, I haven't programmatically set it, and its behavior is dependent on Cloudformation.

Should such a parameter be written as @default None? Or should I explicitly set true or false in the cdk?

I'd like to hear your opinion.

Copy link
Contributor

Choose a reason for hiding this comment

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

If not setting it and setting it to false provide the same result (as I believe it does in this case), it should be @default false.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I understood. Thank you for your reply.
In fact, AllowMajorUpgrade is default false, and it seems to be necessary to add this parameter when upgrading the major version.

@mergify mergify bot dismissed skinny85’s stale review September 23, 2020 02:08

Pull request has been modified.

@skinny85
Copy link
Contributor

Hey @hixi-hyi ,

looks like some trailing spaces snuck into the file:

@aws-cdk/aws-rds: /codebuild/output/src654474608/src/github.com/aws/aws-cdk/packages/@aws-cdk/aws-rds/lib/props.ts
@aws-cdk/aws-rds:   73:1  error  Trailing spaces not allowed  no-trailing-spaces
@aws-cdk/aws-rds:   80:1  error  Trailing spaces not allowed  no-trailing-spaces

Would you mind updating the PR (and also inclding the change discussed in #10324 (comment) )? Thanks!

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.

Putting in "Request changes" awaiting @hixi-hyi 's new iteration to remove this from my ToDo list.

@mergify mergify bot dismissed skinny85’s stale review September 24, 2020 04:45

Pull request has been modified.

@hixi-hyi
Copy link
Contributor Author

@skinny85
I forgot to run yarn lint on gitpod, which I did.
I'm very sorry, but I'd like to know if there's anything else that needs to be addressed.

@skinny85 skinny85 added the pr-linter/exempt-readme The PR linter will not require README changes label Sep 24, 2020
skinny85
skinny85 previously approved these changes Sep 24, 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.

@skinny85
I forgot to run yarn lint on gitpod, which I did.
I'm very sorry, but I'd like to know if there's anything else that needs to be addressed.

Everything is great @hixi-hyi , thanks so much for your contribution!

@mergify
Copy link
Contributor

mergify bot commented Sep 24, 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).

@skinny85 skinny85 changed the title feat(rds): support several simple parameters for DatabaseCluster feat(rds): support update and backup properties for Cluster instances Sep 24, 2020
@skinny85 skinny85 changed the title feat(rds): support update and backup properties for Cluster instances feat(rds): add support for update and backup properties to Cluster instances Sep 24, 2020
@mergify mergify bot dismissed skinny85’s stale review September 24, 2020 17:39

Pull request has been modified.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 291c222
  • 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 24, 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 4a4c154 into aws:master Sep 24, 2020
@hixi-hyi
Copy link
Contributor Author

Thanks for the merge and the fix testcode :D

@skinny85
Copy link
Contributor

Thanks for the merge and the fix testcode :D

My pleasure, thanks for the contribution!

@hixi-hyi hixi-hyi deleted the hixi-hyi/rds-supports-several-simple-parameter branch September 24, 2020 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-linter/exempt-readme The PR linter will not require README changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[aws-rds] Supports defining variables for a CfnDBInstance in a DatabaseCluster
3 participants