[oadp-1.6] fix: recognize VirtualMachineBackup's renamed Complete condition - #215
Conversation
Reported cross-session from a live nightly-KubeVirt (v1.20.0) e2e run:
evaluateVMBackupStatus/isVMBTerminal only recognize
kubevirtbackupv1alpha1.ConditionDone ("Done"), but virt-controller's
CBT backup path renamed that condition type to "Complete" starting
with nightly v1.20.0. doneCond stays nil forever against that version,
so the controller loops "VirtualMachineBackup in progress, requeuing"
until Spec.OperationTimeout, even though vmb.Status.Conditions already
has Complete=True (observed live: 243 repeats of that log line, then a
20-minute context deadline exceeded) -- the VMB itself completed fine.
Our vendored kubevirt.io/api (v1.8.0-alpha.0) predates the rename and
has no ConditionComplete constant, so add it locally as the literal
string virt-controller actually emits, and recognize it alongside the
existing ConditionDone in both places that scan for it.
Tests: new table cases in TestHandleAccepted_VMBStatusDetection and
TestIsVMBTerminal pin the exact scenario reported (Complete=True,
Reason=CompletedWithWarning) transitioning to Prepared/terminal
instead of stalling.
Signed-off-by: Tiger Kaovilai <passawit.kaovilai@gmail.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kaovilai, openshift-cherrypick-robot, shubham-pampattiwar The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/test virt-kdm-e2e-test-aws |
|
/test virt-kdm-e2e-test-aws -- infra flake: DNS resolution timeout reaching the API server mid-exec ( Note Responses generated with Claude |
This is an automated cherry-pick of #208
/assign kaovilai