You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/04/18 18:43:05 UTC

[GitHub] [airflow] o-nikolas commented on a diff in pull request #22879: Update ecs_task_id on reattaching

o-nikolas commented on code in PR #22879:
URL: https://github.com/apache/airflow/pull/22879#discussion_r852324441


##########
airflow/providers/amazon/aws/operators/ecs.py:
##########
@@ -413,6 +413,7 @@ def _try_reattach_task(self, context):
         )
         if previous_task_arn in running_tasks:
             self.arn = previous_task_arn
+            self.ecs_task_id = self.arn.split("/")[-1]

Review Comment:
   Small nit: When I had coded this (before I knew you were working on it :laughing:) I extracted setting the arn/task_id into a helper method, because this code is now duplicated in two spots. Not a huge deal, since ARNs are fairly stable, but worth considering. Approving



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org