anshuksi282-ksolves commented on code in PR #56536:
URL: https://github.com/apache/airflow/pull/56536#discussion_r2438838113


##########
airflow-core/src/airflow/models/serialized_dag.py:
##########
@@ -318,17 +315,15 @@ def __init__(self, dag: LazyDeserializedDAG) -> None:
         self.dag_id = dag.dag_id
         dag_data = dag.data
         self.dag_hash = SerializedDagModel.hash(dag_data)
-
-        # partially ordered json data
-        dag_data_json = json.dumps(dag_data, sort_keys=True).encode("utf-8")
+        sorted_dag_data = 
SerializedDagModel._sort_serialized_dag_dict(dag_data)
+        sorted_dag_data_json = json.dumps(sorted_dag_data, 
sort_keys=True).encode("utf-8")

Review Comment:
   Hi @uranusjr,
   Thanks for the suggestion! I removed the redundant `sort_keys` from` 
sorted_dag_data_json` because `_sort_serialized_dag_dict` already ensures 
deterministic ordering.



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