Skip to content

chore(ecs-service-extensions): Deprecate scale on CPU utilization extension#17802

Merged
mergify[bot] merged 10 commits intoaws:masterfrom
upparekh:upparekh/deprecate-scale-on-cpu-ext
Jan 12, 2022
Merged

chore(ecs-service-extensions): Deprecate scale on CPU utilization extension#17802
mergify[bot] merged 10 commits intoaws:masterfrom
upparekh:upparekh/deprecate-scale-on-cpu-ext

Conversation

@upparekh
Copy link
Copy Markdown
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
Copy Markdown

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
@upparekh upparekh requested a review from madeline-k December 1, 2021 19:48
@mergify mergify bot dismissed madeline-k’s stale review January 7, 2022 18:38

Pull request has been modified.

Copy link
Copy Markdown
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 :)

// 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

3 participants