fix: don't default null replicas/readyReplicas in Readiness checks - #4905
fix: don't default null replicas/readyReplicas in Readiness checks#4905sureshmelvinsigera wants to merge 1 commit into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: sureshmelvinsigera The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
27ea3a3 to
ae9a305
Compare
|
Fixed two of the regression tests (nullReadyReplicas cases). They used replicas=3, which passed under both old and new code and didn't actually catch the bug. Changed to replicas=0, which is the case where the old default (readyReplicas=null becomes 0) would wrongly report ready. |
isReplicaSetReady and isReplicationControllerReady silently treated a null spec.replicas as 1 and null status.readyReplicas as 0, which can misreport readiness. isStatefulSetReady already had this exact issue fixed by a maintainer in a prior review - this applies the same fix to the two remaining copy-pasted methods, plus regression tests.
ae9a305 to
b9afedb
Compare
|
Some of this is philosophical, I guess. Is a replica set with zero replicas "ready" or not? Can you check what |
isReplicaSetReady and isReplicationControllerReady silently treated a null spec.replicas as 1 and null status.readyReplicas as 0, which can misreport readiness. isStatefulSetReady already had this exact issue fixed by a maintainer in a prior review - this applies the same fix to the two remaining copy-pasted methods, plus regression tests.
See bc40df9 ("Addressed comment") for the original StatefulSet fix this mirrors.