You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "tvalentyn (via GitHub)" <gi...@apache.org> on 2023/02/06 18:52:29 UTC

[GitHub] [beam] tvalentyn commented on a diff in pull request #25313: Fail the pipeline when a mismatched Python version is detected.

tvalentyn commented on code in PR #25313:
URL: https://github.com/apache/beam/pull/25313#discussion_r1097790713


##########
sdks/python/apache_beam/runners/worker/bundle_processor.py:
##########
@@ -823,6 +825,38 @@ def only_element(iterable):
   return element
 
 
+def _extract_py_version(capability):
+  return capability[len(_PY_SDK_CAPABILITY_PREFIX):].split("_sdk:")[0]
+
+
+def _verify_descriptor_created_in_a_compatible_env(process_bundle_descriptor):
+  # type: beam_fn_api_pb2.ProcessBundleDescriptor -> None
+
+  py_envs_at_submission = set()
+  for _, env in process_bundle_descriptor.environments.items():

Review Comment:
   thanks for feedback. i am also thinking to stop checking as soon as one environment successfully matched, and also considering doing the matches at most once per process. let me know if you think it's over-optimizing.



-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org