Skip to content

Conversation

@vdemeester
Copy link
Member

Changes

Fixes CI job detection failure on PRs with large file counts (1000+ files).

Problem

PRs like #3146 and #2914 with vendor updates (2000+ changed files) had their CI builds incorrectly skipped. The detection logic stored all filenames in a bash variable which exceeded size limits, causing grep to fail and falsely report non-docs=false.

Solution

  • Changed .github/workflows/ci.yaml to pipe git diff directly to grep instead of storing output in variables
  • Avoids bash variable size limits by using command substitution with direct piping
  • Added file count display for better debugging

Testing

Verified locally with PR #3146 data (2243 files):

  • Old logic: non-docs=false
  • New logic: non-docs=true

Submitter Checklist

  • Run make test lint before submitting a PR
  • Includes tests (if functionality changed/added) - N/A: CI workflow change only
  • Includes docs (if user facing) - N/A: Internal CI fix
  • Commit messages follow commit message best practices

See the contribution guide for more details.

Release Notes

NONE

- Resolve false negatives when detecting non-doc changes in 1000+ file PRs
- Avoid bash variable size limits by piping git diff directly to grep
- Ensure vendor updates trigger required builds and tests

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/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jan 12, 2026
Copy link
Member

@aThorp96 aThorp96 left a comment

Choose a reason for hiding this comment

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

/lgtm

Thanks for catching!

@tekton-robot
Copy link
Contributor

@aThorp96: changing LGTM is restricted to collaborators

Details

In response to this:

/lgtm

Thanks for catching!

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@jkhelil
Copy link
Member

jkhelil commented Jan 12, 2026

/approve

@jkhelil
Copy link
Member

jkhelil commented Jan 12, 2026

/lgtm

@tekton-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aThorp96, 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
@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 e9d6014 into tektoncd:main Jan 12, 2026
13 checks passed
@vdemeester vdemeester deleted the fix/ci-detection-large-prs branch January 12, 2026 15:15
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 #3150 information...
Found merge commit: e9d6014898da131c8a2f7c78a206e8a84c10232c
PR title: fix: Prevent CI job skips on PRs with large file counts
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-3150-to-release-v0.71.x...
Switched to a new branch 'cherry-pick-3150-to-release-v0.71.x'
branch 'cherry-pick-3150-to-release-v0.71.x' set up to track 'origin/release-v0.71.x'.
Cherry-picking commit e9d6014898da131c8a2f7c78a206e8a84c10232c...
CONFLICT (modify/delete): .github/workflows/ci.yaml deleted in HEAD and modified in e9d601489 (fix: Prevent CI job skips on PRs with large file counts).  Version e9d601489 (fix: Prevent CI job skips on PRs with large file counts) of .github/workflows/ci.yaml left in tree.
error: could not apply e9d601489... fix: Prevent CI job skips on PRs with large file counts
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

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/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants