Skip to content
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

cherrypicker can't create cherry-pick if PR contains more that 300 files #32405

Open
dhiller opened this issue Apr 8, 2024 · 4 comments
Open
Labels
area/prow Issues or PRs related to prow kind/bug Categorizes issue or PR as related to a bug. sig/testing Categorizes an issue or PR as relevant to SIG Testing.

Comments

@dhiller
Copy link
Contributor

dhiller commented Apr 8, 2024

What happened:

We recently stumbled over our prow cherrypicker plugin silently failing to create a cherry-pick from one of our pull requests inside the KubeVirt org.

Partial error log (for brevity):

...
"component": "cherrypicker",
  "error": "failed to get patch: status code 406 not one of [200], body: {\"message\":\"Sorry, the diff exceeded the maximum number of files (300). Consider using 'List pull requests files' API or locallycloning the repository instead.\",\"errors\":[{\"resource\":\"PullRequest\",\"field\":\"diff\",\"code\":\"too_large\"}],\"documentation_url\":\"https://docs.github.com/rest/pulls/pulls#list-pull-requests-files\"}",
...

The docs say the maximum for un-paginated access is 3000, where obviously it's "only" 300.

I didn't look at the code, but I suspect that authors did actively neglect the edge case of > 3000 files, which should rarely happen, but did happen in our case.

What you expected to happen:

We expected a cherry-pick to be created on the PR after issuing the /cherry-pick command.

How to reproduce it (as minimally and precisely as possible):
n/a

Please provide links to example occurrences, if any:
kubevirt/application-aware-quota#33 (comment)

Anything else we need to know?:
Apart from this issue I've opened a discussion on GitHub in order to clarify whether it's an API or docs bug.

@dhiller dhiller added the kind/bug Categorizes issue or PR as related to a bug. label Apr 8, 2024
@k8s-ci-robot k8s-ci-robot added the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Apr 8, 2024
@dhiller
Copy link
Contributor Author

dhiller commented Apr 8, 2024

/sig ?

@k8s-ci-robot
Copy link
Contributor

@dhiller: The label(s) sig/? cannot be applied, because the repository doesn't have them.

In response to this:

/sig ?

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.

@dhiller
Copy link
Contributor Author

dhiller commented Apr 8, 2024

/sig testing

@k8s-ci-robot k8s-ci-robot added sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Apr 8, 2024
@dhiller
Copy link
Contributor Author

dhiller commented Apr 8, 2024

/area prow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/prow Issues or PRs related to prow kind/bug Categorizes issue or PR as related to a bug. sig/testing Categorizes an issue or PR as relevant to SIG Testing.
Projects
None yet
Development

No branches or pull requests

2 participants