You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "syedahsn (via GitHub)" <gi...@apache.org> on 2024/03/04 19:14:05 UTC

Re: [PR] ECS Executor - "REMOVED" job failure count should not increment [airflow]

syedahsn commented on code in PR #37839:
URL: https://github.com/apache/airflow/pull/37839#discussion_r1511668788


##########
airflow/providers/amazon/aws/executors/ecs/ecs_executor.py:
##########
@@ -302,14 +302,15 @@ def __handle_failed_task(self, task_arn: str, reason: str):
                 self.__class__.MAX_RUN_TASK_ATTEMPTS,
                 task_arn,
             )
-            self.active_workers.increment_failure_count(task_key)
+            if increment:
+                self.active_workers.increment_failure_count(task_key)

Review Comment:
   Now that I'm looking at it, shouldn't the task be removed from the `active_workers` queue if the task has failed? Especially if it is being retried, we add the same task to the `pending_tasks` queue, are we duplicating the task (because in the next `sync()` iteration, we will move the task from the `pending_tasks` queue to the `active_workers` queue)?



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