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/03/01 08:57:58 UTC

[GitHub] [airflow] felicity-cl opened a new issue #21888: non_upstream_failed trigger rule

felicity-cl opened a new issue #21888:
URL: https://github.com/apache/airflow/issues/21888


   ### Description
   
   I'm missing a trigger rule that makes sure a downstream task only runs if all upstream tasks are done, but by done means only  success or failed state.
   
   
   
   
   ### Use case/motivation
   
   currently we only have none skipped, but that rule also counts upstream_failed state as 'done' which leads to the weird behaviour that  a task way down the dag will start running even though an upstream task failed and prevented all further tasks that it depends on to run.
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a 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: commits-unsubscribe@airflow.apache.org

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



[GitHub] [airflow] felicity-cl commented on issue #21888: non_upstream_failed trigger rule

Posted by GitBox <gi...@apache.org>.
felicity-cl commented on issue #21888:
URL: https://github.com/apache/airflow/issues/21888#issuecomment-1055180330


   all_ran trigger rule


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



[GitHub] [airflow] felicity-cl commented on issue #21888: non_upstream_failed trigger rule

Posted by GitBox <gi...@apache.org>.
felicity-cl commented on issue #21888:
URL: https://github.com/apache/airflow/issues/21888#issuecomment-1055193192


   in here: https://github.com/apache/airflow/blob/main/airflow/ti_deps/deps/trigger_rule_dep.py#L72
   add 
   elif trigger_rule == TR.ALL_RAN:
               all_ran = (successes + failures) == done
               if not all_ran:
                   yield self._failing_status(
                       reason=(
                           f"Task's trigger rule '{trigger_rule}' requires all upstream tasks to have run without skips or upstream failures "))
   
   in here https://github.com/apache/airflow/blob/69f6f9e01b6df76c3c8fa266d460324163957887/airflow/utils/trigger_rule.py#L1
   
   add new rule ALL_RAN


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



[GitHub] [airflow] felicity-cl edited a comment on issue #21888: non_upstream_failed trigger rule

Posted by GitBox <gi...@apache.org>.
felicity-cl edited a comment on issue #21888:
URL: https://github.com/apache/airflow/issues/21888#issuecomment-1055193192


   in here: https://github.com/apache/airflow/blob/main/airflow/ti_deps/deps/trigger_rule_dep.py#L72
   add 
   `
   elif trigger_rule == TR.ALL_RAN:
               all_ran = (successes + failures) == done
               if not all_ran:
                   yield self._failing_status(
                       reason=(
                           f"Task's trigger rule '{trigger_rule}' requires all upstream tasks to have run without skips or upstream failures "))
   `
   
   in here: https://github.com/apache/airflow/blob/69f6f9e01b6df76c3c8fa266d460324163957887/airflow/utils/trigger_rule.py#L1
   
   add new rule ALL_RAN


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



[GitHub] [airflow] felicity-cl edited a comment on issue #21888: non_upstream_failed trigger rule

Posted by GitBox <gi...@apache.org>.
felicity-cl edited a comment on issue #21888:
URL: https://github.com/apache/airflow/issues/21888#issuecomment-1055193192


   in here: https://github.com/apache/airflow/blob/main/airflow/ti_deps/deps/trigger_rule_dep.py#L72
   add 
   `elif trigger_rule == TR.ALL_RAN:
               all_ran = (successes + failures) == done
               if not all_ran:
                   yield self._failing_status(
                       reason=(
                           f"Task's trigger rule '{trigger_rule}' requires all upstream tasks to have run without skips or upstream failures "))`
   
   in here: https://github.com/apache/airflow/blob/69f6f9e01b6df76c3c8fa266d460324163957887/airflow/utils/trigger_rule.py#L1
   
   add new rule ALL_RAN


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



[GitHub] [airflow] boring-cyborg[bot] commented on issue #21888: non_upstream_failed trigger rule

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #21888:
URL: https://github.com/apache/airflow/issues/21888#issuecomment-1055175993


   Thanks for opening your first issue here! Be sure to follow the issue template!
   


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