Skip to content

diag: surface stdout+stderr on build_package failure#411

Open
ihalatci wants to merge 2 commits into
developfrom
ihalatci/citus-package-diag
Open

diag: surface stdout+stderr on build_package failure#411
ihalatci wants to merge 2 commits into
developfrom
ihalatci/citus-package-diag

Conversation

@ihalatci

Copy link
Copy Markdown
Contributor

Packaging build failures were masked by stderr-only docker pull preamble output. This now prints both stdout and stderr, including the return code, so the real container error is visible. No behavior change on success.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

@alperkocatas alperkocatas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Dropped a nit comment.

Comment thread packaging_automation/citus_package.py Outdated
@@ -367,7 +367,11 @@ def build_package(
if output.stdout:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It looks like stdout will be printed twice on failure case. So, I recommend moving lines 367-368 after the error case.

Suggested change
if output.stdout:
if output.returncode != 0:
raise ValueError(output.stderr)
raise ValueError(
f"Build failed (rc={output.returncode}).\n"
f"STDOUT:\n{output.stdout}\n"
f"STDERR:\n{output.stderr}"
)
if output.stdout:
print("Output:" + output.stdout)

@ihalatci
ihalatci marked this pull request as ready for review July 20, 2026 10:50
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 21828aca-24f9-441b-8e36-981b7666b5c0
@ihalatci
ihalatci requested a review from alperkocatas July 20, 2026 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants