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

Importing the latest json patch and set the accumulated copy size limit #73713

Merged
merged 2 commits into from
Feb 7, 2019

Conversation

caesarxuchao
Copy link
Member

@caesarxuchao caesarxuchao commented Feb 4, 2019

This prevents a json patch from consuming too much memory.

The kubectl patch command implementation also invokes the json patch library to apply patch, but that's only invoked if it's a dry-run or if the local flag is set. I think for those two cases, it's better to not have a limit than having a different limit than the apiserver, so I didn't set the limit.

There are other places import the json-patch lib, but they don't apply the patch, so they don't need to set the limit.

/assign @liggitt @cjcullen
/kind bug-fix
/sig api-machinery
/release-note-none

I didn't write a release note because users shouldn't see a difference. Even without this pull, patches that violate the limit are rejected by the etcd anyway. This pull makes such requests rejected earlier in the apiserver.

@k8s-ci-robot
Copy link
Contributor

@caesarxuchao: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

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.

@k8s-ci-robot k8s-ci-robot added do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. area/apiserver sig/cli Categorizes an issue or PR as relevant to SIG CLI. labels Feb 4, 2019
@caesarxuchao caesarxuchao force-pushed the bump-json-patch-again branch 2 times, most recently from e1e5f91 to 6ed8a4b Compare February 4, 2019 20:51
@dims
Copy link
Member

dims commented Feb 5, 2019

/release-note-none

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Feb 5, 2019
@dims
Copy link
Member

dims commented Feb 5, 2019

sounds like a good thing to have in 1.14. right?

/milestone v1.14

@k8s-ci-robot k8s-ci-robot added this to the v1.14 milestone Feb 5, 2019
@caesarxuchao caesarxuchao force-pushed the bump-json-patch-again branch 3 times, most recently from 1fc1a19 to 3993ce1 Compare February 6, 2019 21:20
@liggitt liggitt added kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. labels Feb 6, 2019
@k8s-ci-robot k8s-ci-robot removed needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Feb 6, 2019
@liggitt
Copy link
Member

liggitt commented Feb 6, 2019

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 6, 2019
@k8s-ci-robot
Copy link
Contributor

[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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 6, 2019
@caesarxuchao
Copy link
Member Author

/retest

@k8s-ci-robot k8s-ci-robot merged commit b00b5d4 into kubernetes:master Feb 7, 2019
k8s-ci-robot added a commit that referenced this pull request Feb 21, 2019
…#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
…#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
…#68428-#68442-#73443-#73713-#73805-#74000-upstream-release-1.11

Automated cherry pick of #68428: vendor: bump github.com/evanphx/json-patch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/apiserver cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note-none Denotes a PR that doesn't merit a release note. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/cli Categorizes an issue or PR as relevant to SIG CLI.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants