maiorBoltach opened a new issue #10758:
URL: https://github.com/apache/airflow/issues/10758


   **Description**
   
   Create API fro creating new types of different trigger_rules like it's done 
for macros or views.
   
   **Use case / motivation**
   
   Currently, there are 8 different types of rules for triggering subsequent 
tasks, but they do not allow you to flexibly set more complex rules for the 
entire pipeline (not from the point of view of business requirements for a 
dagger, but technical ones).
   For example, at the moment there is **only 1 rule (all_done)**, which waits 
for all upstream tasks to finish. It is impossible to implement, for example, 
the following rule without complications: 
   
   [task1, task2, task3] >> task4. 
   Task 4 should be triggered if all tasks are done and one success. 
   
   We have to create more complicated dags:
   [task1, task2, task3] >> check_task (all_done trigger_rule) >> task_4 . 
   check_task - python_operator, that checks all upstream tasks statuses. If 
there're all upstream task failed, task will raise new AirflowException to pass 
upstream_failed to task_4.
   
   As you see, that's very simple example, but it require complicate solution.
   There are more different cases like 'two_success' and different combinations 
with 'all done'
   
   **Related Issues**
   
   https://github.com/apache/airflow/pull/1432


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

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


Reply via email to