pmalafosse commented on a change in pull request #16685:
URL: https://github.com/apache/airflow/pull/16685#discussion_r665147274



##########
File path: airflow/providers/amazon/aws/operators/ecs.py
##########
@@ -264,6 +276,21 @@ def _start_task(self):
         self.log.info('ECS Task started: %s', response)
 
         self.arn = response['tasks'][0]['taskArn']
+        ecs_task_id = self.arn.split("/")[-1]
+        self.log.info(f"ECS task ID is: {ecs_task_id}")
+
+        if self.reattach:
+            # Save the task ARN in XCom to be able to reattach it if needed
+            self._xcom_set(context, key="ecs_task_arn", value=self.arn, 
task_id=f"{self.task_id}_task_arn")
+
+    def _xcom_set(self, context, key, value, task_id):

Review comment:
       yes exactly I added it for the patching in the testing




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to