Skip to content

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

Merged
mergify[bot] merged 6 commits intoaws:masterfrom
ayush987goyal:pr/sfn-fargate
Jan 22, 2021
Merged

feat(stepfunctions-tasks): EcsRunTask now uses taskDefinition family instead of ARN#12436
mergify[bot] merged 6 commits intoaws:masterfrom
ayush987goyal:pr/sfn-fargate

Conversation

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

gitpod-io bot commented Jan 9, 2021

@ayush987goyal
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

Hi @shivlaks , quick reminder for this :)

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

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
Copy Markdown
Contributor Author

@shivlaks Updated the description and addressed the review comments.

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

Development

Successfully merging this pull request may close these issues.

(aws-stepfunctions-tasks): Fargate task definition contains version which causes step function failure when new task definition is pushed.

4 participants