Repository navigation
fix: recognize VirtualMachineBackup's renamed Complete condition - #208
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>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe controller now recognizes KubeVirt nightly ChangesVMB Complete condition support
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The controller now recognizes both old and renamed VirtualMachineBackup completion conditions, restoring expected completion handling without changing interfaces or dependencies. No actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Would we be handling periodic bumps + code changes as a long term fix? |
Yes, always. |
…penshift#212 fix build Lets the incremental-sequence spec actually validate migtools/kubevirt-datamover-controller#208 and openshift#212 (both unmerged upstream) instead of self-skipping on the known flake pattern every run. Uses DPA's spec.unsupportedOverrides (kubevirtDatamoverControllerImageFqin), not a direct Deployment/manifest patch, so it's a pure e2e-test-time override with no manifest churn. Remove once openshift#208/openshift#212 merge upstream and a release picks them up. Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
…two unmerged upstream PRs Lets the incremental-sequence spec actually validate migtools/kubevirt-datamover-controller#208 and migtools/kubevirt-datamover-controller#212 (both unmerged upstream) instead of self-skipping on the known flake pattern every run. Uses DPA's spec.unsupportedOverrides (kubevirtDatamoverControllerImageFqin), not a direct Deployment/manifest patch, so it's a pure e2e-test-time override with no manifest churn. Remove once those two PRs merge upstream and a release picks them up. Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
…d confirmed live Verified against a real cluster (2026-08-29, AWS amd64) with the combined-208-212-test override image: the incremental-sequence spec ran to a genuine PASS in 7m20s with zero occurrences of either pattern's string in the whole run's logs -- previously this spec reliably flake-skipped within ~20 minutes on one or both patterns. See migtools/kubevirt-datamover-controller#208 and migtools/kubevirt-datamover-controller#212. Drops the two now-dead FlakePattern entries and the CheckIfFlakeOccurred- level tests that specifically exercised them; keeps the FilterLogLinesContaining-level tests and their real captured fixture data, which remain valid regardless of the pattern registry's contents. Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
|
Live end-to-end validation confirmed (cross-session): the combined test image (this fix + #212) ran the The now-obsolete flake-pattern workaround for this bug has been removed from oadp-operator's e2e suite (openshift/oadp-operator#2404). Note Responses generated with Claude |
…s warning RunMustGather's check treated ANY content in the must-gather summary's "## Errors" section as a hard failure. The summary generator flags any DPA using spec.unsupportedOverrides at all as a warning, regardless of key or reason, since that field is inherently "unsupported" -- purely informational, not an actual problem. This broke live: adding a single test-time kdm-controller image override to the shared dpaCR (for validating migtools/kubevirt-datamover-controller#208 and migtools/kubevirt-datamover-controller#212 before they merge) made every e2e job's must-gather check fail, including completely unrelated CLI suites -- confirmed on ci/prow/5.0-e2e-test-cli-aws and ci/prow/5.1-e2e-test-cli-aws. Now tolerates that one specific, expected warning line while still failing on any other content in the Errors section. Verified against the real captured summary text from the failing 5.1-e2e-test-cli-aws run. Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
|
/cherry-pick oadp-1.6 |
|
@kaovilai: once the present PR merges, I will cherry-pick it on top of DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Joeavaikath, kaovilai, shubham-pampattiwar, sseago 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 |
|
/lgtm |
|
@kaovilai: new pull request created: #215 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
…two unmerged upstream PRs Lets the incremental-sequence spec actually validate migtools/kubevirt-datamover-controller#208 and migtools/kubevirt-datamover-controller#212 (both unmerged upstream) instead of self-skipping on the known flake pattern every run. Uses DPA's spec.unsupportedOverrides (kubevirtDatamoverControllerImageFqin), not a direct Deployment/manifest patch, so it's a pure e2e-test-time override with no manifest churn. Remove once those two PRs merge upstream and a release picks them up. Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
Verified against a real cluster (2026-08-29, AWS amd64) with the combined-208-212-test override image: the incremental-sequence spec ran to a genuine PASS in 7m20s with zero occurrences of either pattern's string in the whole run's logs -- previously this spec reliably flake-skipped within ~20 minutes on one or both patterns. See migtools/kubevirt-datamover-controller#208 and migtools/kubevirt-datamover-controller#212. Drops the two now-dead FlakePattern entries and the CheckIfFlakeOccurred- level tests that specifically exercised them; keeps the FilterLogLinesContaining-level tests and their real captured fixture data, which remain valid regardless of the pattern registry's contents. Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
…s warning RunMustGather's check treated ANY content in the must-gather summary's "## Errors" section as a hard failure. The summary generator flags any DPA using spec.unsupportedOverrides at all as a warning, regardless of key or reason, since that field is inherently "unsupported" -- purely informational, not an actual problem. This broke live: adding a single test-time kdm-controller image override to the shared dpaCR (for validating migtools/kubevirt-datamover-controller#208 and migtools/kubevirt-datamover-controller#212 before they merge) made every e2e job's must-gather check fail, including completely unrelated CLI suites -- confirmed on ci/prow/5.0-e2e-test-cli-aws and ci/prow/5.1-e2e-test-cli-aws. Now tolerates that one specific, expected warning line while still failing on any other content in the Errors section. Verified against the real captured summary text from the failing 5.1-e2e-test-cli-aws run. Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
Summary
Reported cross-session from a live nightly-KubeVirt (v1.20.0) e2e run: a fourth, distinct issue found while testing oadp-operator#2404, unrelated to CNV-85377 or the #207 annotation race. Fixes #209.
Root cause
evaluateVMBackupStatus/isVMBTerminalonly recognizekubevirtbackupv1alpha1.ConditionDone("Done"), but virt-controller's CBT backup path renamed that condition type to"Complete"starting with nightly v1.20.0.doneCondstays nil forever against that version, so the controller loops"VirtualMachineBackup in progress, requeuing"untilSpec.OperationTimeout-- observed live: 243 repeats of that log line, then a 20-minute context deadline exceeded -- even thoughvmb.Status.Conditionsalready hasComplete=True, reason=CompletedWithWarning. The backup itself completed fine; the controller just never recognized it.Fix
Our vendored
kubevirt.io/api(v1.8.0-alpha.0) predates the rename and has noConditionCompleteconstant, so add it locally as the literal string virt-controller actually emits ("Complete"), and recognize it alongside the existingConditionDonein both places that scan for it (evaluateVMBackupStatusandisVMBTerminal).Bumping
kubevirt.io/apiinstead was considered and rejected for this fix: v1.8.0-alpha.0 to whatever version introducedConditionCompleteis a large jump with its own unrelated API-surface risk, whereas accepting both condition names is a minimal, backward- and forward-compatible change.Test plan (TDD)
New table cases in
TestHandleAccepted_VMBStatusDetectionandTestIsVMBTerminalpin the exact scenario reported (Complete=True,Reason=CompletedWithWarning) transitioning toPrepared/terminal instead of stalling.go build ./...go vet ./...go test ./...make lintNote
Responses generated with Claude