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



##########
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:
       Thank you for your comments, I have updated the PR description and title.




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