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

feat(stepfunctions-tasks): EcsRunTask now uses taskDefinition family instead of ARN #12436

Merged
merged 6 commits into from
Jan 22, 2021
Merged

feat(stepfunctions-tasks): EcsRunTask now uses taskDefinition family instead of ARN #12436

merged 6 commits into from
Jan 22, 2021

Conversation

ayush987goyal
Copy link
Contributor

@ayush987goyal ayush987goyal commented Jan 9, 2021

feat(stepfunctions-tasks): EcsRunTask now uses taskDefinition family instead of ARN

Currently the ECS run task implementation uses full ARN of the task definition. This ARN contains the ACTIVE revision at the end. The ACTIVE revision keeps on changing as the task definition changes causing potential failures (refer the issue).

This change now lets the run task API to use task definition family (and corresponding ARN which does not contain the revision) to run the task. Using the family would mean that the latest ACTIVE revision of task-definition is used always. This is supported out of the box by ECS (refer the below refs).

Parameter Ref: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_RunTask.html#ECS-RunTask-request-taskDefinition

Permissions Ref: https://docs.aws.amazon.com/step-functions/latest/dg/ecs-iam.html

closes #12080


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 Jan 9, 2021

@ayush987goyal
Copy link
Contributor Author

@shivlaks Mind taking a quick look at this? Do you think we should go for a better name for the prop?

@mergify mergify bot dismissed shivlaks’s stale review January 14, 2021 10:22

Pull request has been modified.

@ayush987goyal ayush987goyal changed the title feat(stepfunctions-tasks): add support to use taskDefinition family for EcsRunTask feat(stepfunctions-tasks): EcsRunTask now uses taskDefinition family instead of ARN Jan 14, 2021
@ayush987goyal
Copy link
Contributor Author

Hi @shivlaks , quick reminder for this :)

Copy link
Contributor

@shivlaks shivlaks left a comment

Choose a reason for hiding this comment

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

@ayush987goyal looks good, couple minor comments. Please update the commit description to include the implementation approach taken as it currently only contains a couple of reference links.

would also love if @MrArnoldPalmer in case my understanding of the task definition arn is missing anything

@MrArnoldPalmer
Copy link
Contributor

@shivlaks this LGTM. It definitely makes sense to drop the revision here and using family seems like the best way to do it. 👍🏻

@gitpod-io
Copy link

gitpod-io bot commented Jan 22, 2021

@mergify mergify bot dismissed shivlaks’s stale review January 22, 2021 02:59

Pull request has been modified.

@ayush987goyal
Copy link
Contributor Author

@shivlaks Updated the description and addressed the review comments.

Copy link
Contributor

@shivlaks shivlaks left a comment

Choose a reason for hiding this comment

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

@ayush987goyal looks great! thanks for the contribution!!

@mergify
Copy link
Contributor

mergify bot commented Jan 22, 2021

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: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: cfba37c
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

@mergify
Copy link
Contributor

mergify bot commented Jan 22, 2021

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).

@mergify mergify bot merged commit abde96b into aws:master Jan 22, 2021
@ayush987goyal ayush987goyal deleted the pr/sfn-fargate branch January 22, 2021 08:49
mohanrajendran pushed a commit to mohanrajendran/aws-cdk that referenced this pull request Jan 24, 2021
…instead of ARN (aws#12436)

feat(stepfunctions-tasks): EcsRunTask now uses taskDefinition family instead of ARN

Currently the ECS run task implementation uses full ARN of the task definition. This ARN contains the ACTIVE revision at the end. The ACTIVE revision keeps on changing as the task definition changes causing potential failures (refer the issue).

This change now lets the run task API to use task definition family (and corresponding ARN which does not contain the revision) to run the task. Using the family would mean that the latest ACTIVE revision of task-definition is used always. This is supported out of the box by ECS (refer the below refs).

Parameter Ref: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_RunTask.html#ECS-RunTask-request-taskDefinition

Permissions Ref: https://docs.aws.amazon.com/step-functions/latest/dg/ecs-iam.html

closes aws#12080

----

*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
Projects
None yet
4 participants