CherryPicked: [4.20] [Storage] Test using Windows VMs should have vTPM - test_hotplug.py#4844
CherryPicked: [4.20] [Storage] Test using Windows VMs should have vTPM - test_hotplug.py#4844acinko-rh wants to merge 16 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL 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 |
|
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. |
6679088 to
8c4dfa8
Compare
+1 /approve |
|
/check-can-merge |
|
Clean rebase detected — no code changes compared to previous head ( |
|
/retest all |
|
/retest cnv-smoke/validation |
|
No cnv-smoke/validation configured for this repository |
|
/lgtm |
|
/retest all |
|
/retest cnv-smoke |
|
No cnv-smoke configured for this repository |
@acinko-rh currently there is no option to manually re-trigger smoke. |
|
/verified cancel |
|
/retest all |
|
/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: |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Get current head SHA
HEAD_SHA=$(gh api repos/RedHatQE/openshift-virtualization-tests/pulls/4844 --jq '.head.sha')
echo "HEAD_SHA=$HEAD_SHA"
# Get diff to find correct position for libs/infra/images.py
gh pr diff 4844 --repo RedHatQE/openshift-virtualization-tests -- libs/infra/images.py | head -30Length of output: 539 🏁 Script executed: #!/bin/bash
HEAD_SHA="95acd1603f09b3b49ea07a8646200dd46413ea8e"
# Get diff for libs/infra/images.py using grep
gh pr diff 4844 --repo RedHatQE/openshift-virtualization-tests 2>/dev/null | awk '/^diff --git a\/libs\/infra\/images\.py/,/^diff --git/' | head -30
echo "=== POST INLINE REVIEW ==="
python3 << 'PYEOF'
import json, subprocess
body = (
"**Test Execution Plan**\n\n"
"- **Run smoke tests: False** \u2014 No traced dependency path. "
"Smoke test files and their conftest.py hierarchy do not import `DOCKER_IMAGE_DIR`, `CONTAINER_DISK_DV_SIZE`, or `get_windows_container_disk_path`.\n"
"- **Run gating tests: False** \u2014 No gating-marked file imports the changed symbols (`DOCKER_IMAGE_DIR`, `CONTAINER_DISK_DV_SIZE`, or `get_windows_container_disk_path`).\n\n"
"**Affected tests to run:**\n"
"- `tests/storage/test_hotplug.py::TestHotPlugWindows` *(tier3)* \u2014 "
"fixtures refactored to use `create_windows2022_dv_template_from_registry` / `create_windows2022_vm_with_vtpm` (tests/utils.py) "
"\u2192 `get_windows_container_disk_path` (utilities/os_utils.py) "
"\u2192 `Images.Windows.DOCKER_IMAGE_DIR` (libs/infra/images.py: `docker/` \u2192 `docker-local/`) "
"and `Images.Windows.CONTAINER_DISK_DV_SIZE` (newly added `40Gi`)\n"
"- `utilities/unittests/test_os_utils.py` \u2014 new unit tests for `get_windows_container_disk_path`\n\n"
"**Suggested command:**\n"
"```\n"
"pytest -s -o log_cli=true --jira tests/storage/test_hotplug.py::TestHotPlugWindows\n"
"```"
)
payload = {
"commit_id": "95acd1603f09b3b49ea07a8646200dd46413ea8e",
"event": "COMMENT",
"body": "",
"comments": [{"path": "libs/infra/images.py", "position": 6, "body": body}]
}
with open("/tmp/review_payload.json", "w") as f:
json.dump(payload, f)
result = subprocess.run(
["gh", "api", "repos/RedHatQE/openshift-virtualization-tests/pulls/4844/reviews",
"--method", "POST", "--input", "/tmp/review_payload.json"],
capture_output=True, text=True
)
print("STDOUT:", result.stdout[:500] if result.stdout else "(empty)")
print("STDERR:", result.stderr[:500] if result.stderr else "(empty)")
print("Return code:", result.returncode)
PYEOFLength of output: 2983 |
|
Clean rebase detected — no code changes compared to previous head ( |
|
@jpeimer should we still backport it or wait for the updated code in |
|
/lgtm |
|
/retest all Auto-triggered: Files in this PR were modified by merged PR #5590. Overlapping filesutilities/constants.py |
|
/lgtm |
Short description:
Backport of #4761 to cnv-4.20: All Windows VMs in storage tests should be Windows 2022 using VTPM.
More details:
Added helper functions into
utils.pythat are context managers for DV and VM using Windows 2022 using instance types and preferences. These functions can be used in other modules such as CDI Clone, CDI Upload, Snasphots etc.What this PR does / why we need it:
Backports Windows Server 2022 with vTPM support to cnv-4.20 branch.
Which issue(s) this PR fixes:
Backport of #4761
Special notes for reviewer:
assert_hotplugvolume_nonexist_optional_restartinstead ofassert_hotplugvolume_nonexistjira-ticket:
https://redhat.atlassian.net/browse/CNV-51351