You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Kaxil Naik (Jira)" <ji...@apache.org> on 2019/11/08 00:31:00 UTC
[jira] [Created] (AIRFLOW-5869) Deserialized Operators have no
start_date
Kaxil Naik created AIRFLOW-5869:
-----------------------------------
Summary: Deserialized Operators have no start_date
Key: AIRFLOW-5869
URL: https://issues.apache.org/jira/browse/AIRFLOW-5869
Project: Apache Airflow
Issue Type: Bug
Components: core
Affects Versions: 2.0.0
Reporter: Kaxil Naik
Deserialized operators do not always have start_date set.
That, for instance, breaks triggering dags.
See the code from DAG.create_dagrun():
{code:python}
run = DagRun(...)
session.add(run)
session.commit()
run.dag = self
run.verify_integrity(session=session) # this validation fails because run assumes that all operators have start_date set
run.refresh_from_db()
{code}
One of the optimisation (https://github.com/coufon/airflow/commit/b5ee858f44f55818c589cf2c8bf3866fa5d50e30) we did as part of DAG Serialization was to not store dates in tasks if they have a matching date (start_date or end_date) in DAG. Unfortunately, when triggering DAG containing such tasks, it fails on DagRun.run.verify_integrity.
The fix is to add the start_date when deserializing the operator.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)