[4.22] Storage: Change Cirros images for RHEL from DataSource into upgrade tests#5226
Conversation
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? |
📝 WalkthroughWalkthroughUpgrade storage snapshot tests were migrated from Cirros to RHEL VMs. New fixtures create RHEL VMs using ChangesUpgrade snapshot tests migrated from Cirros to RHEL VMs
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (1 error)
✅ Passed checks (4 passed)
✨ 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## cnv-4.22 #5226 +/- ##
===========================================
Coverage ? 98.65%
===========================================
Files ? 25
Lines ? 2459
Branches ? 0
===========================================
Hits ? 2426
Misses ? 33
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
D/S test |
|
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
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. |
|
/retest all |
|
/retest tox |
5204ae2 to
a7ae565
Compare
|
Clean rebase detected — no code changes compared to previous head ( |
|
/build-and-push-container |
|
New container for quay.io/openshift-cnv/openshift-virtualization-tests:pr-5226 published |
|
Verification failed for PR #5226. Execution details |
|
/build-and-push-container |
|
New container for quay.io/openshift-cnv/openshift-virtualization-tests:pr-5226 published |
|
Verification failed for PR #5226. Execution details |
…rification - Extract file constants to dedicated constants.py module - Switch from Cirros to RHEL VM for upgrade tests - Add explicit file existence checks in snapshot restore test - Verify first file exists (pre-snapshot) and second file doesn't (post-snapshot) - Replace cirros-specific run_command with generic run_command_on_vm_and_check_output - Stop running VM before restore to prevent restore conflicts Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Signed-off-by: Jose Manuel Castano <joscasta@redhat.com>
|
Clean rebase detected — no code changes compared to previous head ( |
|
/build-and-push-container |
|
New container for quay.io/openshift-cnv/openshift-virtualization-tests:pr-5226 published |
|
Verification failed for PR #5226. Execution details |
|
/approve |
|
/verified There is only one test failing, not affecting code in this PR, there is already a fix for it. |
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: |
|
If you'd like, I can trigger a fresh full review of the PR, which will surface any fixture/utility impact concerns as normal inline review comments: ✅ Action performedReview finished.
|
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
tests/storage/upgrade/utils.py (1)
20-48: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winMEDIUM: add a docstring — this function now has real side effects.
create_vm_for_snapshot_upgrade_testswas rewritten to build a live VM (with instance type/preference/data volume) and write a file over SSH, yet it has no docstring — unlike its siblingcreate_snapshot_for_upgraderight below it, which documents its behavior. Side effects that aren't obvious from the name/signature (e.g., that it starts the VM and injectsUPGRADE_FIRST_FILE_NAME) should be documented per the repo's docstring rule.📝 Suggested docstring
def create_vm_for_snapshot_upgrade_tests( vm_name, namespace, client, storage_class_for_snapshot, cpu_model, data_source, ): + """Create and start a RHEL VM for snapshot upgrade tests, writing the first upgrade file over SSH. + + Args: + vm_name: Base name for the VM (prefixed with "vm-"). + namespace: Namespace to create the VM in. + client: DynamicClient to use for resource creation. + storage_class_for_snapshot: Storage class supporting snapshots for the data volume template. + cpu_model: CPU model to pin for migration compatibility. + data_source: DataSource used to derive the data volume template. + + Yields: + VirtualMachineForTests: The running VM with the first upgrade file written. + """ with VirtualMachineForTests(As per coding guidelines, "Google-format docstrings REQUIRED - for all public functions with non-obvious return values OR side effects".
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/storage/upgrade/utils.py` around lines 20 - 48, Add a Google-style docstring to create_vm_for_snapshot_upgrade_tests describing that it provisions and starts a live VM, configures the instance type/preference/data volume, writes UPGRADE_FIRST_FILE_NAME over SSH, and yields the running VM for snapshot upgrade tests; place it alongside the existing helper functions in utils.py so the side effects are clear and the repo’s docstring requirement is met.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@tests/storage/upgrade/utils.py`:
- Around line 20-48: Add a Google-style docstring to
create_vm_for_snapshot_upgrade_tests describing that it provisions and starts a
live VM, configures the instance type/preference/data volume, writes
UPGRADE_FIRST_FILE_NAME over SSH, and yields the running VM for snapshot upgrade
tests; place it alongside the existing helper functions in utils.py so the side
effects are clear and the repo’s docstring requirement is met.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 59a47773-e6a5-4305-8263-831331393482
📒 Files selected for processing (5)
tests/storage/upgrade/conftest.pytests/storage/upgrade/constants.pytests/storage/upgrade/test_upgrade_storage.pytests/storage/upgrade/utils.pyutilities/storage.py
💤 Files with no reviewable changes (1)
- utilities/storage.py
|
/approve |
|
Successfully removed PR tag: quay.io/openshift-cnv/openshift-virtualization-tests:pr-5226. |
|
New container for quay.io/openshift-cnv/openshift-virtualization-tests:cnv-4.22 published |
What this PR does / why we need it:
Forwardport: #2917
Which issue(s) this PR fixes:
Special notes for reviewer:
jira-ticket:
Summary by CodeRabbit
New Features
Bug Fixes