Skip to content

edit: clone conformance tests with 4-disk VM, no registry dependency (CNV-5607 & CNV-5608)#5624

Open
Ahmad-Hafe wants to merge 1 commit into
RedHatQE:mainfrom
Ahmad-Hafe:feat/clone-4-disks-conformance
Open

edit: clone conformance tests with 4-disk VM, no registry dependency (CNV-5607 & CNV-5608)#5624
Ahmad-Hafe wants to merge 1 commit into
RedHatQE:mainfrom
Ahmad-Hafe:feat/clone-4-disks-conformance

Conversation

@Ahmad-Hafe

@Ahmad-Hafe Ahmad-Hafe commented Jul 14, 2026

Copy link
Copy Markdown
Contributor
What this PR does / why we need it:

adjust test_clone_from_block_to_fs_using_dv_template & test_clone_from_block_to_fs_using_dv_template
to meet the new conformance requirement "Clone a VM with 4 disks" + host-assisted cloning" + remove quay external registry dependency foor booting the disk to use goldenimage instead)

  • CNV-5607: FS→Block clone with 4-disk VM + conformance marker
  • CNV-5608: Block→FS clone with 4-disk VM + conformance marker
  • Switched source fixtures from quay.io registry to golden image DataSource (self-validating, no external registry dependency)
  • Each test creates a VM with 4 cloned disks via dataVolumeTemplate (1 boot + 3 additional via add_dv_to_vm)
  • Add @pytest.mark.conformance marker
Which issue(s) this PR fixes:

CNV-88909

Special notes for reviewer:

Tests executed on GCP cluster with sp-balanced-storage SC
and on sc ocs-storagecluster-ceph-rbd-virtualization

jira-ticket:

CNV-88909

Summary by CodeRabbit

Summary of changes

  • Tests
    • Refactored clone-template test flow to rely on shared utilities for creating the VM from the source DataVolume template and verifying the expected number of clone disks.
    • Added conformance marking for additional clone-template scenarios.
    • Updated Fedora DataVolume test fixtures to compute required source metadata and size from the selected scoped data source.
    • Improved filesystem clone test overhead calculations by parsing image size from the source DataVolume’s size value.

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The CDI clone tests derive Fedora DataVolume source metadata and sizes from scoped data sources, centralize multi-disk VM clone setup in a shared helper, mark two tests as conformance tests, and parse source sizes with bitmath.

Changes

CDI clone refactor

Layer / File(s) Summary
Scoped DataVolume fixture setup
tests/storage/cdi_clone/conftest.py
Fedora filesystem and block DataVolume fixtures use scoped data-source references and derive sizes from the data source.
Shared multi-disk clone flow
tests/storage/cdi_clone/utils.py, tests/storage/cdi_clone/test_clone.py
A shared four-disk VM clone helper replaces the local implementation; two clone-template tests receive conformance markers, and one test reuses its source DataVolume for clone creation and bitmath-based sizing.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: jpeimer, vsibirsk, kgoldbla, acinko-rh, dalia-frank

🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Title check ✅ Passed The title is under 120 characters and accurately reflects the clone conformance and registry-removal changes.
Description check ✅ Passed The description includes all required template sections and covers the changes, issue link, reviewer notes, and jira-ticket.
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.
Stp Link Required ✅ Passed No new test files or new test_* functions were added; the PR only modified existing tests and added a non-test helper module.
Stp Scenario Coverage ✅ Passed No touched test module/class/test docstring contains an STP URL, so the STP scenario-coverage check is inapplicable here.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

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

@openshift-virtualization-qe-bot

Copy link
Copy Markdown

D/S test tox -e verify-tc-requirement-polarion failed: cnv-tests-tox-executor/30437

@openshift-virtualization-qe-bot

Copy link
Copy Markdown

D/S test tox -e verify-tc-requirement-polarion failed: cnv-tests-tox-executor/30438

@openshift-virtualization-qe-bot

Copy link
Copy Markdown

D/S test tox -e verify-tc-requirement-polarion failed: cnv-tests-tox-executor/30439

@openshift-virtualization-qe-bot

Copy link
Copy Markdown

D/S test tox -e verify-tc-requirement-polarion failed: cnv-tests-tox-executor/30440

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

An error occurred during the review process. Please try again later.

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

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.

❤️ Share

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

1 similar comment
@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

An error occurred during the review process. Please try again later.

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

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.

❤️ Share

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

@openshift-virtualization-qe-bot-3

Copy link
Copy Markdown
Contributor

@coderabbitai

Test execution plan request details

CRITICAL: You MUST post an inline review comment on the first changed line of the first file.
The inline comment should contain the full Test Execution Plan (smoke decision, gating decision, and specific affected tests).
Do NOT submit a blocking review event (REQUEST_CHANGES/APPROVE).
Post a single inline PR comment on Files Changed (non-blocking COMMENT flow).

As an expert software testing engineer, analyze all modified files in this PR and create a targeted test execution plan.
You will post an inline review comment with the test execution plan on the first changed file.
If you fail to run or post a comment, retry.

Analysis Requirements:

  1. Examine code changes in each modified file

  2. Identify affected code paths, functions, and classes

  3. Analyze pytest-specific elements: fixtures (scope, dependencies), parametrization, markers, conftest changes

  4. Trace test dependencies through imports, shared utilities, fixture inheritance, fixture teardown, and yield from cleanup in conftest

  5. Detect new tests introduced in the PR

  6. Utilities and libs impact (when utilities/ or libs/ changes):
    You MUST use shell scripts (rg, git diff) to trace the full impact.
    Follow these sub-steps in order:

    6a. Identify modified symbols: For each changed file under utilities/ or libs/,
    list every modified function or method.
    Example: git diff HEAD~1 --unified=0 -- utilities/hco.py | grep '^[+-]def '

    6b. Find direct callers: Search tests and conftest for each symbol from 6a.
    Example: rg -l 'get_hco_version' tests/

    6c. Trace fixture teardown and cleanup: Find fixtures that reach
    the modified symbol through yield from or context-manager wrappers.
    Example: rg -l 'yield from.*enable_common_boot|def.*enable_common_boot' tests/

    6d. Trace same-file callers: In each changed file, find other functions
    whose body calls a modified symbol (including code after yield
    in @contextmanager helpers).
    Example: rg 'get_hco_version|enable_common_boot' utilities/hco.py

    6e. Expand transitively: If function A calls modified B, then
    tests/fixtures that call A are affected — even when the test body
    never imports B directly.

    Do NOT limit impact to tests that import the modified symbol only.

  7. Smoke test impact: Intersect the affected set from step 6 with smoke-marked tests.
    Run: rg -l '@pytest.mark.smoke' tests/
    VERIFY the above command returned actual file paths before concluding False.
    Set True if either condition is met:

    • a smoke-marked file appears in the affected set from 6b-6e, OR
    • any conftest.py in the smoke test's parent-directory hierarchy (up to repo root)
      imports or calls a modified utilities/libs symbol — including autouse fixtures
      that depend on modified functions. ALL tests in that directory and below are affected.
      Example check: for each smoke_file, scan dirname(smoke_file)/conftest.py,
      dirname(dirname(smoke_file))/conftest.py, etc. for modified symbol imports
      and autouse fixtures that depend on modified symbols.
  8. Gating test impact: Intersect the affected set from step 6 with gating-marked tests.
    Run: rg -l '@pytest.mark.gating' tests/
    Set True if a gating-marked file also appears in the affected set from 6b-6e.
    Utilities/libs changes often affect gating tests without affecting smoke tests.
    Do NOT stop analysis after concluding Run smoke tests: False.

Output rules:
Do NOT include analysis step numbers (1-8) in your visible output.

Your deliverable:
Your inline informational comment will be based on the following requirements:

Test Execution Plan

  • Run smoke tests: True / False — If True, state the dependency path (test → fixture → changed symbol). True ONLY with a verified path.
  • Run gating tests: True / False — If True, state the dependency path. True if any gating-marked test is in the affected set.
  • Affected tests to run (required when utilities/, libs/, or shared conftest changes — list concrete paths even when smoke is False)

Use these formats:

  • path/to/test_file.py - When the entire test file needs verification
  • path/to/test_file.py::TestClass::test_method - When specific test(s) needed
  • path/to/test_file.py::test_function - When specific test(s) needed
  • -m marker - When a marker covers multiple affected tests (e.g. -m gating only if ALL gating tests in scope need run)
  • Tag each listed test or group with its marker when not obvious, e.g. (gating) or (smoke)

Real test commands (MANDATORY when changes affect session/runtime code):

