-
Notifications
You must be signed in to change notification settings - Fork 54
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
Call Status.Update once in reconcile #405
Comments
I agree with. // Reconcile loop
func (r *JobSetController) Reconcile(ctx context.Context,
req reconcile.Request) (reconcile.Result, error) {
...
err := r.client.Get(ctx, req.NamespacedName, jobset)
if err != nil {
...
return reconcile.Result{}, err
}
// deploy jobset
if err = r.deployJobSet(ctx, jobset); err != nil {
...
return reconcile.Result{RequeueAfter: time.Second * 60}, err
}
// update status
if err = r.updateJobSetStatus(ctx, jobset); err != nil {
...
return reconcile.Result{}, err
}
return reconcile.Result{}, nil
} |
Thanks! @googs1025 do you want to try and address this? |
haha, thank @ahg-g ! Bug I have just learned this project lately, and I am not yet suitable to participate in such a large refactoring. I should be involved in smaller aspects first, such as unit testing or fixing spelling errors, etc. |
/assign |
Update on this: even if I remove all Status.Update calls in the jobset controller (so we are only modifying the jobset status in memory, not persisting it server side yet), then do 1 deferred Status.Update call at the end of each reconcile attempt, the integration tests are still full of At first I was thinking the tests creating/deleting child Jobs as owned resources would trigger another concurrent reconciliation attempt, which would modify the I am thinking maybe those logs are the result of the test code itself, still investigating this. |
IMO let's focus on eliminating these logs from the prod. Does your update fix the logs on a real k8s cluster? I also spent a lot of time trying to eliminate those from integration tests and I wasn't able.. |
I noticed that the logs in Kueue integration tests also have this so I was thinking it was related to the controller runtime. |
What would you like to be added:
Status().Update
is invoked multiple times in Reconcile, we should refactor the code so that it is called once.Why is this needed:
Reduces calls to the api sever and avoids conflicts in the case status is actually called more that once.
The text was updated successfully, but these errors were encountered: