fix: properly return errors when removing Database finalizers#9431
Merged
leonardoce merged 2 commits intomainfrom Dec 15, 2025
Merged
fix: properly return errors when removing Database finalizers#9431leonardoce merged 2 commits intomainfrom
leonardoce merged 2 commits intomainfrom
Conversation
Contributor
|
❗ By default, the pull request is configured to backport to all release branches.
|
Member
Author
|
/test |
Contributor
|
@mnencia, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/20222740439 |
armru
approved these changes
Dec 15, 2025
Member
|
/test limit=local |
Contributor
|
@armru, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/20230890606 |
When a Cluster is deleted, the operator attempts to remove finalizers from owned Database objects via notifyDeletionToOwnedResources(). However, errors from this function were being logged but not returned due to variable shadowing with :=, causing the reconciler to return success even when finalizer removal failed. This meant Kubernetes would not requeue the reconciliation, leaving Database finalizers orphaned permanently. The fix collects errors from both deleteDanglingMonitoringQueries and notifyDeletionToOwnedResources, then returns them via errors.Join to ensure proper reconciliation retry on failure. Related to #9430 Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Member
Author
|
/ok-to-merge E2E green, one unrelated failure |
leonardoce
approved these changes
Dec 15, 2025
Closed
4 tasks
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.
Closes #9430