You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Taylor Murphy (JIRA)" <ji...@apache.org> on 2016/11/17 21:19:58 UTC

[jira] [Created] (AIRFLOW-637) Operators in Subdags don't have their associated DagRun in the context

Taylor Murphy created AIRFLOW-637:
-------------------------------------

             Summary: Operators in Subdags don't have their associated DagRun in the context
                 Key: AIRFLOW-637
                 URL: https://issues.apache.org/jira/browse/AIRFLOW-637
             Project: Apache Airflow
          Issue Type: Bug
          Components: DagRun, operators, subdag
            Reporter: Taylor Murphy
            Priority: Minor


Currently in models.get_template_context a dag's associated DagRun and run_id (populated from the dag_run) are both found by querying the data base for the dag_id  (L1176). Since subdags don't have a dag run in the db, the dagrun and run_id will be set to None. By looking up the run in the db by the name of the parent dag (which will always be the first part of the dag_id when split by '.', we can return the current dag run object for the parent dag, and populate the run_id accordingly. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)