-
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
feat(ecs-patterns): support disabling CPU-based scaling and custom target utilization #28315
Conversation
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.
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.
|
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.
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
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.
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 |
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.
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
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.
Thanks @AnuragMohapatra
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.
Oops :)
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