-
Notifications
You must be signed in to change notification settings - Fork 40.9k
fix: Improve error messaging on updating a deleted object #132470
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
Conversation
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The 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-sigs/prow repository. |
Hi @michaelasp. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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-sigs/prow repository. |
/cc @richabanker |
Ran the tests with/without the fix and it fails without the code change so the test correctly validates the fix. --- FAIL: TestStoreUpdate (0.37s)
/kubernetes/staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store_test.go:800: Unexpected error: Operation cannot be fulfilled on pods.example.apiserver.k8s.io "foo": StorageError: invalid object, Code: 4, Key: /registry/pods/foo, ResourceVersion: 0, AdditionalErrorMsg: Precondition failed: UID in precondition: A, UID in object meta: |
/ok-to-test |
/lgtm |
LGTM label has been added. Git tree hash: 299cc82af76fb8d9e9091ce38b381288d36b8280
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: liggitt, michaelasp 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 |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Improves messaging on certain update cases where we should return not found when instead we return an error on preconditions
Which issue(s) this PR is related to:
Fixes #124347
Special notes for your reviewer:
Bringing #131037 across the finish line by adding tests
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: