collinmcnulty opened a new issue, #51320:
URL: https://github.com/apache/airflow/issues/51320

   ### Apache Airflow version
   
   3.0.1
   
   ### If "Other Airflow 2 version" selected, which one?
   
   _No response_
   
   ### What happened?
   
   A DAG is being marked failed despite all tasks that should be skipped. This 
only happens when trigger_rule is all_done
   
   ### What you think should happen instead?
   
   Mapped task should be skipped, not upstream failed.
   
   ### How to reproduce
   
   This DAG has all tasks skip in Airflow 2, so the DAG state is success. In 
Airflow 3, it has one task upstream_failed and therefore the DAG as a whole is 
marked failed.
   
   ```
   from airflow.exceptions import AirflowSkipException
   from airflow.decorators import dag, task
   
   
   @dag(
       start_date=None,
       schedule=None,
   )
   def upstream_skipper():
       @task()
       def skip(**context) -> int:
           raise AirflowSkipException()
   
       @task(trigger_rule="all_done")
       def consume_skip_all_done(value) -> None:
           """Fails as upstream skipped"""
           print(value)
   
       @task()
       def consume_skip_all_success(value) -> None:
           """Skipped"""
           print(value)
   
       consume_skip_all_success.expand(value=skip())
       consume_skip_all_done.expand(value=skip())
   
   
   upstream_skipper()
   ``
   
   ### Operating System
   
   Debian GNU/Linux 12 (bookworm)
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Astronomer
   
   ### Deployment details
   
   _No response_
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


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