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

ASF GitHub Bot commented on AIRFLOW-5869:
-----------------------------------------

kaxil commented on pull request #6519: [AIRFLOW-5869] BugFix: Creating DagRuns 
fails for Deserialized tasks …
URL: https://github.com/apache/airflow/pull/6519
 
 
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> 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