WIP: infra: align tests to fit multiarch needs #4788
WIP: infra: align tests to fit multiarch needs #4788geetikakay wants to merge 3 commits intoRedHatQE:mainfrom
Conversation
Update multiarch matrix generation so preference and DataSource names match architecture-specific cluster naming for RHEL, Fedora, and CentOS. Signed-off-by: Geetika Kapoor <gkapoor@redhat.com> Assisted-by: Cursor
Replace package-manager helper lookup with an explicit rpm query so guest-agent presence checks are consistent across environments. Signed-off-by: Geetika Kapoor <gkapoor@redhat.com>
Add and refactor unit tests to validate arch suffix handling and DataSource naming, and align new test inputs with existing constants. Signed-off-by: Geetika Kapoor <gkapoor@redhat.com> Assisted-by: Cursor
|
/wip |
📝 WalkthroughWalkthroughThis PR extends instance-type OS matrix generation with conditional architecture suffix handling via a new ChangesArchitecture Preference Suffix Control
QEMU Guest Agent Detection
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4788 +/- ##
==========================================
+ Coverage 98.63% 98.67% +0.03%
==========================================
Files 25 25
Lines 2420 2487 +67
==========================================
+ Hits 2387 2454 +67
Misses 33 33
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
utilities/virt.py (1)
1-1:⚠️ Potential issue | 🟠 Major | ⚡ Quick winHIGH: Restore required PR template sections in the PR description.
The PR description is missing required template headers. Please add:
##### What this PR does / why we need it:(must contain meaningful content)##### Which issue(s) this PR fixes:##### Special notes for reviewer:##### jira-ticket:As per coding guidelines: “Required sections (must be present, even if empty) …
What this PR does / why we need it:— MUST be present AND have meaningful content … If any required section is absent … flag it as HIGH severity.”🤖 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 `@utilities/virt.py` at line 1, The PR description is missing required template headers; edit the PR description (not the code) to restore the sections: add a meaningful paragraph under "##### What this PR does / why we need it:", add "##### Which issue(s) this PR fixes:", add "##### Special notes for reviewer:", and add "##### jira-ticket:" with the ticket ID (or N/A) so the PR complies with guidelines; reference this PR that touches utilities/virt.py (e.g., where the change is the import line "from __future__ import annotations") to ensure the description clearly explains why that change was made and links to the related issue/jira.
🤖 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.
Inline comments:
In `@utilities/os_utils.py`:
- Around line 257-262: The function generate_linux_instance_type_os_matrix
currently has a boolean parameter arch_in_preference that should be keyword-only
to satisfy Ruff FBT001/FBT002; update the function signature for
generate_linux_instance_type_os_matrix by inserting a bare * before arch_suffix
(or before arch_in_preference) so arch_in_preference becomes keyword-only,
leaving all other logic unchanged and ensuring existing call sites that already
pass arch_in_preference by keyword continue to work.
---
Outside diff comments:
In `@utilities/virt.py`:
- Line 1: The PR description is missing required template headers; edit the PR
description (not the code) to restore the sections: add a meaningful paragraph
under "##### What this PR does / why we need it:", add "##### Which issue(s)
this PR fixes:", add "##### Special notes for reviewer:", and add "#####
jira-ticket:" with the ticket ID (or N/A) so the PR complies with guidelines;
reference this PR that touches utilities/virt.py (e.g., where the change is the
import line "from __future__ import annotations") to ensure the description
clearly explains why that change was made and links to the related issue/jira.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: e8c017d4-00dc-4654-bc96-58fd0a2b862f
📒 Files selected for processing (6)
tests/global_config_multiarch.pyutilities/os_utils.pyutilities/pytest_utils.pyutilities/unittests/test_os_utils.pyutilities/unittests/test_pytest_utils.pyutilities/virt.py
|
/build-and-push-container |
|
New container for quay.io/openshift-cnv/openshift-virtualization-tests:pr-4788 published |
Update multiarch matrix generation so preference and DataSource names match architecture-specific cluster naming for RHEL, Fedora, and CentOS.
Short description:
More details:
What this PR does / why we need it:
Which issue(s) this PR fixes:
Special notes for reviewer:
rrmngmnt's package manager auto-detection uses which to find the package manager binary which is not available in centos-stream10 and hence some of tests didn't work. 8e0f430 is to fix it.
jira-ticket:
Summary by CodeRabbit
New Features
Bug Fixes
Tests