Skip to content

CherryPicked: [cnv-4.22] Enable disableMDevConfiguration feature gate…#5472

Open
akri3i wants to merge 1 commit into
RedHatQE:cnv-4.22from
akri3i:enable-feature-gate-vgpu-tests-cnv-4.22
Open

CherryPicked: [cnv-4.22] Enable disableMDevConfiguration feature gate…#5472
akri3i wants to merge 1 commit into
RedHatQE:cnv-4.22from
akri3i:enable-feature-gate-vgpu-tests-cnv-4.22

Conversation

@akri3i

@akri3i akri3i commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

… before vGPU setup (#4959)

What this PR does / why we need it:
Which issue(s) this PR fixes:
Special notes for reviewer:
jira-ticket:

… before vGPU setup (RedHatQE#4959)

Signed-off-by: akri3i <guptaakriti70@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (5)
  • main
  • cnv-4.21
  • cnv-4.20
  • cnv-4.19
  • cnv-4.18

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 305d483c-74c2-4724-8985-e3c7e2165fae

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ 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.

@akri3i

akri3i commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

/verified

@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

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 exectuion

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:

  • dshchedr
  • myakove
  • rnetser
  • vsibirsk

Reviewers:

  • OhadRevah
  • RoniKishner
  • SamAlber
  • akri3i
  • albarker-rh
  • dshchedr
  • geetikakay
  • hmeir
  • rlobillo
  • rnetser
  • vsibirsk
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

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

@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 2, 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
gh pr view 5472 --repo RedHatQE/openshift-virtualization-tests --json title,body,files,additions,deletions
echo "---DIFF---"
gh pr diff 5472 --repo RedHatQE/openshift-virtualization-tests

Length of output: 23690


🏁 Script executed:

#!/bin/bash
set -euo pipefail
echo "--- markers in vgpu test files ---"
sed -n '1,40p' tests/virt/node/gpu/vgpu/test_rhel_vm_with_vgpu.py | grep -n "pytest.mark" 
echo "---"
grep -n "pytest.mark" tests/virt/node/gpu/vgpu/test_rhel_vm_with_vgpu.py tests/virt/node/gpu/vgpu/test_windows_vm_with_vgpu.py tests/virt/upgrade_custom/vgpu/test_vgpu_vm_upgrade.py
echo "--- smoke files ---"
rg -l '`@pytest.mark.smoke`' tests/ | head -50
echo "--- gating files ---"
rg -l '`@pytest.mark.gating`' tests/ | head -50
echo "--- check gpu dir for smoke/gating ---"
rg -n '`@pytest.mark`.(smoke|gating)' tests/virt/node/gpu tests/virt/upgrade_custom

Length of output: 9170


🏁 Script executed:

#!/bin/bash
set -euo pipefail
gh pr view 5472 --repo RedHatQE/openshift-virtualization-tests --json headRefOid,number

Length of output: 328


🏁 Script executed:

#!/bin/bash
set -euo pipefail

BODY=$(cat <<'EOF'
**Test Execution Plan**

- **Run smoke tests: False** — No `@pytest.mark.smoke` tests exist under `tests/virt/node/gpu/` or `tests/virt/upgrade_custom/`, and no smoke-suite conftest imports the modified symbols (`DISABLE_MDEV_CONFIGURATION`, `vgpu_node_labels_applied`, `wait_for_nvidia_vgpu_manager`, `verify_mdev_bus_available`).
- **Run gating tests: False** — No `@pytest.mark.gating` tests exist under `tests/virt/node/gpu/` or `tests/virt/upgrade_custom/` either; all impacted tests carry `special_infra`/`gpu`/`ocp_upgrade` markers instead.
- **Affected tests to run:**
  - `tests/virt/node/gpu/vgpu/test_rhel_vm_with_vgpu.py` — fixtures `gpu_vmb`/`node_mdevtype_gpu_vm` now consume `golden_image_data_source_for_test_scope_class` + `get_data_volume_template_dict_with_default_storage_class`, and class relies on `non_existent_mdev_bus_nodes` → `vgpu_ready_nodes` → new `hco_with_disable_mdev_configuration` (package-scoped, `tests/virt/node/gpu/vgpu/conftest.py`)
  - `tests/virt/node/gpu/vgpu/test_windows_vm_with_vgpu.py` — same fixture chain via `gpu_vmc`
  - `tests/virt/upgrade_custom/vgpu/test_vgpu_vm_upgrade.py::TestVGPUVMUpgrade` — now depends on renamed `non_existent_mdev_bus_nodes_session_scope` → `vgpu_ready_nodes_session_scope` → new `hco_with_disable_mdev_configuration_session_scope` (session-scoped, `tests/virt/upgrade_custom/vgpu/conftest.py`)

**Real tests (cluster with GPU/vGPU hardware required)**

Fix path (feature gate applied before node labeling/vGPU manager readiness):
`pytest tests/virt/node/gpu/vgpu/test_rhel_vm_with_vgpu.py -k test_access_vgpus_rhel_vm`
Expected: `hco_with_disable_mdev_configuration` patches `disableMDevConfiguration=True` and HCO/KubeVirt reconciles successfully before `gpu_nodes_labeled_with_vgpu_config` labels nodes; `nvidia-vgpu-manager` DS becomes ready and `mdev_bus` check in `verify_mdev_bus_available` passes.

Happy-path regression (upgrade flow, session-scoped fixtures):
`pytest tests/virt/upgrade_custom/vgpu/test_vgpu_vm_upgrade.py -k test_vgpu_vm_before_upgrade`
Expected: session-scoped `hco_with_disable_mdev_configuration_session_scope` → `gpu_nodes_labeled_with_vgpu_config_session_scope` → `gpu_nodes_labeled_with_vm_vgpu_session_scope` → `nvidia_vgpu_manager_ready_session_scope` → `vgpu_ready_nodes_session_scope` chain completes without error, and label cleanup (`vgpu_node_labels_applied` teardown clearing `nvidia.com/vgpu.config.state`) runs correctly.

Collection safety (no GPU hardware):
`pytest tests/virt/node/gpu/vgpu/ tests/virt/upgrade_custom/vgpu/ --collect-only`
Expected: collection succeeds; `nodes_with_supported_gpus`/`supported_gpu_device` (pre-existing, unmodified fixtures) should still gracefully skip/short-circuit when no GPU nodes are present.
EOF
)

gh api \
  --method POST \
  -H "Accept: application/vnd.github+json" \
  "/repos/RedHatQE/openshift-virtualization-tests/pulls/5472/reviews" \
  -f commit_id="d07ed95ff2451665cfa650b04d4d48cae944603e" \
  -f event="COMMENT" \
  -f body="" \
  -F "comments[][path]=tests/install_upgrade_operators/constants.py" \
  -F "comments[][line]=1" \
  -F "comments[][side]=RIGHT" \
  -F "comments[][body]=${BODY}"

Length of output: 3745


🏁 Script executed:

#!/bin/bash
set -euo pipefail

BODY=$(cat <<'EOF'
**Test Execution Plan**

- **Run smoke tests: False** — No `@pytest.mark.smoke` tests exist under `tests/virt/node/gpu/` or `tests/virt/upgrade_custom/`, and no smoke-suite conftest imports the modified symbols (`DISABLE_MDEV_CONFIGURATION`, `vgpu_node_labels_applied`, `wait_for_nvidia_vgpu_manager`, `verify_mdev_bus_available`).
- **Run gating tests: False** — No `@pytest.mark.gating` tests exist under `tests/virt/node/gpu/` or `tests/virt/upgrade_custom/` either; all impacted tests carry `special_infra`/`gpu`/`ocp_upgrade` markers instead.
- **Affected tests to run:**
  - `tests/virt/node/gpu/vgpu/test_rhel_vm_with_vgpu.py` — fixtures `gpu_vmb`/`node_mdevtype_gpu_vm` now consume `golden_image_data_source_for_test_scope_class` + `get_data_volume_template_dict_with_default_storage_class`, and class relies on `non_existent_mdev_bus_nodes` → `vgpu_ready_nodes` → new `hco_with_disable_mdev_configuration` (package-scoped, `tests/virt/node/gpu/vgpu/conftest.py`)
  - `tests/virt/node/gpu/vgpu/test_windows_vm_with_vgpu.py` — same fixture chain via `gpu_vmc`
  - `tests/virt/upgrade_custom/vgpu/test_vgpu_vm_upgrade.py::TestVGPUVMUpgrade` — now depends on renamed `non_existent_mdev_bus_nodes_session_scope` → `vgpu_ready_nodes_session_scope` → new `hco_with_disable_mdev_configuration_session_scope` (session-scoped, `tests/virt/upgrade_custom/vgpu/conftest.py`)

**Real tests (cluster with GPU/vGPU hardware required)**

Fix path (feature gate applied before node labeling/vGPU manager readiness):
`pytest tests/virt/node/gpu/vgpu/test_rhel_vm_with_vgpu.py -k test_access_vgpus_rhel_vm`
Expected: `hco_with_disable_mdev_configuration` patches `disableMDevConfiguration=True` and HCO/KubeVirt reconciles successfully before `gpu_nodes_labeled_with_vgpu_config` labels nodes; `nvidia-vgpu-manager` DS becomes ready and `mdev_bus` check in `verify_mdev_bus_available` passes.

Happy-path regression (upgrade flow, session-scoped fixtures):
`pytest tests/virt/upgrade_custom/vgpu/test_vgpu_vm_upgrade.py -k test_vgpu_vm_before_upgrade`
Expected: session-scoped `hco_with_disable_mdev_configuration_session_scope` → `gpu_nodes_labeled_with_vgpu_config_session_scope` → `gpu_nodes_labeled_with_vm_vgpu_session_scope` → `nvidia_vgpu_manager_ready_session_scope` → `vgpu_ready_nodes_session_scope` chain completes without error, and label cleanup (`vgpu_node_labels_applied` teardown clearing `nvidia.com/vgpu.config.state`) runs correctly.

Collection safety (no GPU hardware):
`pytest tests/virt/node/gpu/vgpu/ tests/virt/upgrade_custom/vgpu/ --collect-only`
Expected: collection succeeds; `nodes_with_supported_gpus`/`supported_gpu_device` (pre-existing, unmodified fixtures) should still gracefully skip/short-circuit when no GPU nodes are present.
EOF
)

# Retry via gh pr review with inline comment file
TMPFILE=$(mktemp)
printf '%s' "$BODY" > "$TMPFILE"

gh api \
  --method POST \
  -H "Accept: application/vnd.github+json" \
  "/repos/RedHatQE/openshift-virtualization-tests/pulls/5472/comments" \
  -f commit_id="d07ed95ff2451665cfa650b04d4d48cae944603e" \
  -f path="tests/install_upgrade_operators/constants.py" \
  -F line=1 \
  -f side="RIGHT" \
  -f body="$(cat "$TMPFILE")" || echo "RETRY_FAILED"

Length of output: 3646


🏁 Script executed:

#!/bin/bash
set -euo pipefail

BODY=$(cat <<'EOF'
**Test Execution Plan**

- **Run smoke tests: False** — No `@pytest.mark.smoke` tests exist under `tests/virt/node/gpu/` or `tests/virt/upgrade_custom/`, and no smoke-suite conftest imports the modified symbols (`DISABLE_MDEV_CONFIGURATION`, `vgpu_node_labels_applied`, `wait_for_nvidia_vgpu_manager`, `verify_mdev_bus_available`).
- **Run gating tests: False** — No `@pytest.mark.gating` tests exist under `tests/virt/node/gpu/` or `tests/virt/upgrade_custom/` either; all impacted tests carry `special_infra`/`gpu`/`ocp_upgrade` markers instead.
- **Affected tests to run:**
  - `tests/virt/node/gpu/vgpu/test_rhel_vm_with_vgpu.py` — fixtures `gpu_vmb`/`node_mdevtype_gpu_vm` now consume `golden_image_data_source_for_test_scope_class` + `get_data_volume_template_dict_with_default_storage_class`, and the class relies on `non_existent_mdev_bus_nodes` → `vgpu_ready_nodes` → new `hco_with_disable_mdev_configuration` (package-scoped, `tests/virt/node/gpu/vgpu/conftest.py`)
  - `tests/virt/node/gpu/vgpu/test_windows_vm_with_vgpu.py` — same fixture chain via `gpu_vmc`
  - `tests/virt/upgrade_custom/vgpu/test_vgpu_vm_upgrade.py::TestVGPUVMUpgrade` — now depends on renamed `non_existent_mdev_bus_nodes_session_scope` → `vgpu_ready_nodes_session_scope` → new `hco_with_disable_mdev_configuration_session_scope` (session-scoped, `tests/virt/upgrade_custom/vgpu/conftest.py`)

**Real tests (cluster with GPU/vGPU hardware required)**

Fix path (feature gate applied before node labeling/vGPU manager readiness):
`pytest tests/virt/node/gpu/vgpu/test_rhel_vm_with_vgpu.py -k test_access_vgpus_rhel_vm`
Expected: `hco_with_disable_mdev_configuration` patches `disableMDevConfiguration=True` and HCO/KubeVirt reconciles successfully before `gpu_nodes_labeled_with_vgpu_config` labels nodes; `nvidia-vgpu-manager` DS becomes ready and the `mdev_bus` check in `verify_mdev_bus_available` passes.

Happy-path regression (upgrade flow, session-scoped fixtures):
`pytest tests/virt/upgrade_custom/vgpu/test_vgpu_vm_upgrade.py -k test_vgpu_vm_before_upgrade`
Expected: session-scoped `hco_with_disable_mdev_configuration_session_scope` → `gpu_nodes_labeled_with_vgpu_config_session_scope` → `gpu_nodes_labeled_with_vm_vgpu_session_scope` → `nvidia_vgpu_manager_ready_session_scope` → `vgpu_ready_nodes_session_scope` chain completes without error, and label cleanup (`vgpu_node_labels_applied` teardown clearing `nvidia.com/vgpu.config.state`) runs correctly.

Collection safety (no GPU hardware):
`pytest tests/virt/node/gpu/vgpu/ tests/virt/upgrade_custom/vgpu/ --collect-only`
Expected: collection succeeds; `nodes_with_supported_gpus`/`supported_gpu_device` (pre-existing, unmodified fixtures) should still gracefully skip/short-circuit when no GPU nodes are present.

_(Note: this was intended as an inline comment on `tests/install_upgrade_operators/constants.py`, Line 1, but the CodeRabbit GitHub App token lacks permission to create PR review comments on this repo — posting as a regular comment instead.)_
EOF
)

gh pr comment 5472 --repo RedHatQE/openshift-virtualization-tests --body "$BODY"

Length of output: 3513


@openshift-virtualization-qe-bot-3: I attempted to post the Test Execution Plan as a non-blocking inline review comment on Line 1 of tests/install_upgrade_operators/constants.py (the first changed file), then retried via a direct review-comment API call, and finally fell back to a regular PR comment — all three attempts failed with 403 Resource not accessible by integration / GraphQL: Resource not accessible by integration (addComment).

This indicates the CodeRabbit GitHub App token used in this sandbox lacks write permission (pull-requests: write) on RedHatQE/openshift-virtualization-tests, so I'm unable to post any comment (inline or top-level) on this PR right now. Since I can't silently complete the deliverable, here is the plan for reference — someone with appropriate permissions can post it manually, or the App installation/permissions should be checked:

Test Execution Plan

  • Run smoke tests: False — No @pytest.mark.smoke tests exist under tests/virt/node/gpu/ or tests/virt/upgrade_custom/, and no smoke-suite conftest imports the modified symbols (DISABLE_MDEV_CONFIGURATION, vgpu_node_labels_applied, wait_for_nvidia_vgpu_manager, verify_mdev_bus_available).
  • Run gating tests: False — No @pytest.mark.gating tests exist under those same directories; all impacted tests carry special_infra/gpu/ocp_upgrade markers instead.
  • Affected tests to run:
    • tests/virt/node/gpu/vgpu/test_rhel_vm_with_vgpu.pygpu_vmb/node_mdevtype_gpu_vm now use golden_image_data_source_for_test_scope_class + get_data_volume_template_dict_with_default_storage_class; class depends on non_existent_mdev_bus_nodesvgpu_ready_nodes → new hco_with_disable_mdev_configuration (package-scoped)
    • tests/virt/node/gpu/vgpu/test_windows_vm_with_vgpu.py — same fixture chain via gpu_vmc
    • tests/virt/upgrade_custom/vgpu/test_vgpu_vm_upgrade.py::TestVGPUVMUpgrade — depends on renamed non_existent_mdev_bus_nodes_session_scopevgpu_ready_nodes_session_scope → new hco_with_disable_mdev_configuration_session_scope (session-scoped)

Real tests (cluster with GPU/vGPU hardware required)

Fix path: pytest tests/virt/node/gpu/vgpu/test_rhel_vm_with_vgpu.py -k test_access_vgpus_rhel_vm — expect the feature gate patch to succeed before node labeling and nvidia-vgpu-manager readiness/mdev_bus checks.

Happy-path regression: pytest tests/virt/upgrade_custom/vgpu/test_vgpu_vm_upgrade.py -k test_vgpu_vm_before_upgrade — expect the full session-scoped fixture chain (feature gate → labeling → DS readiness → mdev_bus check) and teardown label cleanup to work.

Collection safety: pytest tests/virt/node/gpu/vgpu/ tests/virt/upgrade_custom/vgpu/ --collect-only — expect collection to succeed without GPU hardware present.

Could you verify the GitHub App permissions for this integration (needs pull-requests: write), or let me know if you'd like me to retry?

@akri3i

akri3i commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

/retest all

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.

5 participants