[Storage] De-quarantine libguestfs test and use data source#4556
Conversation
…f http import Signed-off-by: Emanuele Prella <eprella@redhat.com>
📝 WalkthroughWalkthroughTests replace a Cirros-specific DataVolume helper with generalized create_dv (using a source_ref from fedora_data_source_scope_module), explicitly wait for DV success, update the libguestfs fixture to create and manage a Pod lifecycle during virtctl guestfs sessions, and remove the create_cirros_dv utility. ChangesLibguestfs DataVolume & pod changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
🚥 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-4556 published |
|
/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:
Your deliverable: Test Execution Plan
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: Before setting "Run smoke tests: True", you MUST use shell scripts to: |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 3195 🏁 Script executed: Length of output: 1786 🧠 Learnings used |
…/ema-aka-young/openshift-virtualization-tests into cnv-9655-dequarantine-libguestfs Signed-off-by: Emanuele Prella <eprella@redhat.com>
|
/approve |
|
/build-and-push-container |
|
New container for quay.io/openshift-cnv/openshift-virtualization-tests:pr-4556 published |
|
/verified All tests passed for PR #4556. 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: |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
PR_NUMBER=4556
REPO="RedHatQE/openshift-virtualization-tests"
# Get current HEAD SHA
HEAD_SHA=$(gh pr view $PR_NUMBER --repo $REPO --json headRefOid --jq '.headRefOid')
echo "HEAD SHA: $HEAD_SHA"
# Verify smoke/gating tests - confirm no dependency path
echo "=== Smoke tests in storage ==="
rg "`@pytest.mark.smoke`" tests/storage/ --type=py -l 2>/dev/null || echo "none"
echo "=== Gating tests in storage ==="
rg "`@pytest.mark.gating`" tests/storage/ --type=py -l 2>/dev/null || echo "none"
echo "=== Check create_cirros_dv callers outside test_libguestfs ==="
rg "create_cirros_dv" --type=py -l 2>/dev/null | grep -v "test_libguestfs" || echo "none"
echo "=== Get PR files and patch position for test_libguestfs.py ==="
gh api /repos/$REPO/pulls/$PR_NUMBER/files --jq '.[] | select(.filename=="tests/storage/test_libguestfs.py") | {filename:.filename, patch:.patch}' 2>/dev/null | head -50
# Post the inline review comment
BODY="**Test Execution Plan**
- **Run smoke tests: False** — No traceable dependency path. Changed files are scoped to \`tests/storage/\` only. \`create_cirros_dv\` (removed from \`tests/storage/utils.py\`) had no callers outside \`test_libguestfs.py\`. No smoke-marked test imports any modified symbol.
- **Run gating tests: False** — Same reasoning; no gating-marked test in \`tests/storage/\` depends on \`create_cirros_dv\`, \`create_dv\`, or the updated \`virtctl_libguestfs_by_user\` fixture.
**Affected tests to run:**
\`tests/storage/test_libguestfs.py::test_virtctl_libguestfs_with_specific_user\`"
gh api \
--method POST \
/repos/$REPO/pulls/$PR_NUMBER/reviews \
--field commit_id="$HEAD_SHA" \
--field event="COMMENT" \
--field "comments[][path]=tests/storage/test_libguestfs.py" \
--field "comments[][position]=1" \
--field "comments[][body]=$BODY"
echo "Exit: $?"Length of output: 7354 |
|
/lgtm |
|
/check-can-merge |
|
Successfully removed PR tag: quay.io/openshift-cnv/openshift-virtualization-tests:pr-4556. |
|
New container for quay.io/openshift-cnv/openshift-virtualization-tests:latest published |
|
/cherry-pick cnv-4.22 cnv-4.21 cnv-4.20 cnv-4.19 |
|
Manual cherry-pick is needed |
|
Manual cherry-pick is needed |
|
Cherry-picked PR [Storage] De-quarantine libguestfs test and use data source into cnv-4.22: #5221 |
|
Manual cherry-pick is needed |
Short description:
test_virtctl_libguestfs_with_specific_user.libguestfscontainer to be created before performing operations in it.What this PR does / why we need it:
Fixing a quarantined test by enhancing code and explicitly waiting for libguestfs to be created. Additionally, using data source instead of artifactory, to align with other tests.
Which issue(s) this PR fixes:
CNV-47594
Special notes for reviewer:
None
jira-ticket:
https://redhat.atlassian.net/browse/CNV-47594
Summary by CodeRabbit