dawidsz-allegro commented on issue #48816:
URL: https://github.com/apache/airflow/issues/48816#issuecomment-3345748272

   Hi, I stumped on the same issue. Only solution I found is addition of a 
python task with trigger_rule="all_done" which checks for failed tasks and 
succeeds if none were found e.g.:
   `
   @task(trigger_rule="all_done", retries=0)
   def validate_mapped_tasks_completion(mapped_task_id: str, **context) -> None:
       dag_run = context["dag_run"]
       failed_tasks = []
       for ti in dag_run.get_task_instances():
           if ti.task_id == mapped_task_id and ti.state == "failed":
               failed_tasks.append(f"Task 
{ti.task_id}_index_{ti.map_index}_try_number_{ti._try_number} failed.")
       if failed_tasks:
           raise AirflowFailException("\n".join(failed_tasks))
   `


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