ephraimbuddy commented on code in PR #56476:
URL: https://github.com/apache/airflow/pull/56476#discussion_r2415276730
##########
airflow-core/src/airflow/models/serialized_dag.py:
##########
@@ -410,7 +429,12 @@ def write_dag(
return False
log.debug("Checking if DAG (%s) changed", dag.dag_id)
+
+ serialized_json = cls.serialize_dag(dag)
new_serialized_dag = cls(dag)
+ new_serialized_dag._data = serialized_json
+ new_serialized_dag.dag_hash =
hashlib.sha1(serialized_json.encode()).hexdigest()
Review Comment:
Also, I don’t think we can sort further but prove me wrong(check the hash
method). My thinking is there’s something creating an object in the serialized
dag every time the dag is parsed. Last we checked it was callbacks but if you
can look on serialized dag generated, maybe there’s another thing.
When python object is in a serialization, it produces different hash each
time. So look for a python object in the serdag.
--
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]