-
Notifications
You must be signed in to change notification settings - Fork 48
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
Update observedGeneration
in reconcileStatus flow instead of reconcileSpec flow
#996
Merged
shreyas-s-rao
merged 6 commits into
gardener:master
from
shreyas-s-rao:fix/status-update
Feb 7, 2025
Merged
Update observedGeneration
in reconcileStatus flow instead of reconcileSpec flow
#996
shreyas-s-rao
merged 6 commits into
gardener:master
from
shreyas-s-rao:fix/status-update
Feb 7, 2025
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/assign |
1f64a3d
to
97282ed
Compare
@seshachalam-yv thanks a lot for your inputs. As discussed, I have made the following changes to streamline the reconciliation flow. Changes made in 97282ed:
|
unmarshall
requested changes
Feb 6, 2025
…econciliation information to subsequent steps
…ata` and `GetBoolValueOrDefault()` function
0f9cdd8
to
8c92e58
Compare
…lt()` function to `GetBoolValueOrError()` to not swallow errors
… which runs `updateObservedGeneration()` and `removeOPerationAnnotation()`
unmarshall
approved these changes
Feb 7, 2025
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.
/lgtm
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/usability
Usability related
kind/impediment
Something that impedes developers, operators, users or others in their work
needs/ok-to-test
Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD)
needs/second-opinion
Needs second review by someone else
size/l
Size of pull request is large (see gardener-robot robot/bots/size.py)
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
How to categorize this PR?
/area usability
/kind impediment
What this PR does / why we need it:
Follow-up to #987
This PR enhances the reconciliation flow such that
observedGeneration
is updated inreconcileStatus
flow instead ofreconcileSpec
flow.Reason: Upon a spec reconciliation request (spec change or
gardener.cloud/operation: reconcile
annotation, depending on the reconcile strategy), theobservedGeneration
was updated inreconcileSpec
flow, while the other status fields likeconditions
, sts-related fields, etc were updated later inreconcileStatus
flow. After the user updates the spec, and waits for the spec changes to be reflected in the etcd cluster (which are accurately reflected by conditions), it can so happen that theobservedGeneration
is updated first, followed by a gap before the conditions are updated. This can lead to instances when the user watches the status and assumes that the spec has been fully reconciled and pods are updated with latest changes, because the previous conditions still applied while the observed generation got updated.To avoid this, the
observedGeneration
will now be updated along with the rest of the status fields, in one single status patch call, so that at any given point of time, the user can check bothstatus.observedGeneration
andstatus.conditions
to know whether the spec changes have been fully rolled out.Additionally, the operation annotation is conditionally removed at the end of both spec and status reconciliation, to ensure that any failure in either spec or status reconciliation will result in a fresh spec reconciliation upon requeue, and will not get missed. This will ensure that the
observedGeneration
gets correctly updated, even if druid restarts in between reconciliation flow.Which issue(s) this PR fixes:
Fixes #985
Special notes for your reviewer:
/invite @unmarshall
/assign @unmarshall
/cc @timuthy
Release note: