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): scheduling modifications in the next scheduled maintenance window #33448

Merged
merged 12 commits into from
Feb 21, 2025

Conversation

Tietew
Copy link
Contributor

@Tietew Tietew commented Feb 14, 2025

Issue # (if applicable)

Closes #33447.

Reason for this change

CloudFormation has added applyImmediately feature to RDS instances.
This allows to schedule modifications in the next scheduled maintenance window.
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ModifyInstance.ApplyImmediately.html

Description of changes

Added applyImmediately prop to DatabaseInstanceNewProps and ClusterInstanceOptions.
To schedule modifications, specify applyImmediately: false in instance props.

new rds.DatabaseInstance(this, 'Instance', {
  // ...
  applyImmediately: false,
});

new rds.DatabaseCluster(this, 'Cluster', {
  // ...
  writer: rds.ClusterInstance.serverlessV2('writer', {
    applyImmediately: false,
  }),
});

Note: Currently, applyImmediately is not supported in the cluster configurations.

Describe any new or updated permissions being added

Nothing

Description of how you validated changes

Unit tests 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

@github-actions github-actions bot added feature-request A feature should be added or improved. p2 labels Feb 14, 2025
@aws-cdk-automation aws-cdk-automation requested a review from a team February 14, 2025 07:05
@github-actions github-actions bot added the admired-contributor [Pilot] contributed between 13-24 PRs to the CDK label Feb 14, 2025
@Tietew
Copy link
Contributor Author

Tietew commented Feb 14, 2025

Added integration tests verify the applyImmediately property is deployed successfully.
But I'm unsure how to test modifications are actually scheduled.

Copy link

codecov bot commented Feb 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.17%. Comparing base (f9b28b9) to head (23ebddc).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #33448   +/-   ##
=======================================
  Coverage   82.17%   82.17%           
=======================================
  Files         119      119           
  Lines        6862     6862           
  Branches     1158     1158           
=======================================
  Hits         5639     5639           
  Misses       1120     1120           
  Partials      103      103           
Flag Coverage Δ
suite.unit 82.17% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
packages/aws-cdk ∅ <ø> (∅)
packages/aws-cdk-lib/core 82.17% <ø> (ø)

@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Feb 14, 2025
Copy link
Contributor

@lpizzinidev lpizzinidev left a comment

Choose a reason for hiding this comment

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

Thanks 👍 Only one minor doc adjustment imo

@aws-cdk-automation aws-cdk-automation added pr/needs-maintainer-review This PR needs a review from a Core Team Member and removed pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. labels Feb 19, 2025
GavinZZ
GavinZZ previously approved these changes Feb 19, 2025
Copy link
Contributor

@GavinZZ GavinZZ left a comment

Choose a reason for hiding this comment

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

LGTM, thanks you for the contribution!

@GavinZZ GavinZZ self-assigned this Feb 19, 2025
Copy link
Contributor

mergify bot commented Feb 19, 2025

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-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Feb 19, 2025
Copy link
Contributor

mergify bot commented Feb 19, 2025

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).

Copy link
Contributor

mergify bot commented Feb 19, 2025

This pull request has been removed from the queue for the following reason: pull request branch update failed.

The pull request can't be updated

You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it.

If you want to requeue this pull request, you need to post a comment with the text: @mergifyio requeue

@mergify mergify bot dismissed GavinZZ’s stale review February 20, 2025 01:25

Pull request has been modified.

@Tietew
Copy link
Contributor Author

Tietew commented Feb 20, 2025

@lpizzinidev Good catch. Fixed.

@Tietew
Copy link
Contributor Author

Tietew commented Feb 20, 2025

Build failed due to #33481

Waiting for @aws-cdk/aws-service-spec v0.1.53 or higher. see #33445 for spec changes.

├[~] service aws-rds
│ └ resources
│    ├[~]  resource AWS::RDS::DBInstance
│    │  └ properties
│    │     └[+] ApplyImmediately: boolean

@GavinZZ
Copy link
Contributor

GavinZZ commented Feb 20, 2025

@Tietew yes, unfortunately we reverted the schema change in the previous release. I'm working on the next release which should include this change.

@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Feb 21, 2025
@Tietew
Copy link
Contributor Author

Tietew commented Feb 21, 2025

@GavinZZ
#33531 is shipped in 2.180.0.
Could you please take a look at this PR again?

@Tietew Tietew requested a review from GavinZZ February 21, 2025 10:19
GavinZZ
GavinZZ previously approved these changes Feb 21, 2025
Copy link
Contributor

mergify bot commented Feb 21, 2025

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).

Copy link
Contributor

mergify bot commented Feb 21, 2025

This pull request has been removed from the queue for the following reason: pull request branch update failed.

The pull request can't be updated

You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it.

If you want to requeue this pull request, you need to post a comment with the text: @mergifyio requeue

@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Feb 21, 2025
Copy link
Contributor

mergify bot commented Feb 21, 2025

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).

@GavinZZ
Copy link
Contributor

GavinZZ commented Feb 21, 2025

@Mergifyio requeue

Copy link
Contributor

mergify bot commented Feb 21, 2025

requeue

✅ The queue state of this pull request has been cleaned. It can be re-embarked automatically

Copy link
Contributor

mergify bot commented Feb 21, 2025

This pull request has been removed from the queue for the following reason: pull request branch update failed.

The pull request can't be updated

You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it.

If you want to requeue this pull request, you need to post a comment with the text: @mergifyio requeue

@mergify mergify bot dismissed GavinZZ’s stale review February 21, 2025 21:08

Pull request has been modified.

Copy link
Contributor

mergify bot commented Feb 21, 2025

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-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 23ebddc
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

@mergify mergify bot merged commit be2c7d0 into aws:main Feb 21, 2025
20 checks passed
Copy link
Contributor

mergify bot commented Feb 21, 2025

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).

Copy link

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 21, 2025
@Tietew Tietew deleted the rds-apply-immediately branch February 22, 2025 01:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
admired-contributor [Pilot] contributed between 13-24 PRs to the CDK feature-request A feature should be added or improved. p2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(rds): scheduling modifications in the next scheduled maintenance window
4 participants