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(ecs-service-extensions): Deprecate scale on CPU utilization extension #17802

Merged
merged 10 commits into from Jan 12, 2022

Conversation

upparekh
Copy link
Contributor

@upparekh upparekh commented Dec 1, 2021


This PR deprecates one of the existing scaleOnCpuUtilization extension. We recommend users to configure task auto scaling using the autoScaleTaskCount in the Service construct.

Related PR: #17101

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@gitpod-io
Copy link

gitpod-io bot commented Dec 1, 2021

@upparekh upparekh added the @aws-cdk-containers/ecs-service-extensions Related to ecs-service-extensions package label Dec 1, 2021
@upparekh upparekh self-assigned this Dec 1, 2021
@upparekh upparekh changed the title chore(ecs-service-extensions): Deprecate Scale on CPU Utilization Extension chore(ecs-service-extensions): Deprecate scale on CPU utilization extension Dec 1, 2021
@mergify mergify bot dismissed madeline-k’s stale review January 7, 2022 18:38

Pull request has been modified.

Copy link
Contributor

@madeline-k madeline-k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Just have one final comment :)

@@ -126,6 +134,9 @@ export class ScaleOnCpuUtilization extends ServiceExtension {
// This hook utilizes the resulting service construct
// once it is created.
public useService(service: ecs.Ec2Service | ecs.FargateService) {
if (this.parentService.scalableTaskCount) {
throw Error('Cannot specify \'minTaskCount\' or \'maxTaskCount\' in the Service construct and also provide a \'ScaleOnCpuUtilization\' extension. \'ScaleOnCpuUtilization\' is deprecated. Please only provide \'minTaskCount\' and \'maxTaskCount\'.');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just realized we can make this error a little bit shorter and clearer by referring to the property name that contains minTaskCount and maxTaskCount.

Suggested change
throw Error('Cannot specify \'minTaskCount\' or \'maxTaskCount\' in the Service construct and also provide a \'ScaleOnCpuUtilization\' extension. \'ScaleOnCpuUtilization\' is deprecated. Please only provide \'minTaskCount\' and \'maxTaskCount\'.');
throw Error('Cannot specify \'autoScaleTaskCount\' in the Service construct and also provide a \'ScaleOnCpuUtilization\' extension. \'ScaleOnCpuUtilization\' is deprecated. Please only provide \'autoScaleTaskCount\'.');

@mergify
Copy link
Contributor

mergify bot commented Jan 12, 2022

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: 34fc9b2
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

@mergify mergify bot merged commit bb67345 into aws:master Jan 12, 2022
@mergify
Copy link
Contributor

mergify bot commented Jan 12, 2022

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

TikiTDO pushed a commit to TikiTDO/aws-cdk that referenced this pull request Feb 21, 2022
…ension (aws#17802)

----
This PR deprecates one of the existing `scaleOnCpuUtilization` extension. We recommend users to configure task auto scaling using the [`autoScaleTaskCount`](https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk-containers/ecs-service-extensions/lib/service.ts#L61) in the `Service` construct. 

Related PR: aws#17101 

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk-containers/ecs-service-extensions Related to ecs-service-extensions package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants