[4.20][Storage] Wait for interfaces while creating VM in Clone tests#5486
[4.20][Storage] Wait for interfaces while creating VM in Clone tests#5486ema-aka-young wants to merge 1 commit into
Conversation
Signed-off-by: Emanuele Prella <eprella@redhat.com>
|
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
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. |
|
/lgtm |
|
/build-and-push-container |
|
New container for quay.io/openshift-cnv/openshift-virtualization-tests:pr-5486 published |
|
/verified All tests passed for PR #5486. Execution details |
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: |
| ), | ||
| ) as vm: | ||
| running_vm(vm=vm, wait_for_interfaces=False) | ||
| running_vm(vm=vm) |
There was a problem hiding this comment.
Test Execution Plan
- Run smoke tests: True —
test_clone_from_block_to_fs_using_dv_template(marked@pytest.mark.smoke()) directly callscreate_vm_from_clone_dv_template, which contains the changedrunning_vm(vm=vm)call. - Run gating tests: True —
test_clone_from_fs_to_block_using_dv_template(marked@pytest.mark.gating) directly callscreate_vm_from_clone_dv_template, which contains the changedrunning_vm(vm=vm)call.
Affected tests to run
tests/storage/cdi_clone/test_clone.py::test_clone_from_block_to_fs_using_dv_template(smoke)tests/storage/cdi_clone/test_clone.py::test_clone_from_fs_to_block_using_dv_template(gating)
Real tests (cluster required)
Fix path (interfaces now awaited before SSH):
pytest tests/storage/cdi_clone/test_clone.py::test_clone_from_block_to_fs_using_dv_template --storage-class-matrix=<block-and-fs-capable-sc>
Expected: VM boots, interfaces/guest-agent ready, SSH connects reliably (no intermittent SSH failures).
Regression (gating path unaffected by ordering change):
pytest tests/storage/cdi_clone/test_clone.py::test_clone_from_fs_to_block_using_dv_template --storage-class-matrix=<block-and-fs-capable-sc>
Expected: clone + disk-count validation passes as before.
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -e
gh pr view 5486 --repo RedHatQE/openshift-virtualization-tests --json files,title,body -q '.files[].path'
echo "---DIFF---"
gh pr diff 5486 --repo RedHatQE/openshift-virtualization-testsLength of output: 856 🏁 Script executed: #!/bin/bash
set -e
echo "--- context of function ---"
sed -n '1,90p' tests/storage/cdi_clone/test_clone.py
echo "--- markers on file ---"
rg -n '`@pytest.mark`' tests/storage/cdi_clone/test_clone.py | head -50
echo "--- usages of create_vm_from_clone_dv_template ---"
rg -n 'create_vm_from_clone_dv_template' -r tests/ 2>/dev/null
rg -rn 'create_vm_from_clone_dv_template' tests/
echo "--- smoke/gating in file ---"
rg -n 'smoke|gating' tests/storage/cdi_clone/test_clone.py
echo "--- conftest hierarchy ---"
fd conftest.py tests/storage/cdi_clone
fd conftest.py tests/storageLength of output: 3476 🏁 Script executed: #!/bin/bash
set -e
grep -n 'create_vm_from_clone_dv_template' tests/storage/cdi_clone/test_clone.py
echo "---"
sed -n '90,330p' tests/storage/cdi_clone/test_clone.pyLength of output: 7589 🏁 Script executed: #!/bin/bash
set -e
grep -n 'running_vm(vm=vm)' tests/storage/cdi_clone/test_clone.pyLength of output: 252 🏁 Script executed: #!/bin/bash
set -e
REPO="RedHatQE/openshift-virtualization-tests"
PR=5486
HEAD_SHA=$(gh pr view $PR --repo $REPO --json headRefOid -q '.headRefOid')
echo "HEAD_SHA=$HEAD_SHA"
BODY=$(cat <<'EOF'
**Test Execution Plan**
- **Run smoke tests: True** — `test_clone_from_block_to_fs_using_dv_template` (marked `@pytest.mark.smoke()`) directly calls `create_vm_from_clone_dv_template`, which contains the changed `running_vm(vm=vm)` call.
- **Run gating tests: True** — `test_clone_from_fs_to_block_using_dv_template` (marked `@pytest.mark.gating`) directly calls `create_vm_from_clone_dv_template`, which contains the changed `running_vm(vm=vm)` call.
**Affected tests to run**
- `tests/storage/cdi_clone/test_clone.py::test_clone_from_block_to_fs_using_dv_template` (smoke)
- `tests/storage/cdi_clone/test_clone.py::test_clone_from_fs_to_block_using_dv_template` (gating)
**Real tests (cluster required)**
Fix path (interfaces now awaited before SSH):
`pytest tests/storage/cdi_clone/test_clone.py::test_clone_from_block_to_fs_using_dv_template --storage-class-matrix=<block-and-fs-capable-sc>`
Expected: VM boots, interfaces/guest-agent ready, SSH connects reliably (no intermittent SSH failures).
Regression (gating path unaffected by ordering change):
`pytest tests/storage/cdi_clone/test_clone.py::test_clone_from_fs_to_block_using_dv_template --storage-class-matrix=<block-and-fs-capable-sc>`
Expected: clone + disk-count validation passes as before.
EOF
)
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
/repos/$REPO/pulls/$PR/comments \
-f body="$BODY" \
-f commit_id="$HEAD_SHA" \
-f path="tests/storage/cdi_clone/test_clone.py" \
-F line=63 \
-f side="RIGHT"Length of output: 5879 Inline test execution plan comment posted on |
What this PR does / why we need it:
Remove
wait_for_interfaces=Falsefromrunning_vm()increate_vm_from_clone_dv_template.Which issue(s) this PR fixes:
This parameter was skipping the wait for guest agent and network interfaces before attempting SSH, which could cause intermittent SSH connection failures.
Without it,
running_vm()defaults to waiting for interfaces before checking SSH connectivity, which is the correct order.Special notes for reviewer:
Already fixed on
mainas part of PR #3678jira-ticket:
NONE