Repository navigation
fix: do not count Succeeded Pods as living replicas - #63
Merged
Merged
Conversation
is_deployment_stopped counted a Pod in phase Succeeded as a living replica,
so a Deployment holding one was never seen as stopped and the migration
waited for it.
The terminal-phase test also read ("Failed"), a string, so `not in` was a
substring test instead of a membership test.
Same fix as wiremind-kubernetes 7.7.2, which this helper was ported from.
arthlr
approved these changes
Oct 6, 2026
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.
Summary
is_deployment_stoppedno longer counts a Pod in phaseSucceeded(Completed) as a living replica.Chartreuse no longer depends on wiremind-kubernetes:
src/chartreuse/kubernetes_helper.pyis a trimmed port ofKubernetesDeploymentManager, and it carried the same defect. Upgrading the library would not have reached this code.Defects
Succeededis a terminal phase, likeFailed. A Pod in this phase holds no resource.("Failed")is a string, not a tuple, sonot inwas a substring test.Both are fixed by a module-level
TERMINAL_POD_PHASES = ("Failed", "Succeeded").Evidence
Monitoring over 2026-09-17/09-20 shows Pods owned by a ReplicaSet staying in phase
Succeededfor the whole 72-hour window, across about 25 namespaces. On 2026-09-18,cargo-staging-spv1held its webserver, workers, build and business-metrics Deployments inSucceededat the same time, during a deployment.Tests
test_is_deployment_stoppedis parametrized overFailed,Succeeded,RunningandPending. The last two guard the membership test.Release
VERSION and CHANGELOG moved to 7.0.2.
Same fix as wiremind-kubernetes #99, released in 7.7.2.
Tracking: TASKS2-4327