-
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
chore(rds): clusterScailabilityType is a misspelling and should be clusterScalabilityType #32820
Conversation
36e4a01
to
167bf22
Compare
@@ -492,6 +502,25 @@ export enum InstanceUpdateBehaviour { | |||
/** | |||
* The scalability mode of the Aurora DB cluster. | |||
*/ | |||
export enum ClusterScalabilityType { |
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.
Would have done the following:
export import ClusterScailabilityType = ClusterScalabilityType
which would allow updates to ClusterScalabilityType
to also be taken on by the misspelled enum. But that fails the public API regression checker (and the build). So both will need to be updated if any changes are made to the enum.
// WHEN | ||
new DatabaseCluster(stack, 'Cluster', { | ||
engine: DatabaseClusterEngine.AURORA_MYSQL, | ||
vpc, | ||
clusterScalabilityType: ClusterScalabilityType.STANDARD, | ||
writer: ClusterInstance.serverlessV2('writer'), | ||
}); | ||
|
||
// THEN | ||
const template = Template.fromStack(stack); | ||
template.hasResourceProperties('AWS::RDS::DBCluster', { | ||
ClusterScalabilityType: 'standard', | ||
}); | ||
}); | ||
|
||
test('cluster scalability option with deprecated misspelling', () => { | ||
// GIVEN | ||
const stack = testStack(); | ||
const vpc = new ec2.Vpc(stack, 'VPC'); | ||
|
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.
Duplicated tests where the misspelled ClusterScailabilityType was used, and used the correct one. I've left the original tests in place, as the misspelling can still be used.
167bf22
to
1a1cd5e
Compare
Comments on closed issues and PRs are hard for our team to see. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
See #32825
Reason for this change
Misspelling of the
ClusterScalabilityType
type, enum, and prop.Description of changes
Deprecated misspellings of ClusterScailabilityType/clusterScailabilityType and aliased the misspelling for backwards compatibility. The misspelled name will be removed in the next MV release.
Describe any new or updated permissions being added
No permissions changes.
Description of how you validated changes
Added unit tests for the new spelling (ClusterScalabilityType/clusterScalabilityType), and kept unit tests that tested the misspelling.
Ran the relevant integration test.
# in packages/@aws-cdk-testing/framework-integ yarn integ test/aws-rds/test/integ.cluster-limitless.js
Ran Rosetta to verify README changes.
No complications from README changes in these commits.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license