riteshghorse commented on code in PR #28564:
URL: https://github.com/apache/beam/pull/28564#discussion_r1434236712
##########
sdks/python/apache_beam/transforms/environments.py:
##########
@@ -125,9 +125,17 @@ def __init__(self,
dict(resource_hints) if resource_hints else {})
def __eq__(self, other):
+ equal_artifacts = True
+ for first, second in zip(self._artifacts, other._artifacts):
+ # do not compare type payload since it contains a unique hash.
Review Comment:
with same temp directory, won't it overwrite the file with same name?
because the two values are like this:
```
first: [type_urn: "beam:artifact:type:file:v1"
type_payload:
"\nd/var/folders/kk/jk392txd7x14sg93r8sjnzkh00tp20/T/tmpmxw3v4d9/submission_environment_dependencies.txt"
role_urn: "beam:artifact:role:staging_to:v1"
role_payload: "\n\'submission_environment_dependencies.txt"
]
second: [type_urn: "beam:artifact:type:file:v1"
type_payload:
"\nd/var/folders/kk/jk392txd7x14sg93r8sjnzkh00tp20/T/tmpni8k_038/submission_environment_dependencies.txt"
role_urn: "beam:artifact:role:staging_to:v1"
role_payload: "\n\'submission_environment_dependencies.txt"
]
```
But yeah I agree that we need to fix the artifact comparison function,
somehow this wasn't caught earlier!
--
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]