Skip to content

add: hotplug persist, migrate, and reboot conformance tests with 4 disks#5597

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

add: hotplug persist, migrate, and reboot conformance tests with 4 disks#5597
Ahmad-Hafe wants to merge 1 commit into
RedHatQE:mainfrom
Ahmad-Hafe:feat/live-migrate-4-disks

Conversation

@Ahmad-Hafe

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

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

Expands TestHotPlugWithSerialPersist from 1 hotplugged disk to 3 (4 total with boot disk) and adds a reboot-persistence test for cloud provider conformance coverage (CNV-88911).

What changed:

  • fedora_vm_for_hotplug_scope_class modernized: replaces fedora_vm_body() + is_jira_open workaround with golden image DataSource, U1_SMALL instance type, and OS_FLAVOR_FEDORA preference
  • Two new class-scoped fixtures added:
    • blank_dvs_for_hotplug_scope_class — creates 3 blank 1Gi DVs via contextlib.ExitStack for proper cleanup on partial failure
    • vm_with_hotplugged_disks_scope_class — hotplugs all 3 DVs with persist (first gets serial), waits for each to be ready before proceeding
  • TestHotPlugWithSerialPersist no longer parametrized over hotplug_volume_scope_class; setup is now fully encapsulated in the new fixtures
  • Dependency names are now fully qualified (TestHotPlugWithSerialPersist::test_hotplug_volume_with_serial_and_persist) to avoid collisions with other classes
  • New test: test_hotplug_persist_survives_reboot — reboots the VM after persist, verifies all 3 hotplugged disks survive the restart and serial is preserved. Covers the "Make permanent (reboot, and we see it)" conformance requirement.
Which issue(s) this PR fixes:

Expands coverage for:

  • Live migrate VM with 4 disks (cloud provider GA criteria)
  • Hotplug: Make permanent — reboot, and we see it (also GA criteria)
Special notes for reviewer:

The tests have no external registry dependencies (no quay.io, no artifactory). They use only golden images (already on the cluster) and blank DataVolumes, making them suitable for self-validation runs.

jira-ticket:

https://redhat.atlassian.net/browse/CNV-92782
https://redhat.atlassian.net/browse/CNV-88911

@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@Ahmad-Hafe, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 50 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 977b5ea6-434f-4234-9e5a-2e17a48d121d

📥 Commits

Reviewing files that changed from the base of the PR and between 4faa6b5 and ff1aa2c.

📒 Files selected for processing (2)
  • tests/storage/constants.py
  • tests/storage/test_hotplug.py
📝 Walkthrough

Walkthrough

The hotplug serial-persistence tests now create three blank DataVolumes, attach them to an explicitly configured Fedora VM, validate serial behavior, conditionally test migration, and verify serial persistence after reboot.

Changes

Serial persistence hotplug workflow

Layer / File(s) Summary
VM and disk setup contracts
tests/storage/constants.py, tests/storage/test_hotplug.py
Adds the three-disk count and related sizing/dependency constants, expands storage and VM imports, and constructs the Fedora VM with explicit instancetype, preference, data-source, storage-class, and DataVolume template configuration.
Multi-disk hotplug fixtures
tests/storage/test_hotplug.py
Creates three blank DataVolumes, hotplugs them into the shared Fedora VM, sets persistence for all disks and serial persistence for the first, and waits for readiness.
Serial persistence assertions and migration
tests/storage/test_hotplug.py
Runs serial and nonexistence checks against the shared multi-disk VM, gates migration on all DataVolumes being migratable, and rechecks serials after reboot.

Estimated code review effort: 4 (Complex) | ~40 minutes

Possibly related PRs

Suggested reviewers: jpeimer, rnetser, vsibirsk, acinko-rh, kgoldbla


Caution

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

  • Ignore

❌ Failed checks (1 error)

Check name Status Explanation Resolution
Stp Link Required ❌ Error New test test_hotplug_persist_survives_reboot has no STP/RFE/Jira link in any module/class/function docstring. Add a module/class/function docstring with an STP/RFE/Jira issue URL; if using Jira, include # <skip-jira-utils-check> on that same line.
✅ Passed checks (5 passed)
Check name Status Explanation
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 Scenario Coverage ✅ Passed tests/storage/test_hotplug.py has no STP URL in any module/class/test docstring, so the STP scenario-coverage check is not applicable.
Title check ✅ Passed PASS: The title is concise, under 120 characters, and accurately summarizes the hotplug persist, migrate, reboot, and 4-disk changes.
Description check ✅ Passed PASS: The description matches the required template and includes the PR purpose, issues fixed, reviewer notes, and Jira ticket links.
✨ 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/30313

@openshift-virtualization-qe-bot

Copy link
Copy Markdown

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

@openshift-virtualization-qe-bot

Copy link
Copy Markdown

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

@openshift-virtualization-qe-bot

Copy link
Copy Markdown

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

@Ahmad-Hafe Ahmad-Hafe marked this pull request as ready for review July 13, 2026 11:44
@openshift-virtualization-qe-bot-5

Copy link
Copy Markdown

Report bugs in Issues

Welcome! 🎉

This pull request will be automatically processed with the following features:

🔄 Automatic Actions

  • Reviewer Assignment: Reviewers are automatically assigned based on the OWNERS file in the repository root
  • Size Labeling: PR size labels (XS, S, M, L, XL, XXL) are automatically applied based on changes
  • Issue Creation: A tracking issue is created for this PR and will be closed when the PR is merged or closed
  • Branch Labeling: Branch-specific labels are applied to track the target branch
  • Auto-verification: Auto-verified users have their PRs automatically marked as verified
  • Labels: Enabled categories: branch, can-be-merged, cherry-pick, has-conflicts, hold, needs-rebase, size, verified, wip

📋 Available Commands

PR Status Management

  • /wip - Mark PR as work in progress (adds WIP: prefix to title)
  • /wip cancel - Remove work in progress status
  • /hold - Block PR merging (approvers only)
  • /hold cancel - Unblock PR merging
  • /verified - Mark PR as verified
  • /verified cancel - Remove verification status
  • /reprocess - Trigger complete PR workflow reprocessing (useful if webhook failed or configuration changed)
  • /regenerate-welcome - Regenerate this welcome message
  • /security-override - Set security check runs to pass (maintainers only)
  • /security-override cancel - Re-run security checks

Review & Approval

  • /lgtm - Approve changes (looks good to me)
  • /approve - Approve PR (approvers only)
  • /assign-reviewers - Assign reviewers based on OWNERS file
  • /assign-reviewer @username - Assign specific reviewer
  • /check-can-merge - Check if PR meets merge requirements

Testing & Validation

  • /retest tox - Run Python test suite with tox
  • /retest build-container - Rebuild and test container image
  • /retest verify-bugs-are-open - verify-bugs-are-open
  • /retest all - Run all available tests

Container Operations

  • /build-and-push-container - Build and push container image (tagged with PR number)
    • Supports additional build arguments: /build-and-push-container --build-arg KEY=value

Cherry-pick Operations

  • /cherry-pick <branch> - Schedule cherry-pick to target branch when PR is merged
    • Multiple branches: /cherry-pick branch1 branch2 branch3
  • /cherry-pick-retry <branch> - Retry a failed cherry-pick (merged PRs only)

Branch Management

  • /rebase - Rebase this PR branch onto its base branch

Label Management

  • /<label-name> - Add a label to the PR
  • /<label-name> cancel - Remove a label from the PR

✅ Merge Requirements

This PR will be automatically approved when the following conditions are met:

  1. Approval: /approve from at least one approver
  2. LGTM Count: Minimum 2 /lgtm from reviewers
  3. Status Checks: All required status checks must pass
  4. No Blockers: No wip, hold, has-conflicts labels and PR must be mergeable (no conflicts)
  5. Verified: PR must be marked as verified

📊 Review Process

Approvers and Reviewers

Approvers:

  • jpeimer

Reviewers:

  • Acedus
  • Ahmad-Hafe
  • Dsanatar
  • acinko-rh
  • akalenyu
  • awels
  • dalia-frank
  • ema-aka-young
  • josemacassan
  • jpeimer
  • kgoldbla
  • kshvaika
Available Labels
  • hold
  • verified
  • wip
  • lgtm
  • approve
AI Features
  • Cherry-Pick Conflict Resolution: Enabled (claude/claude-opus-4-6-1m)
Security Checks
  • Suspicious Path Detection: Monitors paths: .claude/, .vscode/, .cursor/, .devcontainer/, .pi/, .github/workflows/, .github/actions/
  • Committer Identity Check: Verifies last committer matches PR author
  • Mandatory: Security checks block merge (use /security-override to bypass — maintainers only)

💡 Tips

  • WIP Status: Use /wip when your PR is not ready for review
  • Verification: The verified label is removed on new commits unless the push is detected as a clean rebase
  • Cherry-picking: Cherry-pick labels are processed when the PR is merged
  • Container Builds: Container images are automatically tagged with the PR number
  • Permission Levels: Some commands require approver permissions
  • Auto-verified Users: Certain users have automatic verification and merge privileges

📌 Additional Information

Custom Commands:

  • /test-plan — Triggers CodeRabbit to analyze the PR's changed files and post a test execution plan
  • /rerun-smoke — Adds retest-smoke label on the PR to trigger smoke tests execution

For more information, please refer to the project documentation or contact the maintainers.

@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 `@tests/storage/test_hotplug.py`:
- Around line 282-293: Remove the redundant class-level
`@pytest.mark.usefixtures`("vm_with_hotplugged_disks_scope_class") from
TestHotPlugWithSerialPersist, while keeping the explicit fixture parameters on
test_hotplug_volume_with_serial_and_persist and
test_hotplug_volume_with_serial_and_persist_migrate unchanged.
- Around line 292-293: Update assert_hotplugvolume_nonexist and its call site in
the hotplug test to identify the target volume by name rather than assuming
volumeStatus[0]. Pass the expected volume name into the helper or iterate
volumeStatus entries to find it, then validate that matched volume’s hotplug
state so the persist case checks the correct disk.
🪄 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: 4c719141-5fce-43f7-ba53-58a47aa41d4b

📥 Commits

Reviewing files that changed from the base of the PR and between 8b79057 and 61ffc1c.

📒 Files selected for processing (2)
  • tests/storage/constants.py
  • tests/storage/test_hotplug.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/test_hotplug.py Outdated
Comment thread tests/storage/test_hotplug.py
@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.68%. Comparing base (a2dc143) to head (041287f).
⚠️ Report is 233 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5597   +/-   ##
=======================================
  Coverage   98.67%   98.68%           
=======================================
  Files          25       42   +17     
  Lines        2487     2504   +17     
=======================================
+ Hits         2454     2471   +17     
  Misses         33       33           
Flag Coverage Δ
utilities 98.68% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@openshift-virtualization-qe-bot-5

Copy link
Copy Markdown

Clean rebase detected — no code changes compared to previous head (07e49f0).
The following labels were preserved: commented-Ahmad-Hafe, commented-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: 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 `@tests/storage/test_hotplug.py`:
- Around line 285-294: Add a concise comment immediately before the dependency
decorator for test_hotplug_volume_with_serial_and_persist_migrate, explaining
that migration relies on the hotplugged and persisted disks validated by
test_hotplug_volume_with_serial_and_persist. Keep the existing dependency
configuration unchanged.

In `@utilities/storage.py`:
- Around line 809-813: Update assert_hotplugvolume_nonexist to perform the
HOTPLUG_VOLUME membership check against volume_status_entry.keys() rather than
the ResourceField-backed object itself, preserving the existing assertion
message and behavior.
🪄 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: a540a9fa-0cbc-499d-aaa5-f76fe7f482d4

📥 Commits

Reviewing files that changed from the base of the PR and between 61ffc1c and 07e49f0.

📒 Files selected for processing (3)
  • tests/storage/constants.py
  • tests/storage/test_hotplug.py
  • utilities/storage.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/test_hotplug.py
Comment thread utilities/storage.py Outdated
@openshift-virtualization-qe-bot-3

Copy link
Copy Markdown
Contributor

/retest all

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

Overlapping files

tests/storage/test_hotplug.py

@Ahmad-Hafe

Copy link
Copy Markdown
Contributor Author

/test-plan

@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 13, 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 -euo pipefail
git fetch origin pull/5597/head:pr5597 2>&1 | tail -5
git checkout pr5597 2>&1 | tail -5
echo "---diff files---"
git diff main...pr5597 --stat
echo "---diff constants---"
git diff main...pr5597 -- tests/storage/constants.py
echo "---diff storage.py---"
git diff main...pr5597 -- utilities/storage.py
echo "---first changed file first hunk---"
git diff main...pr5597 -- tests/storage/constants.py | head -30

Length of output: 2454


🏁 Script executed:

#!/bin/bash
set -euo pipefail
rg -n "assert_hotplugvolume_nonexist" --type py
echo "---smoke---"
rg -l '`@pytest.mark.smoke`' tests/storage || true
echo "---gating---"
rg -l '`@pytest.mark.gating`' tests/storage/test_hotplug.py || true
echo "---markers in test_hotplug---"
rg -n "pytest.mark" tests/storage/test_hotplug.py

Length of output: 2336


🏁 Script executed:

#!/bin/bash
set -euo pipefail
gh api repos/RedHatQE/openshift-virtualization-tests/pulls/5597/files --paginate --jq '.[] | {filename, patch}' 2>&1 | head -200

Length of output: 8617


🏁 Script executed:

#!/bin/bash
set -euo pipefail
gh api repos/RedHatQE/openshift-virtualization-tests/pulls/5597/files --paginate --jq '.[] | select(.filename=="utilities/storage.py") | .patch'
echo "---search callers---"
gh api -X GET search/code -f q='assert_hotplugvolume_nonexist repo:RedHatQE/openshift-virtualization-tests' --jq '.items[].path' 2>&1 || true
echo "---first line file---"
gh api repos/RedHatQE/openshift-virtualization-tests/pulls/5597/files --paginate --jq '.[0].filename, .[0].patch' | head -20

Length of output: 995


🏁 Script executed:

#!/bin/bash
set -euo pipefail
gh api repos/RedHatQE/openshift-virtualization-tests/pulls/5597/files --paginate | python3 -c "
import json,sys
data = json.load(sys.stdin)
for f in data:
    if f['filename']=='utilities/storage.py':
        print(f.get('patch',''))
"
echo "---upgrade storage usage---"
gh api repos/RedHatQE/openshift-virtualization-tests/contents/tests/storage/upgrade/test_upgrade_storage.py --jq '.content' | base64 -d | grep -n -B3 -A3 "assert_hotplugvolume_nonexist"
echo "---markers hotplug/upgrade---"
gh api repos/RedHatQE/openshift-virtualization-tests/contents/tests/storage/upgrade/test_upgrade_storage.py --jq '.content' | base64 -d | grep -n "pytest.mark"

Length of output: 3151


@openshift-virtualization-qe-bot-3

Test Execution Plan

  • Run smoke tests: False — No @pytest.mark.smoke tests exist in tests/storage/test_hotplug.py or tests/storage/upgrade/test_upgrade_storage.py; neither file nor the modified utilities/storage.py symbol is reached by any smoke-marked test.
  • Run gating tests: Truetests/storage/test_hotplug.py::TestHotPlugWithSerialPersist is directly modified in this PR and is decorated with @pytest.mark.gating (and @pytest.mark.conformance).

Affected tests to run

  • tests/storage/test_hotplug.py::TestHotPlugWithSerialPersist::test_hotplug_volume_with_serial_and_persist (gating) — now depends on the new vm_with_hotplugged_disks_scope_class fixture chain (blank_dvs_for_hotplug_scope_classfedora_vm_for_hotplug_scope_class → hotplug all 3 disks).
  • tests/storage/test_hotplug.py::TestHotPlugWithSerialPersist::test_hotplug_volume_with_serial_and_persist_migrate (gating) — now iterates is_dv_migratable() over all blank_dvs_for_hotplug_scope_class before calling migrate_vm_and_verify.
  • tests/storage/upgrade/test_upgrade_storage.py — imports and calls assert_hotplugvolume_nonexist() (twice), whose logic in utilities/storage.py changed from checking only volumeStatus[0] to checking all entries; verify no regression for the single-hotplug-volume upgrade scenario.

Real tests (cluster required)

Happy path (regression, new multi-disk fixture and updated assert_hotplugvolume_nonexist):
pytest tests/storage/test_hotplug.py::TestHotPlugWithSerialPersist -k "not migrate"
Expected: VM boots with golden-image Fedora + 3 hotplugged blank disks, serial present only on first disk, assert_hotplugvolume_nonexist passes across all volumeStatus entries.

Migration path:
pytest tests/storage/test_hotplug.py::TestHotPlugWithSerialPersist::test_hotplug_volume_with_serial_and_persist_migrate
Expected: migration proceeds only when all 3 DataVolumes are migratable; SSH connectivity verified post-migration.

Upgrade-utility regression check (unchanged single-disk case):
pytest tests/storage/upgrade/test_upgrade_storage.py -k hotplug
Expected: assert_hotplugvolume_nonexist still passes with a single hotplugged/unplugged volume in volumeStatus.

[resolve]

@Ahmad-Hafe

Copy link
Copy Markdown
Contributor Author

/build-and-push-container

@openshift-virtualization-qe-bot-6

Copy link
Copy Markdown

New container for quay.io/openshift-cnv/openshift-virtualization-tests:pr-5597 published

@Ahmad-Hafe

Ahmad-Hafe commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

/verified
all test under
tests/storage/test_hotplug.py passed

tests/storage/test_hotplug.py::TestHotPlugWithSerialPersist::test_hotplug_volume_with_serial_and_persist
tests/storage/test_hotplug.py::TestHotPlugWithSerialPersist::test_hotplug_volume_with_serial_and_persist_migrate
tests/storage/upgrade/test_upgrade_storage.py

I also executed the tests is self valdation and confrom it works

@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[bot]
coderabbitai Bot previously approved these changes Jul 13, 2026
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Test Execution Plan

  • Run smoke tests: False — No @pytest.mark.smoke tests exist in tests/storage/test_hotplug.py or tests/storage/upgrade/test_upgrade_storage.py; neither file nor the modified assert_hotplugvolume_nonexist symbol in utilities/storage.py is reached by any smoke-marked test.
  • Run gating tests: Truetests/storage/test_hotplug.py::TestHotPlugWithSerialPersist is directly modified in this PR and is decorated with @pytest.mark.gating (and @pytest.mark.conformance).

Affected tests to run

  • tests/storage/test_hotplug.py::TestHotPlugWithSerialPersist::test_hotplug_volume_with_serial_and_persist (gating) — depends on the new vm_with_hotplugged_disks_scope_class fixture chain (blank_dvs_for_hotplug_scope_classfedora_vm_for_hotplug_scope_class → hotplug all 3 disks).
  • tests/storage/test_hotplug.py::TestHotPlugWithSerialPersist::test_hotplug_volume_with_serial_and_persist_migrate (gating) — now iterates is_dv_migratable() over all blank_dvs_for_hotplug_scope_class before calling migrate_vm_and_verify.
  • tests/storage/upgrade/test_upgrade_storage.py — calls assert_hotplugvolume_nonexist(), whose logic changed from checking only volumeStatus[0] to checking all entries; verify no regression for the single-hotplug-volume upgrade scenario.

Real tests (cluster required)

Happy path (regression, new multi-disk fixture and updated assert_hotplugvolume_nonexist):
pytest tests/storage/test_hotplug.py::TestHotPlugWithSerialPersist -k "not migrate"
Expected: VM boots with golden-image Fedora + 3 hotplugged blank disks, serial present only on first disk, assert_hotplugvolume_nonexist passes across all volumeStatus entries.

Migration path:
pytest tests/storage/test_hotplug.py::TestHotPlugWithSerialPersist::test_hotplug_volume_with_serial_and_persist_migrate
Expected: migration proceeds only when all 3 DataVolumes are migratable; SSH connectivity verified post-migration.

Upgrade-utility regression check (unchanged single-disk case):
pytest tests/storage/upgrade/test_upgrade_storage.py -k hotplug
Expected: assert_hotplugvolume_nonexist still passes with a single hotplugged/unplugged volume in volumeStatus.

Note: this is identical to the plan already posted for this PR since no new code changes were introduced (the last activity was a container build/publish and manual /verified confirmation, not a code diff).

✅ Action performed

Comments resolved and changes approved.

@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/test_hotplug.py`:
- Around line 304-311: Update the hotplug migration test flow around
is_dv_migratable and migrate_vm_and_verify so non-migratable storage is
explicitly gated or visibly reported rather than silently returning; ensure the
test is not presented as coverage for the mixed RHCOS 9/10 P0 migration scenario
unless that topology is encoded.
🪄 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: a7c881be-13be-42ef-a78d-fefb6c86d1e0

📥 Commits

Reviewing files that changed from the base of the PR and between 07e49f0 and 4faa6b5.

📒 Files selected for processing (2)
  • tests/storage/constants.py
  • tests/storage/test_hotplug.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/test_hotplug.py
…ithSerialPersist (CNV-88911)

Signed-off-by: Ahmad Hafe <ahafe@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@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 13, 2026

Copy link
Copy Markdown
Contributor

@openshift-virtualization-qe-bot-3

Test Execution Plan

  • Run smoke tests: False — No @pytest.mark.smoke tests exist in tests/storage/test_hotplug.py or tests/storage/upgrade/test_upgrade_storage.py; neither file nor the modified assert_hotplugvolume_nonexist symbol in utilities/storage.py is reached by any smoke-marked test.
  • Run gating tests: Truetests/storage/test_hotplug.py::TestHotPlugWithSerialPersist is directly modified in this PR and is decorated with @pytest.mark.gating (and @pytest.mark.conformance).

Affected tests to run

  • tests/storage/test_hotplug.py::TestHotPlugWithSerialPersist::test_hotplug_volume_with_serial_and_persist (gating) — depends on the new vm_with_hotplugged_disks_scope_class fixture chain (blank_dvs_for_hotplug_scope_classfedora_vm_for_hotplug_scope_class → hotplug all 3 disks).
  • tests/storage/test_hotplug.py::TestHotPlugWithSerialPersist::test_hotplug_volume_with_serial_and_persist_migrate (gating) — iterates is_dv_migratable() over all blank_dvs_for_hotplug_scope_class before calling migrate_vm_and_verify.
  • tests/storage/upgrade/test_upgrade_storage.py — calls assert_hotplugvolume_nonexist(), whose logic changed from checking only volumeStatus[0] to checking all entries; verify no regression for the single-hotplug-volume upgrade scenario.

Real tests (cluster required)

Happy path (regression, new multi-disk fixture and updated assert_hotplugvolume_nonexist):
pytest tests/storage/test_hotplug.py::TestHotPlugWithSerialPersist -k "not migrate"
Expected: VM boots with golden-image Fedora + 3 hotplugged blank disks, serial present only on first disk, assert_hotplugvolume_nonexist passes across all volumeStatus entries.

Migration path:
pytest tests/storage/test_hotplug.py::TestHotPlugWithSerialPersist::test_hotplug_volume_with_serial_and_persist_migrate
Expected: migration proceeds only when all 3 DataVolumes are migratable; SSH connectivity verified post-migration.

Upgrade-utility regression check (unchanged single-disk case):
pytest tests/storage/upgrade/test_upgrade_storage.py -k hotplug
Expected: assert_hotplugvolume_nonexist still passes with a single hotplugged/unplugged volume in volumeStatus.

Note: no new code changes since the last identical plan; this reflects the current diff state (Ahmad-Hafe's second /verified did not introduce a new commit). Ahmad-Hafe already reported manual self-validation passed for the hotplug and upgrade tests.

✅ Action performed

Comments resolved and changes approved.


LOGGER = logging.getLogger(__name__)

BLANK_DV_SIZE = "1Gi"

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.

Move it outside to tests/storage/constants.py and combine it with BLANK_DV_SIZE in tests/storage/test_wffc.py.

Comment on lines +156 to +157
vm_instance_type=VirtualMachineClusterInstancetype(name=U1_SMALL, client=unprivileged_client),
vm_preference=VirtualMachineClusterPreference(name=OS_FLAVOR_FEDORA, client=unprivileged_client),

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.

Inference from volume will use the values in the volume annotation instancetype.kubevirt.io/default :

Suggested change
vm_instance_type=VirtualMachineClusterInstancetype(name=U1_SMALL, client=unprivileged_client),
vm_preference=VirtualMachineClusterPreference(name=OS_FLAVOR_FEDORA, client=unprivileged_client),
vm_instance_type_infer=True
vm_preference_infer=True

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.

7 participants