Harden Conda Build workflow against broken-pipe diagnostic failure#2957
Merged
Conversation
Agent-Logs-Url: https://github.com/ReactionMechanismGenerator/RMG-Py/sessions/2e88db6c-3c4a-4367-86d2-0501037239d5 Co-authored-by: rwest <93807+rwest@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix failing Conda Build workflow due to broken pipe error
Harden Conda Build workflow against broken-pipe diagnostic failure
May 19, 2026
Member
|
@JacksonBurns sorry about the churn. the Conda Build action has just failed a few times on #2955 This seems to fix it (or at least, it succeeded on this PR) |
JacksonBurns
approved these changes
May 19, 2026
Contributor
JacksonBurns
left a comment
There was a problem hiding this comment.
@rwest thanks for keeping the patches going - GHA is a pain
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note from @rwest: I asked co-pilot to diagnose the failed conda build workflow. The job ended with
This PR patches what it suspects to be the problem. It might be wrong. But I'll let the tests run...
The Conda Build workflow can fail with
BrokenPipeError/exit code120when diagnostic output is truncated viahead. This updates the workflow to use a pipe-safe diagnostic command and ensures Conda package installation is explicitly non-interactive.Workflow reliability updates (
.github/workflows/conda_build.yml)conda list -n base | head -40withconda list -n base | sed -n '1,40p'to avoid early pipe closure during diagnostics.conda install -y python anaconda-client conda-buildto enforce non-interactive execution in CI.Scope
Original prompt
Create a pull request in repository
ReactionMechanismGenerator/RMG-Pyto fix the failing GitHub Actions job from run 26100487142, job 76759511865.Context:
.github/workflows/conda_build.ymlException ignored on flushing sys.stdout:BrokenPipeError: [Errno 32] Broken pipeProcess completed with exit code 120Relevant workflow content:
conda list -n base | head -40conda install python anaconda-client conda-buildRequested solution:
.github/workflows/conda_build.ymlto avoid the broken-pipe failure in diagnostics by replacing theheadpipeline with a pipe-safe alternative such assed -n '1,40p'.-y.Expected file change:
.github/workflows/conda_build.ymlPlease implement the patch and create the PR.
The following is the prior conversation context from the user's chat exploration (may be truncated):
User: Please find a solution for this failing job. Use the logs, job definition, and any referenced files where the failure occurred. Keep your response focused on the solution and include code suggestions when appropriate.
Assistant: The failure is in the workflow setup, not in RMG-Py source code.
Root cause
The job exits during “Install Build Tools” in
.github/workflows/conda_build.yml:The log ends with:
Exception ignored on flushing sys.stdout: BrokenPipeError: [Errno 32] Broken pipeProcess completed with exit code 120That pattern is consistent with
conda installproducing output that gets piped or truncated badly in the runner environment, especially after the preceding diagnostic step uses:conda list -n base | head -40from
.github/workflows/conda_build.yml.The
headpipeline can trigger a harmless-but-fatal broken-pipe behavior in some shells/tooling combinations.Fix
Make the diagnostic step pipe-safe, and make the install step non-interactive and quieter.
Recommended workflow patch
Why this should solve it
head -40withsed -n '1,40p'avoids the early pipe close that can triggerBrokenPipeError.-ytoconda installremoves any chance of an interactive prompt causing abnormal termination.Optional hardening
If you want the step to be even more stable, pin the shell behavior explicitly:
But the main fix is the pipeline change plus
conda install -y.Files involved
.github/workflows/conda_build.ymlSuggested final edit
This is the smallest focused change most likely to stop this job from failing.
User: open a PR with these patches, and a comment explaining why
Assistant: I’ve submitted the PR request with the patch and explanation; once it finishes, I can help review the final diff or PR text if you want.
This pull request was created from Copilot chat.