Nick Dimiduk created YETUS-1263:
-----------------------------------
Summary: github_locate_pr_patch fails with misleading error when
PR exceeds GitHub's 300-file diff limit
Key: YETUS-1263
URL: https://issues.apache.org/jira/browse/YETUS-1263
Project: Yetus
Issue Type: Improvement
Components: Precommit
Affects Versions: 0.15.0
Reporter: Nick Dimiduk
When a GitHub PR changes more than 300 files, the GitHub API returns HTTP 406
on the patch/diff endpoints:
GET /repos/{owner}/{repo}/pulls/{number}
Accept: application/vnd.github.v3.patch
→ 406: "Sorry, the diff exceeded the maximum number of files (300)"
Yetus uses curl --fail to download the patch at github.sh:413, which converts
the 406 to a non-zero exit. The error path logs "github_locate_patch: not a
github pull request." and then "ERROR: Unsure how to
process GH:####. Permissions missing?" — both misleading.
The entire precommit run aborts before performing any checks.
Observed on: apache/hbase PR #7722 (340 changed files)
- https://github.com/apache/hbase/pull/7722
- CI run:
https://github.com/apache/hbase/actions/runs/22135481810/job/64017879281
--
This message was sent by Atlassian Jira
(v8.20.10#820010)