Skip to content

fix: remove recordReceivedPrematurely check from reconciliation loop#733

Draft
mikenairn wants to merge 2 commits intoKuadrant:mainfrom
mikenairn:remove_premature_reconcile_check
Draft

fix: remove recordReceivedPrematurely check from reconciliation loop#733
mikenairn wants to merge 2 commits intoKuadrant:mainfrom
mikenairn:remove_premature_reconcile_check

Conversation

@mikenairn
Copy link
Copy Markdown
Member

@mikenairn mikenairn commented Feb 17, 2026

closes #664.

The premature reconcile check was an anti-pattern that short-circuited reconciliation mid-loop, silently blocking legitimate status updates including WriteCounter tracking. Reconciliation throttling should be handled at the queue level, not by aborting after a reconcile has started.

Also removes the now-unused --valid-for flag, validFor global, QueuedAt status field, and reconcileStart global variable.

fix: prevent deletion status flip when awaiting remote controller

ProviderEndpointsDeletion() did not account for ProviderEndpointsRemoved being a progression past the deletion stage. This caused the deletion flow to overwrite the Ready condition back to ProviderEndpointsDeletion while waiting for remote controllers to confirm removal, creating a flip loop between the two states.

Note: The "recordReceivedPrematurely" check was masking this issue hence the reason it's fixed as part of this PR.

Questions:

Having removed recordReceivedPrematurely the AwaitingValidation status and validation window generally seems pointless. It appears to have been implemented as a reconcile based count, where it will just go from ready=false, msg=AwaitingValidation in one reconcile to ready=true, msg=ProviderSuccess in the next. This now happens almost instantly due to the status update, where previously it relied on recordReceivedPrematurely preventing an update of the status until at least x amount of time had passed.

It could be updated to be time based, using the LastTransitionTime on the condition itself, which would make more sense if we were to keep it, but what is really the point of it? What does anyone gain from it existing?

Resolves Kuadrant#664. The premature reconcile check was an anti-pattern that
short-circuited reconciliation mid-loop, silently blocking legitimate
status updates including WriteCounter tracking. Reconciliation
throttling should be handled at the queue level, not by aborting after a
reconcile has started.

Also removes the now-unused --valid-for flag, validFor global, QueuedAt
status field, and reconcileStart global variable.

Signed-off-by: Michael Nairn <mnairn@redhat.com>
ProviderEndpointsDeletion() did not account for ProviderEndpointsRemoved
being a progression past the deletion stage. This caused the deletion
flow to overwrite the Ready condition back to ProviderEndpointsDeletion
while waiting for remote controllers to confirm removal, creating a flip
loop between the two states.

Signed-off-by: Michael Nairn <mnairn@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Premature reconcile check blocks publish and status update when changes exist

1 participant