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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰Check errors for IsNotFound after patching spec and status #10787

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

troy0820
Copy link
Member

@troy0820 troy0820 commented Jun 21, 2024

What this PR does / why we need it:
This allows the patch helper to ignore patching the status when creating a patch.

The solution for the issue below was to check the object if the finalizers are removed and if the DeletionTimeStamp was not nil and the error after patching the status/spec was IsNotFound. This will cut down on noise as well as achieve with not exposing the internals of the patch helper.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):

Fixes #10786

/area util

@k8s-ci-robot k8s-ci-robot added area/util Issues or PRs related to utils cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jun 21, 2024
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jun 21, 2024
@troy0820 troy0820 force-pushed the troy0820/patch-ignore-option branch from 2d389a3 to d6ac4de Compare June 21, 2024 15:42
util/patch/options.go Outdated Show resolved Hide resolved
util/patch/patch_test.go Outdated Show resolved Hide resolved
util/patch/patch_test.go Outdated Show resolved Hide resolved
@troy0820 troy0820 force-pushed the troy0820/patch-ignore-option branch from d6ac4de to 13dba33 Compare June 21, 2024 17:16
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 21, 2024
@troy0820 troy0820 force-pushed the troy0820/patch-ignore-option branch 2 times, most recently from 0b48a19 to 42fa16e Compare June 21, 2024 22:15
@vincepri
Copy link
Member

/hold

going to comment on the issue on the reasoning for the hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 24, 2024
@troy0820 troy0820 force-pushed the troy0820/patch-ignore-option branch from 42fa16e to 1a51016 Compare July 11, 2024 13:39
@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 11, 2024
@troy0820 troy0820 changed the title 鉁–reate StatusIgnore helper option for PatchHelper 馃悰Check errors for IsNotFound after patching spec and status Jul 11, 2024
util/patch/patch.go Outdated Show resolved Hide resolved
@troy0820
Copy link
Member Author

/assign @sbueringer

@troy0820 troy0820 force-pushed the troy0820/patch-ignore-option branch from 1a51016 to 120874b Compare July 12, 2024 13:18
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from sbueringer. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

@troy0820 troy0820 requested a review from sbueringer July 12, 2024 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/util Issues or PRs related to utils cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding Patch Option to the patch helper to ignore patching the status
5 participants