WIP: storage, ipv6: CDI upload on IPv6 single-stack clusters#3871
WIP: storage, ipv6: CDI upload on IPv6 single-stack clusters#3871azhivovk wants to merge 2 commits intoRedHatQE:mainfrom
Conversation
Signed-off-by: Asia Khromov <azhivovk@redhat.com>
|
Important Review skippedIgnore keyword(s) in the title. ⛔ Ignored keywords (1)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe pull request adds IPv6 single-stack cluster detection to the test configuration via a runtime check of the cluster's serviceNetwork, storing the result in py_config. It also introduces a new fixture for obtaining CDI upload proxy URLs in IPv6 single-stack environments, complete with port-forwarding setup and teardown. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (2 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
💡 Tips
For more information, please refer to the project documentation or contact the maintainers. |
|
/wip |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@tests/storage/cdi_upload/test_upload_virtctl.py`:
- Around line 8-9: The test imports the time module but the reviewer notes
time.sleep should be removed when switching to a subprocess.Popen readiness
check; remove the unused import and replace any time.sleep usage in
tests/storage/cdi_upload/test_upload_virtctl.py with a proper readiness loop
that polls the subprocess started with subprocess.Popen (or update the fixture
that starts the process) until the expected output/port is ready, ensuring no
dead time.sleep and removing the now-unused import time.
- Around line 58-81: The fixture cdi_uploadproxy_url is treated as a generator
(contains yield) so replace the early return with "yield None" to avoid pytest
generator termination; replace the time.sleep(2) with a retry/wait loop (e.g.,
timeout_sampler or similar polling) that checks the port-forward readiness;
start the port-forward using subprocess.Popen with an args list (no shell=True)
in cdi_uploadproxy_url so you capture the process handle, store that handle (or
PID) and on teardown kill/terminate that specific process instead of running a
broad "pkill -f 'oc port-forward'".
| import subprocess | ||
| import time |
There was a problem hiding this comment.
🧹 Nitpick | 🔵 Trivial
LOW: import time can be removed if you adopt the subprocess.Popen approach.
If the time.sleep is replaced with a proper readiness check or kept only temporarily, the time import would become dead code once removed. Keep this in sync with the fixture fix.
🤖 Prompt for AI Agents
In `@tests/storage/cdi_upload/test_upload_virtctl.py` around lines 8 - 9, The test
imports the time module but the reviewer notes time.sleep should be removed when
switching to a subprocess.Popen readiness check; remove the unused import and
replace any time.sleep usage in tests/storage/cdi_upload/test_upload_virtctl.py
with a proper readiness loop that polls the subprocess started with
subprocess.Popen (or update the fixture that starts the process) until the
expected output/port is ready, ensuring no dead time.sleep and removing the
now-unused import time.
Add port-forward fixture to enable virtctl image upload on IPv6 single-stack clusters, where the upload proxy route resolves to unreachable IPv4 addresses. Signed-off-by: Asia Khromov <azhivovk@redhat.com>
0c4baa5 to
0cdb1db
Compare
|
Change: use popen |
|
D/S test |
Add port-forward fixture to enable virtctl image upload
on IPv6 single-stack clusters, where the upload proxy route
resolves to unreachable IPv4 addresses.
Summary by CodeRabbit
Release Notes