fix(autoscaling): StepScalingPolicy intervals not checked for going over allowable maximum#26490
Conversation
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.
|
Clarification Request: this PR should not require an integration test because it does not change the API nor add any features. It moves an error that would have been thrown at deploy time to one that is thrown at synth time. Correct? |
kaizencc
left a comment
There was a problem hiding this comment.
Looks pretty solid, one minor comment
| } | ||
|
|
||
| if (props.scalingSteps.length > 40) { | ||
| throw new Error('You must have less than 40 steps in StepScalingPolicyProps.scalingSteps'); |
There was a problem hiding this comment.
should mention how many steps were requested
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
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). |
…ver allowable maximum (aws#26490) `StepScalingPolicy` did not have a validation that the number of intervals in `scalingSteps` was in the allowable range. The [Autoscaling documentation](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-quotas.html) states 20 is the maximum step changes in a policy, and since autoscaling creates 2 policies (an [UpperPolicy](https://github.com/aws/aws-cdk/blob/bc029fe5ac69a8b7fd2dfdbcd8834e9a2cf8e000/packages/aws-cdk-lib/aws-autoscaling/lib/step-scaling-policy.ts#L136-L166) and a [LowerPolicy](https://github.com/aws/aws-cdk/blob/bc029fe5ac69a8b7fd2dfdbcd8834e9a2cf8e000/packages/aws-cdk-lib/aws-autoscaling/lib/step-scaling-policy.ts#L105-L134)), our cap is 40. There is an identical change in Application Autoscaling. Closes aws#26215. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
StepScalingPolicydid not have a validation that the number of intervals inscalingStepswas in the allowable range. The Autoscaling documentation states 20 is the maximum step changes in a policy, and since autoscaling creates 2 policies (an UpperPolicy and a LowerPolicy), our cap is 40.There is an identical change in Application Autoscaling.
Closes #26215.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license