kaxil commented on a change in pull request #16734:
URL: https://github.com/apache/airflow/pull/16734#discussion_r662406523



##########
File path: airflow/serialization/serialized_objects.py
##########
@@ -424,7 +424,10 @@ def serialize_operator(cls, op: BaseOperator) -> Dict[str, 
Any]:
                     )
 
                 deps.append(f'{module_name}.{klass.__name__}')
-            serialize_op['deps'] = deps
+            # deps needs to be sorted here, because op.deps is a set, which is 
unstable when traversing,
+            # and the same call may get different results.
+            # When calling json.dumps(self.data, sort_keys=True) to generate 
dag_hash, misjudgment will occur
+            serialize_op['deps'] = sorted(deps)

Review comment:
       Are you using Custom deps? Can you please update the PR description and 
title to better reflect the changes now, something along the lines of, Handle 
Custom deps correct in DAG Serialization or something like that




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