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 2021/11/12 07:39:07 UTC

[GitHub] [airflow] malthe commented on issue #17010: Add support for custom Trigger Rule logic

malthe commented on issue #17010:
URL: https://github.com/apache/airflow/issues/17010#issuecomment-966888936


   I think something like `TriggerRule.WAIT_ALL & TriggerRule.ONE_SUCCESS` is easier to understand than the existing `TriggerRule.NONE_FAILED_OR_SKIPPED` rule.
   
   Following the ideas in #19361 – it seems that these ideas can combine, e.g.
   
   ```python
      ...
      trigger_rule=TriggerRule.WAIT_ALL & TriggerRule.ONE_SUCCESS & TriggerRule.MONDAY
   ```
   Those are all static rules that can be combined with boolean logic such as `&`, `|` and `~` (not).
   
   In #19361 there is also `CronTimeFilter` which could be turned into a trigger rule as well – in the example above, `TriggerRule.MONDAY` is really just a predefined cron-based time filter.
   
   Like timetables (see [AIP-39](https://cwiki.apache.org/confluence/display/AIRFLOW/AIP-39+Richer+scheduler_interval)), there could be support for custom implementations, but it might be reasonable to start with a set of builtin classes which can then be combined as proposed above.
   
   In some scheduling systems, there is support for custom calendars such as "bank holidays". This seems like a good case for a custom implementation since there is no clear single solution. There are Python libraries such as [holidays](https://pypi.org/project/holidays/) that address official holidays, but an organization might have a need for much more specific calendars.


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