-
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(rds): support SecondsUntilAutoPause
for serverless instance
#32787
base: main
Are you sure you want to change the base?
Conversation
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 pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
A comment requesting an exemption should contain the text Exemption Request
. Additionally, if clarification is needed add Clarification Request
to a comment.
SecondsUntilAutoPause
for serverless instanceSecondsUntilAutoPause
for serverless instance
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #32787 +/- ##
=======================================
Coverage 81.00% 81.00%
=======================================
Files 238 238
Lines 14269 14269
Branches 2492 2492
=======================================
Hits 11558 11558
Misses 2425 2425
Partials 286 286
Flags with carried forward coverage won't be shown. Click here to find out more.
|
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state. |
1 similar comment
This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state. |
b771e5e
to
442aafa
Compare
9e6bca7
to
1293628
Compare
…adjust related logic in cluster implementation and tests
…proved clarity and type consistency
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.
Thank you for your contribution.
The current changes contain breaking changes that need to be fixed.
Please refer to the comments for details.
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
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.
Thanks for your contribution! Small comments
/** | ||
* The number of seconds until a serverless cluster is paused. | ||
*/ | ||
protected readonly secondsUntilAutoPause?: number; |
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.
nit: is this supposed to be Duration
* @default undefined - RDS default setting is 300 seconds (five minutes). | ||
* @see https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless-v2-auto-pause.html | ||
*/ | ||
readonly secondsUntilAutoPause?: Duration; |
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.
Looks like the ServerlessCluster has this property named as autoPause
here. Since we can't change the name of that prop I'd prefer to keep the prop name consistent since they do the same thing. Maybe the same description as well?
@@ -783,6 +798,8 @@ abstract class DatabaseClusterNew extends DatabaseClusterBase { | |||
|
|||
this.serverlessV2MaxCapacity = props.serverlessV2MaxCapacity ?? 2; | |||
this.serverlessV2MinCapacity = props.serverlessV2MinCapacity ?? 0.5; | |||
this.secondsUntilAutoPause = props.secondsUntilAutoPause?.toSeconds(); |
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.
If props.secondsUntilAutoPause
is undefined
will this.secondsUntilAutoPause
be set to undefined
or 0? I ask because in the ServerlessCluster version of this prop they check if its 0 and then set it to undefined here. I suspect this might be why the integ tests in the build are failing as well
Issue # (if applicable)
Closes #32280
Reason for this change
To introduce a support of Serveless Instances to be auto paused after certain interval.
Description of changes
Use to set
SecondsUntilAutoPause
to something other than the default of 5 minutes.Describe any new or updated permissions being added
No new IAM permissions.
Description of how you validated changes
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license