ashb commented on code in PR #56476:
URL: https://github.com/apache/airflow/pull/56476#discussion_r2415261702


##########
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:
   Yes, my point is that the order in the json dags should not be the deciding 
factor of if a new row is written.
   
   I could be wrong here, it's been a while since I looked at this code, but my 
memory says the hash is compared first, and _that_ already uses the 
deterministic sorting.



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