ephraimbuddy commented on code in PR #56536:
URL: https://github.com/apache/airflow/pull/56536#discussion_r2444171425
##########
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).encode("utf-8")
Review Comment:
We have sorted and created the hash at line 317, this won't work because
what you are sorting is not the hash which we check for consistency. Like I
said in the closed PR, you only need to work ong _sort_serialized_dag_dict
method and not to use it here. You are sorted the data saved in the db here and
that has nothing to do with the hash check
--
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]