Looking for thoughts on the idea of adding a new TriggerRule which will never 
fire.  The use case I have in mind is system tests.  Airflow docs pages harvest 
code snippets from the system tests and on occasion I have run into a situation 
where the snippet can't run in the context of the test (run duration too long 
to be practical, requires some external paid account, etc) but the snippet is 
still desired.  So far I have used a TaskGroup with a BranchingOperator as a 
workaround in the (two or three?) instances where I've hit this, but I wonder 
if it's something that others might find useful enough to make it worth 
discussing.  I could also see it being a useful debugging tool for DAG authors; 
they could just easily "comment out" entire tasks while leaving them displayed 
in the DAG graph, for example.

The natural progression from that could be a TriggerRule:Callable where the 
callable returns a bool and the TriggerRule is satisfied if/when the callable 
evaluates to True... in which case my goal here would be covered simply using 
`TriggerRule:False` (or maybe it would have to be something like 
`TriggerRule:lambda x: False`, I haven't really put any thought into this part) 
which may or may not be just as easy to implement if we decide we want to do 
this at all.

Down side:   Obviously it's not great to have untested code snippets in the 
docs.  We probably shouldn't be encouraging this behavior.


 - ferruzzi

Reply via email to