fix stuck finalizer on delete - #173
Open
evhen14 wants to merge 1 commit into
Open
Conversation
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
Author
|
I have read the CLA Document and I hereby sign the CLA |
Author
|
recheck |
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.
Bug Fix
What Changed
When deleting a
RestateDeployment, the finalizer no longer gets permanentlystuck with
CleanupFailed(DeploymentInUse). Previously,cleanup_old_replicasetstreated the latest ReplicaSet's Restate deployment as an unconditional blocker
because it is always
active = trueinsys_service. Since no new versionever registers during deletion, the
active_count > 0check caused an infiniteretry loop with no way out.
When
rsd.deletion_timestamp.is_some(), active deployments are now scheduledfor drain (respecting
spec.restate.drainDelaySeconds) rather than treated asa permanent blocker. After the drain period they proceed through the existing
force-delete path.
Why This Matters
This is the common case in ephemeral PR/preview environments: a service is
deployed, registered with Restate, but no workflows are ever invoked before the
environment is torn down. Without this fix, deleting the
RestateDeploymentwould stall forever and require manual intervention to remove the finalizer.
Impact on Users
RestateDeploymentobjects willmake progress on the next reconcile after upgrading.
Restate deployment is force-deleted and the finalizer released.
Related Issues