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

chore(rds): clusterScailabilityType is a misspelling and should be clusterScalabilityType #32820

Closed
wants to merge 1 commit into from

Conversation

iankhou
Copy link
Contributor

@iankhou iankhou commented Jan 9, 2025

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.

# in packages/aws-cdk-lib
yarn test aws-rds
Screenshot 2025-01-09 at 16 10 04

Ran the relevant integration test.

# in packages/@aws-cdk-testing/framework-integ
yarn integ test/aws-rds/test/integ.cluster-limitless.js
Screenshot 2025-01-09 at 17 03 44

Ran Rosetta to verify README changes.

./scripts/run-rosetta.sh

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

@github-actions github-actions bot added bug This issue is a bug. effort/small Small work item – less than a day of effort p2 labels Jan 9, 2025
@aws-cdk-automation aws-cdk-automation requested a review from a team January 9, 2025 21:23
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Jan 9, 2025
@iankhou iankhou self-assigned this Jan 9, 2025
@iankhou iankhou force-pushed the iankhou-rdl-misspelling branch from 36e4a01 to 167bf22 Compare January 9, 2025 23:05
@@ -492,6 +502,25 @@ export enum InstanceUpdateBehaviour {
/**
* The scalability mode of the Aurora DB cluster.
*/
export enum ClusterScalabilityType {
Copy link
Contributor Author

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.

Comment on lines +174 to +193
// 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');

Copy link
Contributor Author

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.

@iankhou iankhou changed the title chore(rds): scalability is spelled wrong chore(rds): clusterScailabilityType is a misspelling and should be clusterScalabilityType Jan 9, 2025
@iankhou iankhou force-pushed the iankhou-rdl-misspelling branch from 167bf22 to 1a1cd5e Compare January 9, 2025 23:20
@iankhou iankhou closed this Jan 9, 2025
@iankhou iankhou deleted the iankhou-rdl-misspelling branch January 9, 2025 23:24
Copy link

github-actions bot commented Jan 9, 2025

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 Jan 9, 2025
@iankhou iankhou removed their assignment Jan 9, 2025
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue is a bug. contribution/core This is a PR that came from AWS. effort/small Small work item – less than a day of effort p2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants