airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Taylor Murphy (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AIRFLOW-637) Operators in Subdags don't have their associated DagRun in the context
Date Thu, 17 Nov 2016 21:27:58 GMT

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

Taylor Murphy updated AIRFLOW-637:
----------------------------------
    Description: 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 (L1330
in . 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.   (was: 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. )

> 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 (L1330 in . 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)

Mime
View raw message