CherryPicked: [cnv-4.22] Enable disableMDevConfiguration feature gate…#5472
CherryPicked: [cnv-4.22] Enable disableMDevConfiguration feature gate…#5472akri3i wants to merge 1 commit into
Conversation
… before vGPU setup (RedHatQE#4959) Signed-off-by: akri3i <guptaakriti70@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (5)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
/verified |
|
Report bugs in Issues Welcome! 🎉This pull request will be automatically processed with the following features: 🔄 Automatic Actions
📋 Available CommandsPR Status Management
Review & Approval
Testing & Validation
Container Operations
Cherry-pick Operations
Branch Management
Custom Commands
Label Management
✅ Merge RequirementsThis PR will be automatically approved when the following conditions are met:
📊 Review ProcessApprovers and ReviewersApprovers:
Reviewers:
Available Labels
AI Features
Security Checks
💡 Tips
For more information, please refer to the project documentation or contact the maintainers. |
Test execution plan request detailsCRITICAL: You MUST post an inline review comment on the first changed line of the first file. As an expert software testing engineer, analyze all modified files in this PR and create a targeted test execution plan. Analysis Requirements:
Output rules: Your deliverable: Test Execution Plan
Use these formats:
Real test commands (MANDATORY when changes affect session/runtime code): When the affected code runs at session/collection time (conftest fixtures, pytest plugins,
Example output for a session-startup fix: Guidelines:
Hardware-Related Checks (SR-IOV, GPU, DPDK): When PR modifies fixtures for hardware-specific resources:
CRITICAL WORKFLOW COMPLETION RULES: When responding to this test execution plan request, you MUST follow these rules EXACTLY:
ABSOLUTE PROHIBITIONS (violating these creates empty/meaningless reviews):
Remember: The pull request review is visible to users. Additional comments are redundant noise. CRITICAL — Verification rules for smoke and gating decisions: |
|
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-testsLength 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_customLength of output: 9170 🏁 Script executed: #!/bin/bash
set -euo pipefail
gh pr view 5472 --repo RedHatQE/openshift-virtualization-tests --json headRefOid,numberLength 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
This indicates the CodeRabbit GitHub App token used in this sandbox lacks write permission ( Test Execution Plan
Real tests (cluster with GPU/vGPU hardware required) Fix path: Happy-path regression: Collection safety: Could you verify the GitHub App permissions for this integration (needs |
|
/retest all |
… before vGPU setup (#4959)
What this PR does / why we need it:
Which issue(s) this PR fixes:
Special notes for reviewer:
jira-ticket: