-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
The fake client should be able to cl.Update(...)
an object after calling cl.Status().Update(...)
#2487
Comments
/kind support Wouldn't what you propose, make the object re-queue after the first update? Meaning, it wouldn't even get to the status update. If you want to update the status, then you could update that first and not requeue by writing a predicate for that so it won't requeue on status updates. I'm trying to understand this case where it wouldn't requeue as an event for update to allow you to get to the status update. |
While this is a good suggestion, I think we should still have the fake client match the behavior of the real client for ResourceVersion during |
The behavior from my understanding doesn't allow this. If you update an object that changes the resource version of that object and trying to update it again (any client, status included) without getting the latest resource would result in a conflict. Patching doesn't do this but with update it respects the resource version as part of its check to allow it to go through. We have a check that errors if the resource version isn't the same to mimic this behavior of what the apiserver does. @alvaroaleman thoughts? |
Using my example CR
These tests pass with this output:
|
This behavior of the real client suggests that when |
Yeah, Berlin Ab is right, I introduced this bug yesterday. My bad and good catch. Will file a fix |
/remove-kind support |
Here's a Draft PR that tests the behavior:
#2486
This is using the main branch.
The text was updated successfully, but these errors were encountered: