feat(rds): isFromLegacyInstanceProps migration flag with ClusterInstance.serverlessV2#26472
feat(rds): isFromLegacyInstanceProps migration flag with ClusterInstance.serverlessV2#26472mergify[bot] merged 3 commits intoaws:mainfrom
isFromLegacyInstanceProps migration flag with ClusterInstance.serverlessV2#26472Conversation
…stanceProps` migration flag
aws-cdk-automation
left a comment
There was a problem hiding this comment.
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.serverlessV2isFromLegacyInstanceProps 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
instancePropsin the process.The new approach uses
ClusterInstance.provisioned()andClusterInstance.serverlessV2()to define instances and their parameters on a per-instance basis. A migration flagisFromLegacyInstancePropshas 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
DatabaseClusterconstruct 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
isFromLegacyInstancePropsflag on bothProvisionedClusterInstancePropsandServerlessV2ClusterInstanceProps. 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