-
Notifications
You must be signed in to change notification settings - Fork 233
fix: Prevent CI job skips on PRs with large file counts #3150
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
fix: Prevent CI job skips on PRs with large file counts #3150
Conversation
- 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>
aThorp96
left a comment
There was a problem hiding this 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!
|
@aThorp96: changing LGTM is restricted to collaborators DetailsIn response to this:
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. |
|
/approve |
|
/lgtm |
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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:
|
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
.github/workflows/ci.yamlto pipe git diff directly to grep instead of storing output in variablesTesting
Verified locally with PR #3146 data (2243 files):
non-docs=false❌non-docs=true✅Submitter Checklist
make test lintbefore submitting a PRSee the contribution guide for more details.
Release Notes