tvalentyn commented on code in PR #28385:
URL: https://github.com/apache/beam/pull/28385#discussion_r1347748955
##########
sdks/python/setup.py:
##########
@@ -159,15 +159,14 @@ def generate_protos_first():
# Pyproject toml build happens in isolated environemnts. In those envs,
# gen_protos is unable to get imported. so we run a subprocess call.
cwd = os.path.abspath(os.path.dirname(__file__))
- p = subprocess.call([
+ p = subprocess.run([
sys.executable,
os.path.join(cwd, 'gen_protos.py'),
'--no-force'
- ])
- if p != 0:
- raise RuntimeError()
- except RuntimeError:
- logging.warning('Could not import gen_protos, skipping proto generation.')
+ ], capture_output=True, check=True)
Review Comment:
note that `capture_output=True,` will hide all of stdout, and in case of
error, only stderr is printed. is this intentional?
--
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]