feat(ecs): add support for EC2 Capacity Providers#14386
feat(ecs): add support for EC2 Capacity Providers#14386mergify[bot] merged 10 commits intoaws:masterfrom
Conversation
SoManyHs
left a comment
There was a problem hiding this comment.
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.
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.
I've reworked this code, LMK what you think.
1917213 to
7f6597b
Compare
|
@SoManyHs Ready for second review, thanks! |
SoManyHs
left a comment
There was a problem hiding this comment.
Looks great! The high number of comments are mostly renaming EC2 -> Asg as previously discussed -- also a few clarifications on tests.
| Task auto-scaling is powered by *Application Auto-Scaling*. | ||
| See that section for details. | ||
|
|
||
| ## Instance Auto-Scaling |
There was a problem hiding this comment.
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 <hsinghui@amazon.com>
Co-authored-by: Hsing-Hui Hsu <hsinghui@amazon.com>
Co-authored-by: Hsing-Hui Hsu <hsinghui@amazon.com>
Co-authored-by: Hsing-Hui Hsu <hsinghui@amazon.com>
Co-authored-by: Hsing-Hui Hsu <hsinghui@amazon.com>
Co-authored-by: Hsing-Hui Hsu <hsinghui@amazon.com>
5876422 to
cfb0453
Compare
b3fcb11 to
b06f7db
Compare
|
@SoManyHs Ready for the next review pass! |
b06f7db to
ecc9966
Compare
SoManyHs
left a comment
There was a problem hiding this comment.
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 forFargateCapacityProviderandFargateSpotCapacityProvider.Closes #5471
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license