Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ def invoke_docker_build_and_push(self, container_image_name):
_LOGGER.info("Building sdk container, this may take a few minutes...")
now = time.time()
subprocess.run(['docker', 'build', '.', '-t', container_image_name],
capture_output=True,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about
subprocess.run([ ], stdout=subprocess.PIPE)
Woud this capture stdout and print STDERR?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there is an build error, how will users see it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not capturing any output should help. But may be noisy. We can consider to capture the output but print it only if something goes wrong.
Leaving the change as is SGMT for now.

check=True,
cwd=self._temp_src_dir)
except subprocess.CalledProcessError as err:
Expand All @@ -164,9 +163,7 @@ def invoke_docker_build_and_push(self, container_image_name):
if self._docker_registry_push_url:
_LOGGER.info("Pushing prebuilt sdk container...")
try:
subprocess.run(['docker', 'push', container_image_name],
capture_output=True,
check=True)
subprocess.run(['docker', 'push', container_image_name], check=True)
except subprocess.CalledProcessError as err:
raise RuntimeError(
'Failed to push prebuilt sdk container %s, stderr: \n%s' %
Expand Down