-
Notifications
You must be signed in to change notification settings - Fork 234
Fix CI SIGPIPE error in categorize changes job #3152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The categorize changes job was failing with exit code 141 (SIGPIPE) due to using grep -q in a pipe. When grep -q finds a match, it exits immediately and closes the pipe, causing git diff to receive SIGPIPE if it's still writing output. This fix removes the -q flag and redirects output to /dev/null instead, allowing git diff to complete writing without hitting a broken pipe. Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jkhelil The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/lgtm |
The categorize changes job was failing with exit code 141 (SIGPIPE). This occurred because with pipefail enabled, when git diff pipes to commands like head or grep that exit early, git diff receives SIGPIPE and the entire pipeline fails with exit code 141. The issue manifests in two places: 1. `git diff | head -50` - head exits after 50 lines 2. `git diff | grep > /dev/null` - grep exits after finding matches With pipefail, these SIGPIPE failures cause the whole script to fail. Solution: Temporarily disable pipefail for the detection logic since we only care about the exit status of head/grep, not the pipe status. This completes the fix for the SIGPIPE issues identified in PRs #3150 and #3152, which addressed variable size limits and grep -q issues. Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
|
/cherry-pick release-v0.71.x |
|
❌ Cherry-pick to The automatic cherry-pick to Output: Next steps:
|
The categorize changes job was failing with exit code 141 (SIGPIPE). This occurred because with pipefail enabled, when git diff pipes to commands like head or grep that exit early, git diff receives SIGPIPE and the entire pipeline fails with exit code 141. The issue manifests in two places: 1. `git diff | head -50` - head exits after 50 lines 2. `git diff | grep > /dev/null` - grep exits after finding matches With pipefail, these SIGPIPE failures cause the whole script to fail. Solution: Temporarily disable pipefail for the detection logic since we only care about the exit status of head/grep, not the pipe status. This completes the fix for the SIGPIPE issues identified in PRs tektoncd#3150 and tektoncd#3152, which addressed variable size limits and grep -q issues. Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
Changes
The CI workflow "categorize changes" job was failing with exit code 141 (SIGPIPE). This occurred when using
grep -qin a pipe - when grep exits immediately after finding a match, it closes the pipe, causinggit diffto receive SIGPIPE if it's still writing output.This fix removes the
-qflag from grep and redirects output to/dev/nullinstead, allowinggit diffto complete writing without hitting a broken pipe.Changed files:
.github/workflows/ci.yaml- Updated NON_DOCS and YAML detection logicSubmitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
make test lintbefore submitting a PRSee the contribution guide for more details.
Release Notes