When the affected code runs at session/collection time (conftest fixtures, pytest plugins,
config hooks, session-scoped setup) or modifies runtime behavior that unit tests mock away,
you MUST include concrete pytest commands the PR author must run on a real cluster
to verify the change works end-to-end. Include:

  • A command for the error/fix path (the scenario the PR fixes)
  • A command for the happy path (regression: the normal case still works)
  • Use lightweight tests (e.g., --collect-only for startup failures,
    a single small test for runtime behavior)
    If the PR only changes test logic (not utilities/libs/conftest), the affected test
    paths themselves serve as the real test commands — no separate section needed.

Example output for a session-startup fix:

**Real tests (cluster required)**
Error path (the fix):
`pytest tests/storage/.../test_foo.py --storage-class-matrix=nonexistent-sc --collect-only`
Expected: ValueError with clear message, not IndexError

Happy path (regression):
`pytest tests/storage/.../test_foo.py --storage-class-matrix=<valid-sc> -k test_bar`
Expected: session starts normally

Guidelines:

  • Include tests affected directly OR via fixture setup/teardown, yield from cleanup, or transitive utility call chains (caller calls modified helper)
  • Use a full file path only if ALL tests in that file require verification
  • Use file path + test name when only specific tests use an affected fixture or utility wrapper (preferred for partial file impact)
  • If a test marker can cover multiple files/tests, provide the marker
  • Balance coverage vs over-testing - Keep descriptions minimal
  • Example: if leaf helper foo() changes, include tests whose fixture teardown calls wrapper bar() where bar() calls foo(), even when the test body only imports an unrelated symbol from the same utilities module

Hardware-Related Checks (SR-IOV, GPU, DPDK):

When PR modifies fixtures for hardware-specific resources:

  • Collection Safety: Fixtures MUST have existence checks (return None when hardware unavailable)
  • Test Plan: MUST verify both WITH and WITHOUT hardware:
    • Run affected tests on cluster WITH hardware
    • Verify collection succeeds on cluster WITHOUT hardware

CRITICAL WORKFLOW COMPLETION RULES:

When responding to this test execution plan request, you MUST follow these rules EXACTLY:

  1. YOUR ONLY DELIVERABLE: Post one non-blocking inline comment containing the test execution plan on the first changed line
  2. THEN STOP IMMEDIATELY - Do NOT generate any additional response
  3. FALLBACK ONLY: If inline comment API calls fail after retrying, post as a regular PR comment
  4. SILENCE = SUCCESS: After successfully submitting the review, your task is complete. No confirmation needed.

ABSOLUTE PROHIBITIONS (violating these creates empty/meaningless reviews):

  • ❌ Do NOT post acknowledgment messages like "Test execution plan posted", "Review posted successfully", "I've successfully posted"
  • ❌ Do NOT mention review IDs, URLs, or confirmation of posting in the PR thread
  • ❌ Do NOT add any follow-up comments after submitting the review
  • ❌ Do NOT reply to confirm task completion
  • ❌ Do NOT explain what you did - just do it and stop

Remember: The pull request review is visible to users. Additional comments are redundant noise.

CRITICAL — Verification rules for smoke and gating decisions:
- For each True decision, you must have traced a concrete path: test file → fixture → utility function → modified symbol.
- Do NOT assume impact based on scope, file proximity, or infrastructure-sounding names.
Only set True when you trace a concrete path through steps 6a-6e, then 7 or 8.
WRONG: "utilities/hco.py changed → run smoke" (no traced dependency path)
WRONG: "Run smoke tests: False" with no affected-test list when gating tests use the changed utility
RIGHT: "Run smoke tests: False, Run gating tests: True" plus tests/.../test_foo.py::TestBar::test_baz (gating)
RIGHT: "Smoke test X uses fixture Y → wrapper Z → changed function W in utilities/hco.py"

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -e
echo "--- markers in cdi_clone dir ---"
rg -n '`@pytest.mark`' tests/storage/cdi_clone/

echo "--- usages of fedora_dv_with_filesystem_volume_mode / fedora_dv_with_block_volume_mode ---"
rg -n 'fedora_dv_with_filesystem_volume_mode|fedora_dv_with_block_volume_mode' tests/storage/cdi_clone/

echo "--- usages of create_vm_from_clone_dv_template outside utils.py ---"
rg -rn 'create_vm_from_clone_dv_template' tests/

echo "--- usages of fedora_data_source_scope_module fixture ---"
rg -n 'fedora_data_source_scope_module' tests/storage/cdi_clone/ -A2 -B2

echo "--- confirm no smoke/gating markers exist in this dir before change (git diff) ---"
git diff origin/main...HEAD -- tests/storage/cdi_clone/ | head -200

Length of output: 6584


🏁 Script executed:

#!/bin/bash
sed -n '210,265p' tests/storage/cdi_clone/test_clone.py

echo "--- proper search for create_vm_from_clone_dv_template ---"
rg -n "create_vm_from_clone_dv_template" tests/storage/cdi_clone/

Length of output: 2579


@openshift-virtualization-qe-bot-3, here is the test execution plan for this PR's changes (tests/storage/cdi_clone/conftest.py, tests/storage/cdi_clone/test_clone.py, tests/storage/cdi_clone/utils.py). Note: I don't have a capability to post a separate inline review comment independent of this reply, so I'm providing the plan directly here.

Test Execution Plan

  • Run smoke tests: Truetest_clone_from_block_to_fs_using_dv_template (Line 240 in tests/storage/cdi_clone/test_clone.py) carries @pytest.mark.smoke() and is directly modified in this PR: it now assigns fedora_dv_with_block_volume_mode to source_dv, calls the new create_vm_from_clone_dv_template (from tests/storage/cdi_clone/utils.py), and depends on the updated fedora_dv_with_block_volume_mode fixture in conftest.py (now using fedora_data_source_scope_module + get_dv_size_from_datasource).
  • Run gating tests: Truetest_clone_from_fs_to_block_using_dv_template (Line 220) carries @pytest.mark.gating, is newly marked @pytest.mark.conformance, and depends on fedora_dv_with_filesystem_volume_mode (also updated in conftest.py) plus the new create_vm_from_clone_dv_template helper.

Affected tests to run

  • tests/storage/cdi_clone/test_clone.py::test_clone_from_fs_to_block_using_dv_template (gating, conformance, CNV-5607)
  • tests/storage/cdi_clone/test_clone.py::test_clone_from_block_to_fs_using_dv_template (smoke, conformance, CNV-5608)

Both tests exercise the new create_vm_from_clone_dv_template utility (4-disk clone VM creation) and the two updated fixtures fedora_dv_with_filesystem_volume_mode / fedora_dv_with_block_volume_mode, so no additional files outside tests/storage/cdi_clone/ are impacted — the change is scoped entirely to this directory (not utilities/ or libs/), so no transitive utility-impact tracing across the wider suite is needed.

Real tests (cluster required)

Happy path — FS→Block clone with 4 disks (gating):
pytest tests/storage/cdi_clone/test_clone.py::test_clone_from_fs_to_block_using_dv_template

Happy path — Block→FS clone with 4 disks + volume-mode overhead sizing (smoke):
pytest tests/storage/cdi_clone/test_clone.py::test_clone_from_block_to_fs_using_dv_template

Expected in both cases: source DV is created from the golden-image fedora_data_source_scope_module DataSource, the cloned VM boots with NUM_CLONE_DISKS = 4 disks visible inside the guest, and (for the Block→FS case) the destination DV size correctly accounts for filesystem overhead via overhead_size_for_dv.

@Ahmad-Hafe

Copy link
Copy Markdown
Contributor Author

/wip cancel

Comment thread tests/storage/cdi_clone/test_clone.py Outdated
@Ahmad-Hafe

Copy link
Copy Markdown
Contributor Author

/wip

@openshift-virtualization-qe-bot-4

Copy link
Copy Markdown

Clean rebase detected — no code changes compared to previous head (63560ab).
The following labels were preserved: verified, lgtm-coderabbitai[bot], commented-acinko-rh.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 15, 2026
@Ahmad-Hafe

Copy link
Copy Markdown
Contributor Author

/wip cancel

@openshift-virtualization-qe-bot-4

Copy link
Copy Markdown

Clean rebase detected — no code changes compared to previous head (26167a5).
The following labels were preserved: commented-Ahmad-Hafe, lgtm-coderabbitai[bot].

@Ahmad-Hafe

Copy link
Copy Markdown
Contributor Author

/verified

@openshift-virtualization-qe-bot-3

Copy link
Copy Markdown
Contributor

@coderabbitai

Test execution plan request details

CRITICAL: You MUST post an inline review comment on the first changed line of the first file.
The inline comment should contain the full Test Execution Plan (smoke decision, gating decision, and specific affected tests).
Do NOT submit a blocking review event (REQUEST_CHANGES/APPROVE).
Post a single inline PR comment on Files Changed (non-blocking COMMENT flow).

As an expert software testing engineer, analyze all modified files in this PR and create a targeted test execution plan.
You will post an inline review comment with the test execution plan on the first changed file.
If you fail to run or post a comment, retry.

Analysis Requirements:

  1. Examine code changes in each modified file

  2. Identify affected code paths, functions, and classes

  3. Analyze pytest-specific elements: fixtures (scope, dependencies), parametrization, markers, conftest changes

  4. Trace test dependencies through imports, shared utilities, fixture inheritance, fixture teardown, and yield from cleanup in conftest

  5. Detect new tests introduced in the PR

  6. Utilities and libs impact (when utilities/ or libs/ changes):
    You MUST use shell scripts (rg, git diff) to trace the full impact.
    Follow these sub-steps in order:

    6a. Identify modified symbols: For each changed file under utilities/ or libs/,
    list every modified function or method.
    Example: git diff HEAD~1 --unified=0 -- utilities/hco.py | grep '^[+-]def '

    6b. Find direct callers: Search tests and conftest for each symbol from 6a.
    Example: rg -l 'get_hco_version' tests/

    6c. Trace fixture teardown and cleanup: Find fixtures that reach
    the modified symbol through yield from or context-manager wrappers.
    Example: rg -l 'yield from.*enable_common_boot|def.*enable_common_boot' tests/

    6d. Trace same-file callers: In each changed file, find other functions
    whose body calls a modified symbol (including code after yield
    in @contextmanager helpers).
    Example: rg 'get_hco_version|enable_common_boot' utilities/hco.py

    6e. Expand transitively: If function A calls modified B, then
    tests/fixtures that call A are affected — even when the test body
    never imports B directly.

    Do NOT limit impact to tests that import the modified symbol only.

  7. Smoke test impact: Intersect the affected set from step 6 with smoke-marked tests.
    Run: rg -l '@pytest.mark.smoke' tests/
    VERIFY the above command returned actual file paths before concluding False.
    Set True if either condition is met:

    • a smoke-marked file appears in the affected set from 6b-6e, OR
    • any conftest.py in the smoke test's parent-directory hierarchy (up to repo root)
      imports or calls a modified utilities/libs symbol — including autouse fixtures
      that depend on modified functions. ALL tests in that directory and below are affected.
      Example check: for each smoke_file, scan dirname(smoke_file)/conftest.py,
      dirname(dirname(smoke_file))/conftest.py, etc. for modified symbol imports
      and autouse fixtures that depend on modified symbols.
  8. Gating test impact: Intersect the affected set from step 6 with gating-marked tests.
    Run: rg -l '@pytest.mark.gating' tests/
    Set True if a gating-marked file also appears in the affected set from 6b-6e.
    Utilities/libs changes often affect gating tests without affecting smoke tests.
    Do NOT stop analysis after concluding Run smoke tests: False.

Output rules:
Do NOT include analysis step numbers (1-8) in your visible output.

Your deliverable:
Your inline informational comment will be based on the following requirements:

Test Execution Plan

  • Run smoke tests: True / False — If True, state the dependency path (test → fixture → changed symbol). True ONLY with a verified path.
  • Run gating tests: True / False — If True, state the dependency path. True if any gating-marked test is in the affected set.
  • Affected tests to run (required when utilities/, libs/, or shared conftest changes — list concrete paths even when smoke is False)

Use these formats:

  • path/to/test_file.py - When the entire test file needs verification
  • path/to/test_file.py::TestClass::test_method - When specific test(s) needed
  • path/to/test_file.py::test_function - When specific test(s) needed
  • -m marker - When a marker covers multiple affected tests (e.g. -m gating only if ALL gating tests in scope need run)
  • Tag each listed test or group with its marker when not obvious, e.g. (gating) or (smoke)

Real test commands (MANDATORY when changes affect session/runtime code):

When the affected code runs at session/collection time (conftest fixtures, pytest plugins,
config hooks, session-scoped setup) or modifies runtime behavior that unit tests mock away,
you MUST include concrete pytest commands the PR author must run on a real cluster
to verify the change works end-to-end. Include:

  • A command for the error/fix path (the scenario the PR fixes)
  • A command for the happy path (regression: the normal case still works)
  • Use lightweight tests (e.g., --collect-only for startup failures,
    a single small test for runtime behavior)
    If the PR only changes test logic (not utilities/libs/conftest), the affected test
    paths themselves serve as the real test commands — no separate section needed.

Example output for a session-startup fix:

**Real tests (cluster required)**
Error path (the fix):
`pytest tests/storage/.../test_foo.py --storage-class-matrix=nonexistent-sc --collect-only`
Expected: ValueError with clear message, not IndexError

Happy path (regression):
`pytest tests/storage/.../test_foo.py --storage-class-matrix=<valid-sc> -k test_bar`
Expected: session starts normally

Guidelines:

  • Include tests affected directly OR via fixture setup/teardown, yield from cleanup, or transitive utility call chains (caller calls modified helper)
  • Use a full file path only if ALL tests in that file require verification
  • Use file path + test name when only specific tests use an affected fixture or utility wrapper (preferred for partial file impact)
  • If a test marker can cover multiple files/tests, provide the marker
  • Balance coverage vs over-testing - Keep descriptions minimal
  • Example: if leaf helper foo() changes, include tests whose fixture teardown calls wrapper bar() where bar() calls foo(), even when the test body only imports an unrelated symbol from the same utilities module

Hardware-Related Checks (SR-IOV, GPU, DPDK):

When PR modifies fixtures for hardware-specific resources:

  • Collection Safety: Fixtures MUST have existence checks (return None when hardware unavailable)
  • Test Plan: MUST verify both WITH and WITHOUT hardware:
    • Run affected tests on cluster WITH hardware
    • Verify collection succeeds on cluster WITHOUT hardware

CRITICAL WORKFLOW COMPLETION RULES:

When responding to this test execution plan request, you MUST follow these rules EXACTLY:

  1. YOUR ONLY DELIVERABLE: Post one non-blocking inline comment containing the test execution plan on the first changed line
  2. THEN STOP IMMEDIATELY - Do NOT generate any additional response
  3. FALLBACK ONLY: If inline comment API calls fail after retrying, post as a regular PR comment
  4. SILENCE = SUCCESS: After successfully submitting the review, your task is complete. No confirmation needed.

ABSOLUTE PROHIBITIONS (violating these creates empty/meaningless reviews):

  • ❌ Do NOT post acknowledgment messages like "Test execution plan posted", "Review posted successfully", "I've successfully posted"
  • ❌ Do NOT mention review IDs, URLs, or confirmation of posting in the PR thread
  • ❌ Do NOT add any follow-up comments after submitting the review
  • ❌ Do NOT reply to confirm task completion
  • ❌ Do NOT explain what you did - just do it and stop

Remember: The pull request review is visible to users. Additional comments are redundant noise.

CRITICAL — Verification rules for smoke and gating decisions:
- For each True decision, you must have traced a concrete path: test file → fixture → utility function → modified symbol.
- Do NOT assume impact based on scope, file proximity, or infrastructure-sounding names.
Only set True when you trace a concrete path through steps 6a-6e, then 7 or 8.
WRONG: "utilities/hco.py changed → run smoke" (no traced dependency path)
WRONG: "Run smoke tests: False" with no affected-test list when gating tests use the changed utility
RIGHT: "Run smoke tests: False, Run gating tests: True" plus tests/.../test_foo.py::TestBar::test_baz (gating)
RIGHT: "Smoke test X uses fixture Y → wrapper Z → changed function W in utilities/hco.py"

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

@openshift-virtualization-qe-bot-3, I already posted the full test execution plan for this PR earlier in this thread (in response to the identical request). Since no new code changes have been made since then, that plan still applies:

Test Execution Plan

  • Run smoke tests: Truetest_clone_from_block_to_fs_using_dv_template (tests/storage/cdi_clone/test_clone.py) carries @pytest.mark.smoke() and is directly modified in this PR (uses fedora_dv_with_block_volume_mode → updated in conftest.pycreate_vm_from_clone_dv_template in utils.py).
  • Run gating tests: Truetest_clone_from_fs_to_block_using_dv_template carries @pytest.mark.gating, is newly marked @pytest.mark.conformance, and depends on fedora_dv_with_filesystem_volume_mode plus the new create_vm_from_clone_dv_template helper.

Affected tests to run

  • tests/storage/cdi_clone/test_clone.py::test_clone_from_fs_to_block_using_dv_template (gating, conformance, CNV-5607)
  • tests/storage/cdi_clone/test_clone.py::test_clone_from_block_to_fs_using_dv_template (smoke, conformance, CNV-5608)

Real tests (cluster required)

Happy path — FS→Block clone with 4 disks (gating):
pytest tests/storage/cdi_clone/test_clone.py::test_clone_from_fs_to_block_using_dv_template

Happy path — Block→FS clone with 4 disks + volume-mode overhead sizing (smoke):
pytest tests/storage/cdi_clone/test_clone.py::test_clone_from_block_to_fs_using_dv_template

Note: I don't have a capability to post a standalone inline review comment independent of this reply — this plan is provided here in the conversation thread.

@Ahmad-Hafe

Copy link
Copy Markdown
Contributor Author

/rerun-smoke

@josemacassan

Copy link
Copy Markdown
Contributor

/lgtm

@Ahmad-Hafe

Copy link
Copy Markdown
Contributor Author

/rerun-smoke

Comment thread tests/storage/cdi_clone/utils.py Outdated
@Ahmad-Hafe

Copy link
Copy Markdown
Contributor Author

/rerun-smoke

@openshift-virtualization-qe-bot-3

Copy link
Copy Markdown
Contributor

/retest all

Auto-triggered: Files in this PR were modified by merged PR #4571.

Overlapping files

tests/storage/cdi_clone/conftest.py
tests/storage/cdi_clone/test_clone.py

@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: 1

🤖 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 `@tests/storage/cdi_clone/test_clone.py`:
- Around line 241-244: Remove the int() cast from the image_size argument in the
overhead_size_for_dv call, passing the parsed GiB value as a float so fractional
image sizes are preserved and rounded by the existing helper.
🪄 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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: db3d8235-4124-439f-b3eb-780de28b5f88

📥 Commits

Reviewing files that changed from the base of the PR and between 8bba6dc and 0690da7.

📒 Files selected for processing (3)
  • tests/storage/cdi_clone/conftest.py
  • tests/storage/cdi_clone/test_clone.py
  • tests/storage/cdi_clone/utils.py
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • RedHatQE/openshift-virtualization-tests-design-docs (manual)

Comment thread tests/storage/cdi_clone/test_clone.py
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 15, 2026
@openshift-virtualization-qe-bot-4

Copy link
Copy Markdown

Clean rebase detected — no code changes compared to previous head (4f42341).
The following labels were preserved: lgtm-coderabbitai[bot].

@openshift-virtualization-qe-bot-6

Copy link
Copy Markdown

Clean rebase detected — no code changes compared to previous head (9d36d1c).
The following labels were preserved: lgtm-coderabbitai[bot].

@openshift-virtualization-qe-bot-2

Copy link
Copy Markdown
Contributor

Clean rebase detected — no code changes compared to previous head (0ec9aa5).

@openshift-virtualization-qe-bot-2

Copy link
Copy Markdown
Contributor

Clean rebase detected — no code changes compared to previous head (fdc3a83).

@Ahmad-Hafe

Copy link
Copy Markdown
Contributor Author

/retest all

@Ahmad-Hafe

Copy link
Copy Markdown
Contributor Author

reported a bug for Devops engineering team, regard faild/ stic cnv-smoke/validation

currentley it blocked me

Switch CDI clone tests (CNV-5607, CNV-5608) to use golden image
DataSource instead of quay.io registry, making them self-validating
for disconnected environments. Add conformance marker and create
VMs with 4 cloned disks to cover the "Clone a VM with 4 disks"
requirement using host-assisted cloning (FS↔block volume mode
conversion).

Signed-off-by: Ahmad Hafe <ahafe@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@openshift-virtualization-qe-bot-2

Copy link
Copy Markdown
Contributor

Clean rebase detected — no code changes compared to previous head (587b9fc).
The following labels were preserved: lgtm-coderabbitai[bot].

@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: 1

🤖 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 `@tests/storage/cdi_clone/utils.py`:
- Around line 11-24: Expand the docstring for create_vm_from_clone_dv_template
to Google format by adding explicit Args: entries for each parameter and a Side
effects: section documenting VM/DataVolume creation, guest OS boot, and
disk-count verification. Preserve the existing description and clarify the
function’s return behavior if applicable.
🪄 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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 0b4e4d91-a757-42ce-afaa-cda93ff5cc79

