feat(stepfunctions-tasks): allow EcsRunTask on fargate and ec2 to set capacity provider strategy#35465
Conversation
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
| @@ -1,3 +1,3 @@ | |||
| FROM public.ecr.aws/docker/library/python:3.12 | |||
| FROM --platform=linux/amd64 public.ecr.aws/docker/library/python:3.12 | |||
There was a problem hiding this comment.
Because amd64 is used for cpu architecture in integ tests.
If this option is not specified, running the tests on Mac will result in an error during state machine execution.
go-to-k
left a comment
There was a problem hiding this comment.
@ozelalisen Thanks for your review!
I have fixed my code and replied to your comments.
Pull request has been modified.
|
Applied the comment. I would appreciate it if you could look at it again. |
ozelalisen
left a comment
There was a problem hiding this comment.
Thanks for the fast iteration!
|
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). |
Merge Queue Status✅ The pull request has been merged at 4623178 This pull request spent 55 minutes 36 seconds in the queue, including 31 minutes 13 seconds running CI. Required conditions to merge
|
|
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). |
|
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). |
|
Comments on closed issues and PRs are hard for our team to see. |
Issue # (if applicable)
Closes #20013 #30171 #7967
Reason for this change
The capacity provider strategy can't be set on EcsRunTask with
EcsFargateLaunchTargetOptionsandEcsEc2LaunchTargetOptions.capacityProviderStrategy
https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_RunTask.html
Description of changes
This PR adds a new property
capacityProviderOptions(CapacityProviderOptionsclass with static factory methods as an union-like class) in the target options.The
CapacityProviderOptionshas following sub types:The
NoCapacityProviderOptionscreates the original settings withLaunchType(EC2orFARGATE). It is a default value for thecapacityProviderOptions.The
CustomCapacityProviderOptionsallows users to set the capacity provider strategy withoutLaunchType.The
DefaultCapacityProviderOptionsallows users to use the cluster's default capacity provider strategy. The default strategy can be set by specifying no options (LaunchTypeandCapacityProviderStrategy) in CFn.Describe any new or updated permissions being added
Description of how you validated changes
Both unit tests and integ tests.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license