net: adapt test helpers to Fedora 43#4873
Conversation
|
Caution Review failedFailed to post review comments 📝 WalkthroughWalkthroughCentralizes interface-related exceptions in libs/net/vmspec, defers a runtime VM type import, updates VM and network utilities to use vmspec lookup/error helpers (including IP resolution via lookup_iface_status_ip), updates tests to expect the new exceptions, and extends console escape stripping. ChangesException Centralization and Network Utility Refactoring
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 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🔥 ProblemsStopped waiting for pipeline failures after 30000ms. One of your pipelines takes longer than our 30000ms fetch window to run, so review may not consider pipeline-failure results for inline comments if any failures occurred after the fetch window. Increase the timeout if you want to wait longer or run a Linked repositories: Couldn't analyze 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 #4873 +/- ##
==========================================
- Coverage 98.67% 98.65% -0.02%
==========================================
Files 25 25
Lines 2487 2459 -28
==========================================
- Hits 2454 2426 -28
Misses 33 33
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:
|
7c38e3a to
25c680a
Compare
fb3143c to
339b773
Compare
|
Clean rebase detected — no code changes compared to previous head ( |
|
D/S test |
|
Caution Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted. Error details |
|
/retest all Auto-triggered: Files in this PR were modified by merged PR #4954. Overlapping filestests/network/l2_bridge/libl2bridge.py |
|
/retest all Auto-triggered: Files in this PR were modified by merged PR #4660. Overlapping filestests/network/l2_bridge/libl2bridge.py |
Anatw
left a comment
There was a problem hiding this comment.
Thank you Sergei for making or code base better
|
/retest all Auto-triggered: Files in this PR were modified by merged PR #4916. Overlapping filesutilities/virt.py |
|
/retest all Auto-triggered: Files in this PR were modified by merged PR #5103. Overlapping filesutilities/virt.py |
|
/retest all Auto-triggered: Files in this PR were modified by merged PR #5135. Overlapping filesutilities/virt.py |
|
/check-can-merge |
|
/retest all |
|
this pr does not affect smoke tests; overruling the pending ci |
|
New container for quay.io/openshift-cnv/openshift-virtualization-tests:latest published |
What this PR does / why we need it:
Fix test failures caused by the Fedora 41 → 43 container image upgrade (PR #4322):
Console output parsing broken — Fedora 43 (systemd 256+) emits OSC 8003
session-tracking escape sequences. The ANSI regex in
vm_console_run_commandsonly stripped CSI sequences, leaving OSC markers in parsed output. This caused
json.loads()to fail intest_vm_is_started_with_successful_connectivity.IP lookup race condition —
get_ip_from_vm_or_virt_handler_podreadvmi.interfaces[0]["ipAddresses"]once without waiting. Fedora 43's guest agentreports IPs slower than Fedora 41, so
ipAddresseswas stillNoneright afterAgentConnectedbecameTrue, crashingtest_connectivity_over_pod_network.Which issue(s) this PR fixes:
failures from PR #4322
Special notes for reviewer:
Importing
lookup_iface_status_ipfromlibs/net/vmspecintoutilities/network.pywasblocked by the circular dependency caused by
IfaceNotFoundliving inutilities/network.py.IfaceNotFoundwas a single exception incorrectly covering both spec and status lookupfailures with a misleading "Interface not found for NAD" message. Replaced each usage
with the semantically correct exception.
Removing
IfaceNotFoundis a prerequisite for the race condition fix.jira-ticket:
NONE
Summary by CodeRabbit
Bug Fixes
Refactor
Tests