Skip to content

Update e2e and kubevirt-dm design to use custom volume policy#2254

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:oadp-devfrom
sseago:custom-volume-policy
Jun 27, 2026
Merged

Update e2e and kubevirt-dm design to use custom volume policy#2254
openshift-merge-bot[bot] merged 1 commit into
openshift:oadp-devfrom
sseago:custom-volume-policy

Conversation

@sseago

@sseago sseago commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Why the changes were made

Updates e2e tests to use custom volume policy instead of skip. Currently, this PR breaks tests, but once migtools/kubevirt-datamover-plugin#23 merges, this PR will be needed to fix tests.

With the plugin change, instead of a skip policy action, the following is needed in the matching volume policy to trigger kubevirt-dm backups:

      action:
        type: custom
        parameters:
          datamover: kubevirt

How to test the changes made

Summary by CodeRabbit

  • New Features

    • Enhanced volume policy handling so kubevirt datamover activation is driven by a custom policy action with parameter datamover: kubevirt.
    • Tightened policy eligibility: datamover selection occurs only when matching PVCs are present and no PVCs use unsupported actions.
  • Documentation

    • Updated incremental kubevirt datamover design notes to reflect the revised volume policy and activation rules.
  • Tests

    • Updated end-to-end sample and backup policy data to use action.type: custom and include parameters.datamover: kubevirt.

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: f7f55bc4-6e2a-43c5-84f4-5715867ff510

📥 Commits

Reviewing files that changed from the base of the PR and between c11d87d and 48ceb61.

📒 Files selected for processing (3)
  • docs/design/kubevirt-datamover.md
  • tests/e2e/lib/backup.go
  • tests/e2e/sample-applications/virtual-machines/kubevirt-dm/volume-policy.yaml
✅ Files skipped from review due to trivial changes (1)
  • docs/design/kubevirt-datamover.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • tests/e2e/sample-applications/virtual-machines/kubevirt-dm/volume-policy.yaml
  • tests/e2e/lib/backup.go

Walkthrough

The PR updates the kubevirt datamover design text and e2e volume-policy fixtures to use custom volume policy actions with datamover: kubevirt instead of the previous action value.

Changes

KubeVirt datamover policy update

Layer / File(s) Summary
Policy contract updates
docs/design/kubevirt-datamover.md
The design doc now describes custom volume policy actions with datamover: kubevirt and the updated PVC policy checks.
E2E volume policy fixtures
tests/e2e/lib/backup.go, tests/e2e/sample-applications/virtual-machines/kubevirt-dm/volume-policy.yaml
The embedded and sample volume policy YAML now use action.type: custom with parameters.datamover: kubevirt.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 14 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The rationale is present, but the required How to test section is empty and needs concrete verification steps. Add the commands or steps used to verify the new custom volume policy, or explicitly state if no tests were run.
✅ Passed checks (14 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: switching e2e and kubevirt-dm design to custom volume policy.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed The PR changes only docs, a helper YAML blob, and a ConfigMap manifest; no Ginkgo titles were added or modified, and the changed files contain no It/Describe/Context/When calls.
Test Structure And Quality ✅ Passed The PR only changes policy data/docs; it adds no new Ginkgo It blocks, waits, or assertions, and existing suite setup/teardown patterns remain unchanged.
Microshift Test Compatibility ✅ Passed No new Ginkgo specs were added; the PR only changes docs and a ConfigMap YAML, with no MicroShift-blocked APIs/features.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No new Ginkgo tests were added; the changes are a design doc, helper YAML, and a policy fixture with no node/HA assumptions.
Topology-Aware Scheduling Compatibility ✅ Passed The PR only changes docs and a volume-policy ConfigMap; no node selectors, affinities, spread constraints, replica logic, or topology assumptions were introduced.
Ote Binary Stdout Contract ✅ Passed Touched files are docs/YAML plus helper funcs; no stdout writes appear in main/init/TestMain/BeforeSuite/AfterSuite/RunSpecs setup or top-level init code.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No new Ginkgo specs were added; the touched files are docs, a backup helper, and YAML policy config only, with no IPv4 or external-network logic.
No-Weak-Crypto ✅ Passed Touched files only change volume-policy action types and docs; no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB, custom crypto, or secret comparisons found.
Container-Privileges ✅ Passed Changed files only update a ConfigMap policy and docs; no manifest adds privileged/hostPID/hostNetwork/hostIPC/SYS_ADMIN/allowPrivilegeEscalation fields.
No-Sensitive-Data-In-Logs ✅ Passed The PR only changes policy YAML and design docs; no new log statements or sensitive-data fields were introduced.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 25, 2026
@sseago

sseago commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

/hold until plugin PR merges

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 25, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/design/kubevirt-datamover.md`:
- Line 54: The nested bullet under the SnapshotMoveData requirements is indented
inconsistently and is triggering markdownlint MD005. Update the list formatting
in the datamover docs so this bullet matches the surrounding nested bullets’
indentation level, keeping the structure consistent with the nearby list items.
- Around line 53-57: The kubevirt datamover selection logic in the decision text
is too permissive because it only rejects non-custom/non-skip actions and still
allows unrelated custom actions to slip through. Update the wording around the
VM PVC iteration so it explicitly requires every non-skipped PVC to be either a
matching custom action with datamover=kubevirt or a skip policy, and reject the
VM if any PVC has a different custom action; keep the references consistent with
the existing kubevirt datamover/SnapshotMoveData decision flow.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 4dfe5e40-0627-46e5-95ce-761b8e1ce724

📥 Commits

Reviewing files that changed from the base of the PR and between bae5384 and c11d87d.

📒 Files selected for processing (3)
  • docs/design/kubevirt-datamover.md
  • tests/e2e/lib/backup.go
  • tests/e2e/sample-applications/virtual-machines/kubevirt-dm/volume-policy.yaml

Comment thread docs/design/kubevirt-datamover.md
Comment thread docs/design/kubevirt-datamover.md Outdated
@sseago sseago force-pushed the custom-volume-policy branch from c11d87d to 48ceb61 Compare June 25, 2026 18:42
kaovilai added a commit to kaovilai/oadp-operator that referenced this pull request Jun 25, 2026
Apply Scott's review suggestion — volume policy action is "custom" with
"datamover: kubevirt" in action parameters, not a bare "kubevirt" action.
This aligns with the volume policy changes in PR openshift#2254.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
@openshift-ci

openshift-ci Bot commented Jun 26, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kaovilai, shubham-pampattiwar, sseago

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [kaovilai,shubham-pampattiwar,sseago]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kaovilai

Copy link
Copy Markdown
Member

/hold cancel

@kaovilai

Copy link
Copy Markdown
Member

/lgtm

@openshift-ci openshift-ci Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 26, 2026
@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jun 26, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 5d5dac8 and 2 for PR HEAD 48ceb61 in total

@openshift-ci

openshift-ci Bot commented Jun 27, 2026

Copy link
Copy Markdown

@sseago: all tests passed!

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot Bot merged commit 119e79b into openshift:oadp-dev Jun 27, 2026
15 checks passed
@sseago

sseago commented Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

/cherry-pick oadp-1.6

@openshift-cherrypick-robot

Copy link
Copy Markdown
Contributor

@sseago: new pull request created: #2258

Details

In response to this:

/cherry-pick oadp-1.6

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants