Use Fedora image for common VM preference tests#5152
Conversation
The preference tests validate that KubeVirt applies CPU/memory/device preferences correctly. Fedora boots faster and avoids teardown failures seen with 512Mi guest memory. Signed-off-by: Geetika Kapoor <gkapoor@redhat.com>
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
📝 WalkthroughWalkthroughThe test fixture for VM creation in cluster preference validation is updated to use the Fedora container image instead of the RHEL 9 registry guest image. The change affects only the image constant passed to the test VM initialization, with no modifications to test logic or assertions. ChangesTest VM Configuration Update
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsLinked repositories: Your configuration references 1 linked repositories, but your current plan allows 0. Analyzed ``, skipped 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 |
|
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
Label Management
✅ Merge RequirementsThis PR will be automatically approved when the following conditions are met:
📊 Review ProcessApprovers and ReviewersApprovers:
Reviewers:
Available Labels
AI Features
💡 Tips
For more information, please refer to the project documentation or contact the maintainers. |
|
/build-and-push-container |
|
New container for quay.io/openshift-cnv/openshift-virtualization-tests:pr-5152 published |
|
/test-plan |
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
# Check the file for smoke/gating markers and understand first changed line
fd "test_common_vm_preference.py" --exec cat {}
echo "---MARKERS---"
rg '`@pytest.mark.smoke`|`@pytest.mark.gating`|`@pytest.mark.tier`' tests/infrastructure/instance_types/test_common_vm_preference.py -n
echo "---SMOKE FILES---"
rg -l '`@pytest.mark.smoke`' tests/ | head -20
echo "---GATING FILES---"
rg -l '`@pytest.mark.gating`' tests/ | head -20
echo "---GIT DIFF FIRST CHANGED LINE---"
git diff HEAD~1 -- tests/infrastructure/instance_types/test_common_vm_preference.py | head -40Length of output: 8312 🏁 Script executed: #!/bin/bash
# Get the PR head commit SHA
PR_SHA=$(gh pr view 5152 --repo RedHatQE/openshift-virtualization-tests --json headRefOid -q '.headRefOid')
echo "PR SHA: $PR_SHA"
# Post inline review comment on the first changed line (line 45 of the new file)
# The changed line in the new file is line 45: image=Images.Fedora.FEDORA_CONTAINER_IMAGE
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
repos/RedHatQE/openshift-virtualization-tests/pulls/5152/comments \
-f body="**Test Execution Plan**
**Run smoke tests: False**
No smoke-marked tests call \`start_vm_with_cluster_preference\` or \`run_general_vm_preferences\`.
**Run gating tests: False**
The gating-marked test in this file (\`test_common_preferences_vendor_labels\`) calls \`assert_mismatch_vendor_label\` — it does not call \`start_vm_with_cluster_preference\` and is unaffected by this image change.
**Affected tests to run**
\`\`\`
tests/infrastructure/instance_types/test_common_vm_preference.py::TestCommonVmPreference::test_common_vm_preference_windows (tier3)
tests/infrastructure/instance_types/test_common_vm_preference.py::TestCommonVmPreference::test_common_vm_preference_linux[rhel] (tier3)
tests/infrastructure/instance_types/test_common_vm_preference.py::TestCommonVmPreference::test_common_vm_preference_linux[centos] (tier3)
tests/infrastructure/instance_types/test_common_vm_preference.py::TestCommonVmPreference::test_common_vm_preference_linux[unique] (tier3)
tests/infrastructure/instance_types/test_common_vm_preference.py::TestCommonVmPreference::test_common_vm_preference_dpdk (tier3, special_infra)
\`\`\`
All five tests in \`TestCommonVmPreference\` call \`run_general_vm_preferences\` → \`start_vm_with_cluster_preference\`, which contains the changed image reference. Verify that the Fedora image boots cleanly under the windows/rhel/centos/unique/network preferences (particularly \`windows.2k8\` and \`windows.2k12\`) and that namespace teardown completes without \`ResourceTeardownError\`." \
-f commit_id="$PR_SHA" \
-f path="tests/infrastructure/instance_types/test_common_vm_preference.py" \
-F line=45 \
-f side="RIGHT"Length of output: 6658 |
|
/verified |
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: |
|
Successfully removed PR tag: quay.io/openshift-cnv/openshift-virtualization-tests:pr-5152. |
|
New container for quay.io/openshift-cnv/openshift-virtualization-tests:latest published |
|
/cherry-pick cnv-4.22 |
|
Cherry-picked PR Use Fedora image for common VM preference tests into cnv-4.22: #5194 |
##### What this PR does / why we need it: The preference tests validate that KubeVirt applies CPU/memory/device preferences correctly. Fedora boots faster and avoids teardown failures seen with 512Mi guest memory. ##### Which issue(s) this PR fixes: tier3 tests continues to fail in teardown ##### Special notes for reviewer: RHEL9 guest image cannot shutdown with 512Mi guest memory, which is the requirement defined by the windows.2k8 and windows.2k12 preferences.With other windows with 2Gi guest memory RHEL9 image tests works fine and teardown happens. This causes VMIs to remain in Running phase indefinitely after VM deletion, blocking namespace cleanup and failing teardown with ResourceTeardownError. so replacing with a lighter image, so that we get only legit failures due to preferences. ##### jira-ticket: https://redhat.atlassian.net/browse/CNV-88839 t3 lane failures <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Tests** * Updated test infrastructure to use an alternative VM image for test execution. **Note:** This is a test-only change with no impact to end-user functionality. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: Geetika Kapoor <gkapoor@redhat.com>
…sts (RedHatQE#5194) Cherry-pick from `main` branch, original PR: RedHatQE#5152, PR owner: geetikakay Signed-off-by: Geetika Kapoor <gkapoor@redhat.com> Co-authored-by: Geetika Kapoor <gkapoor@redhat.com> Signed-off-by: Jose Manuel Castano <joscasta@redhat.com>
|
/cherry-pick cnv-4.21 |
|
Cherry-picked PR Use Fedora image for common VM preference tests into cnv-4.21: #5411 |
|
/cherry-pick cnv-4.20 |
|
Cherry-picked PR Use Fedora image for common VM preference tests into cnv-4.20: #5412 |
|
/cherry-pick cnv-4.19 |
|
/cherry-pick cnv-4.18 |
|
Cherry-picked PR Use Fedora image for common VM preference tests into cnv-4.19: #5413 |
|
Cherry-pick conflicts were resolved by AI Cherry-picked PR Use Fedora image for common VM preference tests into cnv-4.18: #5414 @geetikakay Manual verification is required — please review the changes and test before merging. |
What this PR does / why we need it:
The preference tests validate that KubeVirt applies CPU/memory/device preferences correctly. Fedora boots faster and
avoids teardown failures seen with 512Mi guest memory.
Which issue(s) this PR fixes:
tier3 tests continues to fail in teardown
Special notes for reviewer:
RHEL9 guest image cannot shutdown with
512Mi guest memory, which is the requirement defined by the
windows.2k8 and windows.2k12 preferences.With other windows with 2Gi guest memory RHEL9 image tests works fine and teardown happens. This causes VMIs to
remain in Running phase indefinitely after VM deletion, blocking
namespace cleanup and failing teardown with ResourceTeardownError.
so replacing with a lighter image, so that we get only legit failures due to preferences.
jira-ticket:
https://redhat.atlassian.net/browse/CNV-88839
t3 lane failures
Summary by CodeRabbit
Note: This is a test-only change with no impact to end-user functionality.