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:16:00 UTC

[jira] [Created] (AIRFLOW-6986) Need a new task trigger rule

Naresh Edla created AIRFLOW-6986:
------------------------------------

             Summary: Need a new task trigger rule 
                 Key: AIRFLOW-6986
                 URL: https://issues.apache.org/jira/browse/AIRFLOW-6986
             Project: Apache Airflow
          Issue Type: New Feature
          Components: utils
    Affects Versions: 1.10.9
            Reporter: Naresh Edla


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}
 

Fills to be updated: 
 * [airflow|https://github.com/apache/airflow]/[airflow|https://github.com/apache/airflow/tree/master/airflow]/[ti_deps|https://github.com/apache/airflow/tree/master/airflow/ti_deps]/[deps|https://github.com/apache/airflow/tree/master/airflow/ti_deps/deps]/*trigger_rule_dep.py*

 * [airflow|https://github.com/apache/airflow]/[airflow|https://github.com/apache/airflow/tree/master/airflow]/[utils|https://github.com/apache/airflow/tree/master/airflow/utils]/*trigger_rule.py*

 

 



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