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

🌱 Improve patch helper condition logic #3169

Merged

Conversation

vincepri
Copy link
Member

@vincepri vincepri commented Jun 9, 2020

Signed-off-by: Vince Prignano [email protected]

What this PR does / why we need it:
This PR improves the logic when we're patching conditions. In more details:

  • Remove un-needed copies.
  • Always get the latest version of the object and apply the condition diff, this is required because we always patch metadata/spec/status before patching conditions, in 80% of the cases we were issuing a re-queue.

/assign @detiber @fabriziopandini
/milestone v0.3.7

@k8s-ci-robot k8s-ci-robot added this to the v0.3.7 milestone Jun 9, 2020
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 9, 2020
@k8s-ci-robot k8s-ci-robot requested review from benmoss and justinsb June 9, 2020 16:36
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 9, 2020
@vincepri vincepri force-pushed the improve-conditions-patch branch from c8cc385 to 90d6eec Compare June 9, 2020 17:14
@fabriziopandini
Copy link
Member

/approve
PR looks good to me but I leave final lgtm to @detiber

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fabriziopandini, vincepri

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:
  • OWNERS [fabriziopandini,vincepri]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

util/patch/patch.go Outdated Show resolved Hide resolved
@vincepri vincepri force-pushed the improve-conditions-patch branch from 90d6eec to deb7e2c Compare June 9, 2020 19:10
@detiber
Copy link
Member

detiber commented Jun 9, 2020

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 9, 2020
@k8s-ci-robot k8s-ci-robot merged commit 5d50848 into kubernetes-sigs:master Jun 9, 2020
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants