-
Notifications
You must be signed in to change notification settings - Fork 4k
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(neptune): auto minor version upgrade for an instance #31988
Conversation
@@ -138,6 +138,17 @@ new neptune.DatabaseCluster(this, 'Cluster', { | |||
}); | |||
``` | |||
|
|||
You can also specify `autoMinorVersionUpgrade` to a database instance. | |||
Even within the same cluster, you can modify the `autoMinorVersionUpgrade` setting on a per-instance basis. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created an integration test with a mixed autoMinorVersionUpgrade
setting for verification, and it is deploying successfully.
/** | ||
* Indicates that minor version patches are applied automatically. | ||
* | ||
* @default - same as the cluster's autoMinorVersionUpgrade setting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the default in CDK is undefined. Do not refer to the default value in the service.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, does this mean that it is preferable to specify @default undefined
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The DESIGN_GUIDELINES says that it is better to avoid @default undefined
.
don't write @default undefined, describe the behavior that happens if the property is not supplied.
https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md#defaults
Therefore, I think it would be better to describe how the current behavior works. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but IMO, we should not mention the CFN default behaviour, since we will not update this value if CFN decided to change that default value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated my description to @default undefined
and suppressed linter.
awslint.json
{
"exclude": [
"props-physical-name:@aws-cdk/aws-neptune-alpha.ClusterParameterGroupProps",
"props-physical-name:@aws-cdk/aws-neptune-alpha.ParameterGroupProps",
"props-physical-name:@aws-cdk/aws-neptune-alpha.SubnetGroupProps",
"docs-public-apis:@aws-cdk/aws-neptune-alpha.ServerlessScalingConfiguration",
"props-no-undefined-default:@aws-cdk/aws-neptune-alpha.DatabaseInstanceProps.autoMinorVersionUpgrade" // added
]
}
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #31988 +/- ##
==========================================
+ Coverage 78.48% 78.50% +0.01%
==========================================
Files 106 106
Lines 7201 7201
Branches 1321 1321
==========================================
+ Hits 5652 5653 +1
+ Misses 1362 1361 -1
Partials 187 187
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@moelasmar Hi, I've updated my code according to your comments. Could you please confirm? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving on behalf of Mohamed since his concern is addressed.
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Comments on closed issues and PRs are hard for our team to see. |
Issue # (if applicable)
None
Reason for this change
Cloudformation supports for configuring
autoMinorVersionUpgrade
for a database instance but AWS CDK cannot do that.https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-neptune-dbinstance.html#cfn-neptune-dbinstance-autominorversionupgrade
Description of changes
Add
autoMinorVersionUpgrade
toDatabaseInstanceProps
Description of how you validated changes
Added both unit and integ tests.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license