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)