Skip to content

[chore] fix broken pipe errors in CI pipeline#1470

Merged
mowies merged 4 commits intoopen-telemetry:mainfrom
dynatrace-oss-contrib:fix-broken-pipe
Apr 21, 2026
Merged

[chore] fix broken pipe errors in CI pipeline#1470
mowies merged 4 commits intoopen-telemetry:mainfrom
dynatrace-oss-contrib:fix-broken-pipe

Conversation

@mowies
Copy link
Copy Markdown
Member

@mowies mowies commented Apr 21, 2026

Fix intermittent CI failures caused by broken pipe in validate-components.sh

printf '%s\n' "$valid_components" | grep -qxF "$component" was intermittently failing under set -o pipefail. When grep -q finds a match it exits early, closing the pipe while printf is still writing — causing printf to receive SIGPIPE (exit 141). With pipefail, the pipeline returns 141 (non-zero), and the surrounding if ! negates it to true, incorrectly treating valid components as missing and failing the build.

Fixed by replacing the pipe with a here-string (<<< "$valid_components"), which passes the data directly to grep with no pipe involved.

Example failing runs:

This was implemented using Claude Code.

@mowies mowies requested a review from a team as a code owner April 21, 2026 09:46
@mowies mowies requested a review from TylerHelmuth April 21, 2026 09:46
@mowies mowies changed the title fix broken pipe errors in CI pipeline [chore] fix broken pipe errors in CI pipeline Apr 21, 2026
Replace `printf | grep -q` with a here-string to prevent SIGPIPE errors.
@mowies
Copy link
Copy Markdown
Member Author

mowies commented Apr 21, 2026

the fix from the last commit seems to work here as well 👍🏼
reverting, since it's content from a different PR

Copy link
Copy Markdown
Member

@douglascamata douglascamata left a comment

Choose a reason for hiding this comment

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

This intermittent failure has been bugs us since a long time. I'm more than happy if this solves the issue.

@mowies mowies added this pull request to the merge queue Apr 21, 2026
Merged via the queue into open-telemetry:main with commit 5ed0d86 Apr 21, 2026
105 checks passed
@mowies mowies deleted the fix-broken-pipe branch April 21, 2026 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants