-
Notifications
You must be signed in to change notification settings - Fork 300
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
RequeueState isn't always reset #1821
Comments
/assign @tenzen-y |
@alculquicondor We have already configure like this: kueue/config/components/webhook/manifests.yaml Lines 254 to 274 in 0c5740d
|
So, maybe it seems not to work 🧐 |
It looks like the defaulting does work during Updates. However, webhooks cannot modify status on spec updates, or vice-versa. So in the test API call that updates the Active field, the status.requeueState doesn't change. But the next reconcile runs into this Status Update call:
And at that point the webhook clears the requeueState. So I think the correct action is to let the reconciler do the change, but on its dedicated API call. |
I agree with this. Adding a test would be better. |
That sounds reasonable. Let me try it. |
What happened:
If you introduce
g.Expect(workload.Status.RequeueState).NotTo(gomega.BeNil())
right after this line:kueue/test/integration/webhook/workload_test.go
Line 109 in 0c5740d
You will see that the object already lost the RequeueState.
This is because the workload reconciler sometimes sees the old object and produces an SSA update that still has the original object with no requeueState.
I think the webhook defaulter only applies on Create and not on Update.
We should probably reset the requeueState in the reconciler itself, but I'm not sure at which point. Unless the webhook can be configured to be called during Update?
What you expected to happen:
RequeueState to be reset
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
I discovered this in #1820, when I tried to make the reconciler only do updates when the Admission condition changes.
Environment:
kubectl version
):git describe --tags --dirty --always
):cat /etc/os-release
):uname -a
):The text was updated successfully, but these errors were encountered: