[ 
https://issues.apache.org/jira/browse/AIRFLOW-5869?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16971532#comment-16971532
 ] 

ASF subversion and git services commented on AIRFLOW-5869:
----------------------------------------------------------

Commit 97ff92a47ae49c57e12ce86160c568a3f3dac82a in airflow's branch 
refs/heads/v1-10-test from Kaxil Naik
[ https://gitbox.apache.org/repos/asf?p=airflow.git;h=97ff92a ]

[AIRFLOW-5869] BugFix: Some Deserialized tasks have no start_date (#6519)


(cherry picked from commit 3fa64ea7a9476de4810f3b95f170074a2b422206)


> Creating DagRuns fails for Deserialized tasks with 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
>            Priority: Major
>             Fix For: 1.10.7
>
>
> 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)

Reply via email to