-
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): isFromLegacyInstanceProps
migration flag with ClusterInstance.serverlessV2
#26472
Conversation
…stanceProps` migration flag
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.
Exemption Request: This PR does not implement behavioral changes, and the use case related to the fix has been captured in a unit test. |
isFromLegacyInstanceProps
migration flag with ClusterInstance.serverlessV2
isFromLegacyInstanceProps
migration flag with ClusterInstance.serverlessV2
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
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). |
Thanks @dabrowne 🙌🏼 |
…stance.serverlessV2` (aws#26472) **Context** A recent feature release aws#25437 has added support for Aurora Serverless V2 cluster instances. This change also introduced a new approach for defining cluster instances, deprecating `instanceProps` in the process. The new approach uses `ClusterInstance.provisioned()` and `ClusterInstance.serverlessV2()` to define instances and their parameters on a per-instance basis. A migration flag `isFromLegacyInstanceProps` has also been added to the `ClusterInstance.provisioned()` constructor props to allow for migration to this new approach without destructive changes to the generated CFN template. **Bug** Because the `DatabaseCluster` construct has not previously had official support for Serverless V2 instances, the same migration flag has not been made available for `ClusterInstance.serverlessV2()`. This ignores the fact that many people have already provisioned serverless v2 instances using a common workaround described here aws#20197 (comment). People who have used this method previously have no clean migration path. This has been previously raised in aws#25942. **Fix** This fix simply exposes the `isFromLegacyInstanceProps` flag on **both** `ProvisionedClusterInstanceProps` and `ServerlessV2ClusterInstanceProps`. The behaviour for this flag is already implemented and applied across both instance types, so this is a type-only change. I have however added a test to capture this upgrade path for Serverless V2 instances from the common workaround. Closes aws#25942. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Context
A recent feature release #25437 has added support for Aurora Serverless V2 cluster instances. This change also introduced a new approach for defining cluster instances, deprecating
instanceProps
in the process.The new approach uses
ClusterInstance.provisioned()
andClusterInstance.serverlessV2()
to define instances and their parameters on a per-instance basis. A migration flagisFromLegacyInstanceProps
has also been added to theClusterInstance.provisioned()
constructor props to allow for migration to this new approach without destructive changes to the generated CFN template.Bug
Because the
DatabaseCluster
construct has not previously had official support for Serverless V2 instances, the same migration flag has not been made available forClusterInstance.serverlessV2()
. This ignores the fact that many people have already provisioned serverless v2 instances using a common workaround described here #20197 (comment). People who have used this method previously have no clean migration path. This has been previously raised in #25942.Fix
This fix simply exposes the
isFromLegacyInstanceProps
flag on bothProvisionedClusterInstanceProps
andServerlessV2ClusterInstanceProps
. The behaviour for this flag is already implemented and applied across both instance types, so this is a type-only change. I have however added a test to capture this upgrade path for Serverless V2 instances from the common workaround.Closes #25942.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license