-
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): add support for EC2 Capacity Providers #14386
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.
Thanks so much for this contribution! Had a few questions, but otherwise looking really good!
autoScalingGroupProvider: { | ||
autoScalingGroupArn: this.autoScalingGroup.autoScalingGroupName, | ||
managedScaling: { | ||
status: (props.enableManagedScaling === undefined || props.enableManagedScaling) ? 'ENABLED' : 'DISABLED', |
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.
What happens if enabledManagedScaling
is not enabled but the other managedScaling fields are specified in the props? Could we add a test for that?
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.
Sure
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.
I've reworked this code, LMK what you think.
1917213
to
7f6597b
Compare
@SoManyHs Ready for second review, thanks! |
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.
Looks great! The high number of comments are mostly renaming EC2 -> Asg as previously discussed -- also a few clarifications on tests.
@@ -496,38 +493,6 @@ scaling.scaleOnRequestCount('RequestScaling', { | |||
Task auto-scaling is powered by *Application Auto-Scaling*. | |||
See that section for details. | |||
|
|||
## Instance Auto-Scaling |
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.
I think we can keep this section to include the bit on scaling on a metric -- this still applies in the context of ASG capacity providers.
Co-authored-by: Hsing-Hui Hsu <[email protected]>
Co-authored-by: Hsing-Hui Hsu <[email protected]>
Co-authored-by: Hsing-Hui Hsu <[email protected]>
Co-authored-by: Hsing-Hui Hsu <[email protected]>
Co-authored-by: Hsing-Hui Hsu <[email protected]>
Co-authored-by: Hsing-Hui Hsu <[email protected]>
5876422
to
cfb0453
Compare
b3fcb11
to
b06f7db
Compare
@SoManyHs Ready for the next review pass! |
b06f7db
to
ecc9966
Compare
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.
LGTM! Thanks so much! 🚀
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 master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Add support for EC2 Capacity Providers. I tried to make the UX reasonably decent without disrupting existing stacks. There are some new types being created here, including `ICapacityProvider` (interface type) and its concrete type `EC2CapacityProvider` (which is a class users can instantiate). There are also a couple of singleton classes for `FargateCapacityProvider` and `FargateSpotCapacityProvider`. Closes aws#5471 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
The `Cluster.addCapacity` method was deprecated in #14386 as part of the introduction of `Cluster.addAsgCapacityProvider`. However, the corresponding `ClusterProps.capacity` property and `AddCapacityOptions` interface were not deprecated, leading to a confusing mismash of deprecated and undeprecated usage. The README for ECS still heavily references `Cluster.addCapacity`, further leading to potential confusion for users just following the module's guidance. As part of cleaning up deprecated usage as part of the lead-up to the V2 launch, opting to un-deprecate the `addCapacity` method rather than deprecating the other two elements and rewriting the README.
The `Cluster.addCapacity` method was deprecated in #14386 as part of the introduction of `Cluster.addAsgCapacityProvider`. However, the corresponding `ClusterProps.capacity` property and `AddCapacityOptions` interface were not deprecated, leading to a confusing mismash of deprecated and undeprecated usage. The README for ECS still heavily references `Cluster.addCapacity`, further leading to potential confusion for users just following the module's guidance. As part of cleaning up deprecated usage as part of the lead-up to the V2 launch, opting to un-deprecate the `addCapacity` method rather than deprecating the other two elements and rewriting the README. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
The `Cluster.addCapacity` method was deprecated in #14386 as part of the introduction of `Cluster.addAsgCapacityProvider`. However, the corresponding `ClusterProps.capacity` property and `AddCapacityOptions` interface were not deprecated, leading to a confusing mismash of deprecated and undeprecated usage. The README for ECS still heavily references `Cluster.addCapacity`, further leading to potential confusion for users just following the module's guidance. As part of cleaning up deprecated usage as part of the lead-up to the V2 launch, opting to un-deprecate the `addCapacity` method rather than deprecating the other two elements and rewriting the README. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* (cherry picked from commit 765c274)
The `Cluster.addCapacity` method was deprecated in aws#14386 as part of the introduction of `Cluster.addAsgCapacityProvider`. However, the corresponding `ClusterProps.capacity` property and `AddCapacityOptions` interface were not deprecated, leading to a confusing mismash of deprecated and undeprecated usage. The README for ECS still heavily references `Cluster.addCapacity`, further leading to potential confusion for users just following the module's guidance. As part of cleaning up deprecated usage as part of the lead-up to the V2 launch, opting to un-deprecate the `addCapacity` method rather than deprecating the other two elements and rewriting the README. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
The `Cluster.addCapacity` method was deprecated in aws#14386 as part of the introduction of `Cluster.addAsgCapacityProvider`. However, the corresponding `ClusterProps.capacity` property and `AddCapacityOptions` interface were not deprecated, leading to a confusing mismash of deprecated and undeprecated usage. The README for ECS still heavily references `Cluster.addCapacity`, further leading to potential confusion for users just following the module's guidance. As part of cleaning up deprecated usage as part of the lead-up to the V2 launch, opting to un-deprecate the `addCapacity` method rather than deprecating the other two elements and rewriting the README. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Add support for EC2 Capacity Providers.
I tried to make the UX reasonably decent without disrupting existing stacks. There are some new types being created here, including
ICapacityProvider
(interface type) and its concrete typeEC2CapacityProvider
(which is a class users can instantiate). There are also a couple of singleton classes forFargateCapacityProvider
andFargateSpotCapacityProvider
.Closes #5471
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license