-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
Return BadRequest for invalid large patch #106576
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: liggitt The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/cc @apelisse |
heh seems you are familiar with it https://go-review.googlesource.com/c/go/+/199837 so, the test expects
kubernetes/staging/src/k8s.io/apiextensions-apiserver/test/integration/limit_test.go Line 211 in ed07515
/lgtm |
What type of PR is this?
/kind bug
/kind failing-test
Which issue(s) this PR fixes:
Fixes #106573
Before https://github.com/kubernetes/kubernetes/pull/105916/files#diff-c4afbb7d6a8bdb1d6475f18abc92caa6c413f879aeeb189187c569f3f6c146f4L366, patches over 1kb were decoded before calling into the jsonpatch library, and any errors returned as a BadRequest.
Since go1.15, the stdlib decoder enforces the stackdepth limits, so we no longer need to do the pre-decode, but we need to treat a returned error decoding the patch as a bad request.
The failing tests were marked as long tests, so they don't run in presubmits, since they submit very large patches to the API server which can stress the presubmit env.
/cc @aojea @kevindelgado