-
Notifications
You must be signed in to change notification settings - Fork 10
Add early returns on resource changes in ServerReconciler
#539
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
base: main
Are you sure you want to change the base?
Conversation
f546819 to
bb88898
Compare
|
Thanks, could you please remove the changes of #540 from this PR? |
I will rebase once that PR merges. this PR will fail unit tests without the test fixes in the other PR :D |
bb88898 to
7653c40
Compare
d927d4a to
0026018
Compare
will remove this commit once PR 549 merges
62148fd to
099672c
Compare
This reverts commit 099672c.
| if modified { | ||
| return ctrl.Result{}, nil | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not doing this right after the ensureServerStateTransition call?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest doing something like that here:
if modified, err := r.ensureServerStateTransition(ctx, log, bmcClient, server); err != nil || modified {
return ctrl.Result{}, err
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because we like to update the status field before ending the reconcile... as use the status field to make decision in beginning of reconcile loop, i wanted to update the status before next reconcile.
I know updating status might modify the CRD by itself.. but I think that next improvement to tackle, what do you think?
ServerReconciler
Proposed Changes
Server Reconciler avoid double reconciliation logic. This helps avoid overloading BMC, multiple reconcile during sequencial l update