feat(ecs-patterns): support disabling CPU-based scaling and custom target utilization#28315
feat(ecs-patterns): support disabling CPU-based scaling and custom target utilization#28315mergify[bot] merged 26 commits intoaws:mainfrom AnuragMohapatra:fix/issue-20706-fixforcpubasedautoscaleracecondition
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.
|
|
lpizzinidev
left a comment
There was a problem hiding this comment.
Thanks for the contribution! 👍
I left a couple of comments for improvements.
Notes:
- This PR should be a
feat:feat(ecs-patterns): support disabling CPU-based scaling and custom target utilization - You should add an integration test for the new feature (you can use this as a blueprint, see guidelines on how to create/update one)
packages/aws-cdk-lib/aws-ecs-patterns/lib/base/queue-processing-service-base.ts
Outdated
Show resolved
Hide resolved
packages/aws-cdk-lib/aws-ecs-patterns/lib/base/queue-processing-service-base.ts
Outdated
Show resolved
Hide resolved
packages/aws-cdk-lib/aws-ecs-patterns/lib/base/queue-processing-service-base.ts
Outdated
Show resolved
Hide resolved
packages/aws-cdk-lib/aws-ecs-patterns/test/fargate/queue-processing-fargate-service.test.ts
Outdated
Show resolved
Hide resolved
…pscalingstrategyracecondition Fix/issue 20706 allowtostopscalingstrategyracecondition
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
|
@lpizzinidev All review comments have been addressed. I have found the integration tests are broken at the moment and an issue has been raised - #28383 I fixed it temporarily to get the current integ running but it does not look promising for some test cases. |
…https://github.com/AnuragMohapatra/aws-cdk into fix/issue-20706-fixforcpubasedautoscaleracecondition
…https://github.com/AnuragMohapatra/aws-cdk into fix/issue-20706-fixforcpubasedautoscaleracecondition
lpizzinidev
left a comment
There was a problem hiding this comment.
Thanks for the changes 👍
I left other notes for some cleanup.
Please note the comment I left before:
This PR should be a feat: feat(ecs-patterns): support disabling CPU-based scaling and custom target utilization
packages/aws-cdk-lib/aws-ecs-patterns/lib/base/queue-processing-service-base.ts
Outdated
Show resolved
Hide resolved
packages/aws-cdk-lib/aws-ecs-patterns/lib/base/queue-processing-service-base.ts
Outdated
Show resolved
Hide resolved
packages/aws-cdk-lib/aws-ecs-patterns/test/fargate/queue-processing-fargate-service.test.ts
Outdated
Show resolved
Hide resolved
packages/aws-cdk-lib/aws-ecs-patterns/test/fargate/queue-processing-fargate-service.test.ts
Outdated
Show resolved
Hide resolved
packages/aws-cdk-lib/aws-ecs-patterns/test/fargate/queue-processing-fargate-service.test.ts
Outdated
Show resolved
Hide resolved
|
@lpizzinidev Thanks for the review and updated all requested changes. |
|
@AnuragMohapatra |
kaizencc
left a comment
There was a problem hiding this comment.
Thanks for your PR and integ test @AnuragMohapatra. I have a few comments, and also please update the PR description to reflect the fact that an integ test here exists!
packages/aws-cdk-lib/aws-ecs-patterns/lib/base/queue-processing-service-base.ts
Outdated
Show resolved
Hide resolved
packages/aws-cdk-lib/aws-ecs-patterns/lib/base/queue-processing-service-base.ts
Show resolved
Hide resolved
packages/aws-cdk-lib/aws-ecs-patterns/lib/base/queue-processing-service-base.ts
Show resolved
Hide resolved
…https://github.com/AnuragMohapatra/aws-cdk into fix/issue-20706-fixforcpubasedautoscaleracecondition
Pull request has been modified.
…https://github.com/AnuragMohapatra/aws-cdk into fix/issue-20706-fixforcpubasedautoscaleracecondition
packages/aws-cdk-lib/aws-ecs-patterns/lib/base/queue-processing-service-base.ts
Outdated
Show resolved
Hide resolved
packages/aws-cdk-lib/aws-ecs-patterns/lib/base/queue-processing-service-base.ts
Outdated
Show resolved
Hide resolved
kaizencc
left a comment
There was a problem hiding this comment.
Thanks @AnuragMohapatra
|
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). |
…rget utilization (aws#28315) Added an optional parameter that defaults to false over the CPU-based scaling policy that conflicts with the queue visible message-based policy. When disabled this will stop the race condition issue mentioned in aws#20706 by only allowing the scaling of the number of messages on the queue similar to the SQS-Lambda pattern. Note: If this parameter is enabled then this bug will crop up again and the user has to handle the container termination manually. Updated integration tests and unit tests are working. Closes aws#20706 . ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Added an optional parameter that defaults to false over the CPU-based scaling policy that conflicts with the queue visible message-based policy.
When disabled this will stop the race condition issue mentioned in #20706 by only allowing the scaling of the number of messages on the queue similar to the SQS-Lambda pattern.
Note: If this parameter is enabled then this bug will crop up again and the user has to handle the container termination manually.
Updated integration tests and unit tests are working.
Closes #20706 .
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license