You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Naresh Edla (Jira)" <ji...@apache.org> on 2020/03/05 05:57:00 UTC

[jira] [Updated] (AIRFLOW-6986) Update NONE_FAILED and add a new trigger rule

     [ https://issues.apache.org/jira/browse/AIRFLOW-6986?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Naresh Edla updated AIRFLOW-6986:
---------------------------------
    Summary: Update NONE_FAILED and add a new trigger rule  (was: Add a new trigger rule)

> Update NONE_FAILED and add a new trigger rule
> ---------------------------------------------
>
>                 Key: AIRFLOW-6986
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-6986
>             Project: Apache Airflow
>          Issue Type: Wish
>          Components: utils
>    Affects Versions: 1.10.9
>            Reporter: Naresh Edla
>            Priority: Major
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> Hi Team,
>   I'm looking for a new task trigger rule which will be triggered all the time except upstream task fail.  the trigger rule condition as follows 
> {code:python}
> // Some comments here
> if flag_upstream_failed:
>     
>     if tr == TR.NEW_RULE:
>         if upstream_failed or failed:
>             ti.set_state(State.UPSTREAM_FAILED, session)
> elif tr == TR.NEW_RULE:
>             num_failures = upstream - successes - skipped
>             if num_failures > 0:
>                 yield self._failing_status(
>                     reason="Task's trigger rule '{0}' requires all upstream "
>                     "tasks to have succeeded or been skipped, but found {1} non-success(es). "
>                     "upstream_tasks_state={2}, upstream_task_ids={3}"
>                     .format(tr, num_failures, upstream_tasks_state,
>                             task.upstream_task_ids))
> {code}
>  
> Files to be updated: 
>  * [trigger_rule_dep.py|https://github.com/apache/airflow/tree/master/airflow/ti_deps/deps/trigger_rule_dep.py]
>  * [trigger_rule.py|https://github.com/apache/airflow/tree/master/airflow/utils]
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)