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

Limit the number of operations in a single json patch to be 10,000 #74000

Merged
merged 1 commit into from Feb 14, 2019

Conversation

@caesarxuchao
Copy link
Member

caesarxuchao commented Feb 13, 2019

/kind bug
/sig api-machinery
/assign

The apiserver, including both the kube-apiserver and apiservers built with the generic apiserver library, will now return 413 RequestEntityTooLarge error if a json patch contains more than 10,000 operations.

@caesarxuchao caesarxuchao force-pushed the caesarxuchao:json-patch-operations branch from 95acaf9 to 5e6fc5d Feb 13, 2019

@caesarxuchao

This comment has been minimized.

Copy link
Member Author

caesarxuchao commented Feb 13, 2019

/unassign
/assign @liggitt @cjcullen

@@ -331,6 +336,11 @@ func (p *jsonPatcher) applyJSPatch(versionedJS []byte) (patchedJS []byte, retErr
if err != nil {
return nil, errors.NewBadRequest(err.Error())
}
if len(patchObj) > maxJSONPatchOperations {
return nil, errors.NewRequestEntityTooLargeError(

This comment has been minimized.

@caesarxuchao

caesarxuchao Feb 13, 2019

Author Member

I had also considered 422 unprocessable entity, but that's for semantic error.

@caesarxuchao caesarxuchao removed their assignment Feb 13, 2019

@liggitt

This comment has been minimized.

Copy link
Member

liggitt commented Feb 13, 2019

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm label Feb 13, 2019

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Feb 13, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: caesarxuchao, 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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 508a4f7 into kubernetes:master Feb 14, 2019

17 checks passed

cla/linuxfoundation caesarxuchao authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-cross Skipped
pull-kubernetes-e2e-gce Job succeeded.
Details
pull-kubernetes-e2e-gce-100-performance Job succeeded.
Details
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-godeps Job succeeded.
Details
pull-kubernetes-integration Job succeeded.
Details
pull-kubernetes-kubemark-e2e-gce-big Job succeeded.
Details
pull-kubernetes-local-e2e Skipped
pull-kubernetes-local-e2e-containerized Skipped
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-typecheck Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details
pull-publishing-bot-validate Skipped
tide In merge pool.
Details

k8s-ci-robot added a commit that referenced this pull request Feb 21, 2019

Merge pull request #74104 from caesarxuchao/automated-cherry-pick-of-…
…#73443-#73713-#73805-#74000-upstream-release-1.12

Automated cherry pick of #73443: update json-patch to pick up bug fixes

k8s-ci-robot added a commit that referenced this pull request Feb 21, 2019

Merge pull request #74102 from caesarxuchao/automated-cherry-pick-of-…
…#73443-#73713-#73805-#74000-upstream-release-1.13

Automated cherry pick of #73443: update json-patch to pick up bug fixes

k8s-ci-robot added a commit that referenced this pull request Feb 23, 2019

Merge pull request #74106 from caesarxuchao/automated-cherry-pick-of-…
…#68428-#68442-#73443-#73713-#73805-#74000-upstream-release-1.11

Automated cherry pick of #68428: vendor: bump github.com/evanphx/json-patch
@dims

This comment has been minimized.

Copy link
Member

dims commented Mar 1, 2019

related to #74534

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.