ferruzzi commented on PR #68734:
URL: https://github.com/apache/airflow/pull/68734#issuecomment-4772379240

   Nice catch on the bug.  Duplicating the data feels very heavy-handed, surely 
there's a better way? It looks like this whole issue is because 
`new_serialized_dag = cls(dag)` is constructed before we know which branch 
we'll take and we're just plastering over that.  
   
   Would it be a cleaner fix to calculate the hash early with 
`cls.hash(dag.data)` and use that for the branching logic, then construct the 
new serialized Dag only in the branch that needs it, after the UUID is 
resolved?  If you build the serdag after calling 
`_generate_deadline_uuids(dag.data)` then it'll get the right UUID and not need 
to store the old values, recalculate hashes, etc.


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to