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
Fix FieldManager Conversion Error for CRD Updates #91873
Fix FieldManager Conversion Error for CRD Updates #91873
Conversation
/retest |
staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store.go
Outdated
Show resolved
Hide resolved
/retest |
one nit on the test to output helpful things if we don't get the error we expected Reverting the non-test portions of #91690 (which I think was the plan for 1.19?) lets this test exercise the failure condition and produces an unknown error without the accompanying store change. Are we ready to do that? |
When reverting #91690 the test here still won't fail. |
0e6c913
to
0327bd4
Compare
This line is trying to update a node that doesn't exist with a different node's client, which would have been rejected by admission previously and now receives a NotFound error. This is expected because of the order change, but represents a behavior change I probably wouldn't expect us to backport. To fix this test, you could change line 483 to: expectNotFound(t, updateNode2Status(node1Client)) and add this after the // self deletion is not allowed
expectForbidden(t, deleteNode2(node2Client))
// modification of another node's status is not allowed
expectForbidden(t, updateNode2Status(node1Client)) |
Thanks Jordan! |
/retest |
thanks, please squash, then lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kwiesmueller, 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 |
273a6bc
to
98151e5
Compare
98151e5
to
bd96178
Compare
Thanks, |
/hold Temporary hold to get prow/tide to get back on its feet. Feel free to remove hold in a few hours. |
/hold cancel |
/hold Temporary hold to get prow/tide to get back on its feet. Feel free to remove hold in a few hours. |
/test all |
/hold cancel |
/retest |
2 similar comments
/retest |
/retest |
/retest Review the full test history for this PR. Silence the bot with an |
What type of PR is this?
/kind bug
What this PR does / why we need it:
When handling a crd update, the fieldManager sometimes fails conversion of the live object an error like:
failed to update object (Update for openfaas.com/v1, Kind=Function) managed fields: failed to convert live object to proper version: /, Kind= is unstructured and is not suitable for converting to "openfaas.com/v1"
This seems to be caused by the fieldManager receiving a liveObject that is empty.
The current approach changes the Update call to not call the UpdateHandler if there is no existing object and createOnUpdate is not allowed.
This way the fieldManager never gets called.
Which issue(s) this PR fixes:
Partial fix for #90904
/sig api-machinery
/wg api-expression
/cc @apelisse @liggitt