From 4497b5370c754916da4331dfa1e4d9ac334fe693 Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Mon, 23 Nov 2015 15:42:34 -0800 Subject: [PATCH] Branching related additions to docs --- airflow/operators/python_operator.py | 2 ++ docs/concepts.rst | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/airflow/operators/python_operator.py b/airflow/operators/python_operator.py index 0832d2f733..1cf7eed8e5 100644 --- a/airflow/operators/python_operator.py +++ b/airflow/operators/python_operator.py @@ -83,6 +83,8 @@ class BranchPythonOperator(PythonOperator): Note that using tasks with ``depends_on_past=True`` downstream from ``BranchPythonOperator`` is logically unsound as ``skipped`` status will invariably lead to block tasks that depend on their past successes. + ``skipped`` states propagates where all directly upstream tasks are + ``skipped``. """ def execute(self, context): branch = super(BranchPythonOperator, self).execute(context) diff --git a/docs/concepts.rst b/docs/concepts.rst index d769fad5d1..1776a36eb6 100644 --- a/docs/concepts.rst +++ b/docs/concepts.rst @@ -211,6 +211,12 @@ is followed, and all of the other paths are skipped. The task_id returned by the Python function has to be referencing a task directly downstream from the BranchPythonOperator task. +Note that using tasks with ``depends_on_past=True`` downstream from +``BranchPythonOperator`` is logically unsound as ``skipped`` status +will invariably lead to block tasks that depend on their past successes. +``skipped`` states propagates where all directly upstream tasks are +``skipped``. + SLAs ''''