Recover from drifted Ready/Released status conditions - #1580
Merged
matheuscscp merged 1 commit intoSep 2, 2026
Conversation
When a post-action status condition patch failed for a HelmRelease that was just installed or upgraded (e.g. due to version conflicts), but history was successfully persisted, a HelmRelease could be stranded with `Ready=Unknown` while actually being completely installed in the cluster. Subsequent reconciliations of the HelmRelease would not correct that drift as the pre-existing correction mechanism required a `Released` status condition to exist. However, since that would've been created in the same patch as the missing `Ready` update, that would always fail. This fix extends the existing correction mechanism to allow for a missing `Released` status condition, in which case it will resort to `status.lastAttemptedReleaseAction` or `status.history` to determine the desired state for `Ready` and `Released`. Signed-off-by: Peter Bücker <peter.buecker@form3.tech> Assisted-by: cursor/grok-4.6
matheuscscp
approved these changes
Sep 2, 2026
matheuscscp
left a comment
Member
There was a problem hiding this comment.
LGTM! Thanks @peterbuecker-form3
Member
|
Successfully created backport PR for |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
When a post-action status condition patch failed for a HelmRelease that was just installed or upgraded (e.g. due to version conflicts), but history was successfully persisted, a HelmRelease could be stranded with
Ready=Unknownwhile actually being completely installed in the cluster.Subsequent reconciliations of the HelmRelease would not correct that drift as the pre-existing correction mechanism required a
Releasedstatus condition to exist. However, since that would've been created in the same patch as the missingReadyupdate, that would always fail.This fix extends the existing correction mechanism to allow for a missing
Releasedstatus condition, in which case it will resort tostatus.lastAttemptedReleaseActionorstatus.historyto determine the desired state forReadyandReleased.Fixes: #1409
Proof of work
The PR was tested against the reproduction case shared in #1409 (comment). The patch was successful in correct the drifted
ReadyandReleasedstatus conditions. The existing table tests for similar scenarios were extended with new test cases covering the specific situation addressed here.