📥 Commits

Reviewing files that changed from the base of the PR and between 587b9fc and ac91364.

📒 Files selected for processing (3)
  • tests/storage/cdi_clone/conftest.py
  • tests/storage/cdi_clone/test_clone.py
  • tests/storage/cdi_clone/utils.py
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • RedHatQE/openshift-virtualization-tests-design-docs (manual)

Comment on lines +11 to +24
def create_vm_from_clone_dv_template(
vm_name,
dv_name,
namespace_name,
source_dv,
client,
volume_mode,
storage_class,
size=None,
):
"""Create a VM with NUM_CLONE_DISKS cloned disks from source_dv and verify all disks are visible.

DV names are derived as {dv_name}-0, {dv_name}-1, etc.
"""

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.

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

MEDIUM: Use Google-format docstrings.

Public functions with non-obvious side effects must use Google-format docstrings. This function has significant side effects—it creates a VirtualMachine, adds multiple DataVolumes, boots the guest OS, and asserts the disk count.

Please expand the docstring to include explicit Args: and Side effects: sections. As per coding guidelines, use Google-format docstrings for public functions with non-obvious return values or side effects.

🛠️ Proposed fix
 def create_vm_from_clone_dv_template(
     vm_name,
     dv_name,
     namespace_name,
     source_dv,
     client,
     volume_mode,
     storage_class,
     size=None,
 ):
-    """Create a VM with NUM_CLONE_DISKS cloned disks from source_dv and verify all disks are visible.
-
-    DV names are derived as {dv_name}-0, {dv_name}-1, etc.
-    """
+    """
+    Create a VM with NUM_CLONE_DISKS cloned disks from source_dv and verify all disks are visible.
+
+    DV names are derived as {dv_name}-0, {dv_name}-1, etc.
+
+    Args:
+        vm_name (str): The name of the VM to create.
+        dv_name (str): The base name for the data volumes.
+        namespace_name (str): The namespace for the VM and data volumes.
+        source_dv (DataVolume): The source data volume to clone.
+        client (DynamicClient): The Kubernetes dynamic client.
+        volume_mode (str): The volume mode for the cloned disks.
+        storage_class (str): The storage class for the cloned disks.
+        size (str, optional): An optional size override for the cloned disks.
+
+    Side effects:
+        Creates a VirtualMachine, adds multiple DataVolumes, starts the VM,
+        and asserts that the expected number of disks are visible in the guest OS.
+    """
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
def create_vm_from_clone_dv_template(
vm_name,
dv_name,
namespace_name,
source_dv,
client,
volume_mode,
storage_class,
size=None,
):
"""Create a VM with NUM_CLONE_DISKS cloned disks from source_dv and verify all disks are visible.
DV names are derived as {dv_name}-0, {dv_name}-1, etc.
"""
def create_vm_from_clone_dv_template(
vm_name,
dv_name,
namespace_name,
source_dv,
client,
volume_mode,
storage_class,
size=None,
):
"""
Create a VM with NUM_CLONE_DISKS cloned disks from source_dv and verify all disks are visible.
DV names are derived as {dv_name}-0, {dv_name}-1, etc.
Args:
vm_name (str): The name of the VM to create.
dv_name (str): The base name for the data volumes.
namespace_name (str): The namespace for the VM and data volumes.
source_dv (DataVolume): The source data volume to clone.
client (DynamicClient): The Kubernetes dynamic client.
volume_mode (str): The volume mode for the cloned disks.
storage_class (str): The storage class for the cloned disks.
size (str, optional): An optional size override for the cloned disks.
Side effects:
Creates a VirtualMachine, adds multiple DataVolumes, starts the VM,
and asserts that the expected number of disks are visible in the guest OS.
"""
🤖 Prompt for 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.

In `@tests/storage/cdi_clone/utils.py` around lines 11 - 24, Expand the docstring
for create_vm_from_clone_dv_template to Google format by adding explicit Args:
entries for each parameter and a Side effects: section documenting VM/DataVolume
creation, guest OS boot, and disk-count verification. Preserve the existing
description and clarify the function’s return behavior if applicable.

Source: Coding guidelines

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants