Skip to content

Conversation

@vdemeester
Copy link
Member

Changes

The CI workflow "categorize changes" job was failing with exit code 141 (SIGPIPE). This occurred when using grep -q in a pipe - when grep exits immediately after finding a match, it closes the pipe, causing git diff to receive SIGPIPE if it's still writing output.

This fix removes the -q flag from grep and redirects output to /dev/null instead, allowing git diff to complete writing without hitting a broken pipe.

Changed files:

  • .github/workflows/ci.yaml - Updated NON_DOCS and YAML detection logic

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

See the contribution guide for more details.

Release Notes

NONE

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>
@tekton-robot tekton-robot added the release-note-none Denotes a PR that doesnt merit a release note. label Jan 12, 2026
@tekton-robot tekton-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jan 12, 2026
@jkhelil
Copy link
Member

jkhelil commented Jan 12, 2026

/approve

@tekton-robot
Copy link
Contributor

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 12, 2026
@jkhelil
Copy link
Member

jkhelil commented Jan 12, 2026

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 12, 2026
@tekton-robot tekton-robot merged commit b55ef48 into tektoncd:main Jan 12, 2026
13 checks passed
vdemeester added a commit that referenced this pull request Jan 13, 2026
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>
@jkhelil
Copy link
Member

jkhelil commented Jan 13, 2026

/cherry-pick release-v0.71.x

@tekton-robot
Copy link
Contributor

Cherry-pick to release-v0.71.x failed!

The automatic cherry-pick to release-v0.71.x failed.

Output:

🤖 Starting cherry-pick process...
Fetching PR #3152 information...
Found merge commit: b55ef4800528dd797fb424f845df4acb1552121a
PR title: Fix CI SIGPIPE error in categorize changes job
Fetching target branch: release-v0.71.x...
From https://github.com/tektoncd/operator
 * branch                release-v0.71.x -> FETCH_HEAD
Checking for existing cherry-pick PR...
Creating cherry-pick branch: cherry-pick-3152-to-release-v0.71.x...
Switched to a new branch 'cherry-pick-3152-to-release-v0.71.x'
branch 'cherry-pick-3152-to-release-v0.71.x' set up to track 'origin/release-v0.71.x'.
Cherry-picking commit b55ef4800528dd797fb424f845df4acb1552121a...
CONFLICT (modify/delete): .github/workflows/ci.yaml deleted in HEAD and modified in b55ef4800 (Fix CI SIGPIPE error in categorize changes job).  Version b55ef4800 (Fix CI SIGPIPE error in categorize changes job) of .github/workflows/ci.yaml left in tree.
error: could not apply b55ef4800... Fix CI SIGPIPE error in categorize changes job
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
❌ ERROR: Cherry-pick failed due to conflicts or other errors.

Next steps:

  • Check the action logs for complete details
  • If the PR is not merged, merge it first and try again
  • If there are conflicts, you'll need to manually cherry-pick this PR

pramodbindal pushed a commit to openshift-pipelines/operator-multicluster that referenced this pull request Jan 16, 2026
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesnt merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants