Skip to content

WIP: storage, ipv6: CDI upload on IPv6 single-stack clusters#3871

Open
azhivovk wants to merge 2 commits intoRedHatQE:mainfrom
azhivovk:add_ipv6_proxy_virtctl_img_upload_pvc
Open

WIP: storage, ipv6: CDI upload on IPv6 single-stack clusters#3871
azhivovk wants to merge 2 commits intoRedHatQE:mainfrom
azhivovk:add_ipv6_proxy_virtctl_img_upload_pvc

Conversation

@azhivovk
Copy link
Contributor

@azhivovk azhivovk commented Feb 16, 2026

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

  • Tests
    • Added IPv6 single-stack cluster detection in test initialization
    • Enabled CDI upload proxy support for IPv6 environments

Signed-off-by: Asia Khromov <azhivovk@redhat.com>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 16, 2026

Important

Review skipped

Ignore keyword(s) in the title.

⛔ Ignored keywords (1)
  • WIP

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The 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

Cohort / File(s) Summary
Test Configuration & IPv6 Detection
conftest.py
Imports CLUSTER constant and adds runtime detection logic to identify IPv6 single-stack clusters by inspecting the cluster's serviceNetwork configuration, setting ipv6_single_stack_cluster in py_config accordingly.
CDI Upload Test Updates
tests/storage/cdi_upload/test_upload_virtctl.py
Introduces cdi_uploadproxy_url fixture that establishes port-forwarding to the CDI upload proxy service in IPv6 single-stack clusters and returns a localhost HTTPS URL; injects the fixture into test_virtctl_image_upload_pvc to pass the proxy URL to the upload operation.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is incomplete. It provides a short explanation of what the PR does and why, but omits all required template sections like issue references, special reviewer notes, and jira ticket information. Add remaining template sections: identify which issue(s) this fixes, provide special notes for reviewers, and include the jira-ticket (or write 'NONE' if untracked).
Docstring Coverage ⚠️ Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main
Title check ✅ Passed The title directly addresses the main change: adding CDI upload support for IPv6 single-stack clusters. It's specific, concise, and accurately reflects the primary objective of the PR.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-virtualization-qe-bot-5

Report bugs in Issues

Welcome! 🎉

This pull request will be automatically processed with the following features:

🔄 Automatic Actions

  • Reviewer Assignment: Reviewers are automatically assigned based on the OWNERS file in the repository root
  • Size Labeling: PR size labels (XS, S, M, L, XL, XXL) are automatically applied based on changes
  • Issue Creation: A tracking issue is created for this PR and will be closed when the PR is merged or closed
  • Branch Labeling: Branch-specific labels are applied to track the target branch
  • Auto-verification: Auto-verified users have their PRs automatically marked as verified
  • Labels: Enabled categories: branch, can-be-merged, cherry-pick, has-conflicts, hold, needs-rebase, size, verified, wip

📋 Available Commands

PR Status Management

  • /wip - Mark PR as work in progress (adds WIP: prefix to title)
  • /wip cancel - Remove work in progress status
  • /hold - Block PR merging (approvers only)
  • /hold cancel - Unblock PR merging
  • /verified - Mark PR as verified
  • /verified cancel - Remove verification status
  • /reprocess - Trigger complete PR workflow reprocessing (useful if webhook failed or configuration changed)
  • /regenerate-welcome - Regenerate this welcome message

Review & Approval

  • /lgtm - Approve changes (looks good to me)
  • /approve - Approve PR (approvers only)
  • /assign-reviewers - Assign reviewers based on OWNERS file
  • /assign-reviewer @username - Assign specific reviewer
  • /check-can-merge - Check if PR meets merge requirements

Testing & Validation

  • /retest tox - Run Python test suite with tox
  • /retest build-container - Rebuild and test container image
  • /retest verify-bugs-are-open - verify-bugs-are-open
  • /retest all - Run all available tests

Container Operations

  • /build-and-push-container - Build and push container image (tagged with PR number)
    • Supports additional build arguments: /build-and-push-container --build-arg KEY=value

Cherry-pick Operations

  • /cherry-pick <branch> - Schedule cherry-pick to target branch when PR is merged
    • Multiple branches: /cherry-pick branch1 branch2 branch3

Label Management

  • /<label-name> - Add a label to the PR
  • /<label-name> cancel - Remove a label from the PR

✅ Merge Requirements

This PR will be automatically approved when the following conditions are met:

  1. Approval: /approve from at least one approver
  2. LGTM Count: Minimum 2 /lgtm from reviewers
  3. Status Checks: All required status checks must pass
  4. No Blockers: No WIP, hold, conflict labels
  5. Verified: PR must be marked as verified (if verification is enabled)

📊 Review Process

Approvers and Reviewers

Approvers:

  • dshchedr
  • jpeimer
  • myakove
  • rnetser
  • vsibirsk

Reviewers:

  • Ahmad-Hafe
  • RoniKishner
  • dalia-frank
  • dshchedr
  • duyanyan
  • josemacassan
  • jpeimer
  • kgoldbla
  • kshvaika
  • rnetser
  • stesrn
  • vsibirsk
Available Labels
  • hold
  • verified
  • wip
  • lgtm
  • approve

💡 Tips

  • WIP Status: Use /wip when your PR is not ready for review
  • Verification: The verified label is automatically removed on each new commit
  • Cherry-picking: Cherry-pick labels are processed when the PR is merged
  • Container Builds: Container images are automatically tagged with the PR number
  • Permission Levels: Some commands require approver permissions
  • Auto-verified Users: Certain users have automatic verification and merge privileges

For more information, please refer to the project documentation or contact the maintainers.

@azhivovk
Copy link
Contributor Author

/wip

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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'".

Comment on lines 8 to 9
import subprocess
import time
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 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>
@azhivovk azhivovk force-pushed the add_ipv6_proxy_virtctl_img_upload_pvc branch from 0c4baa5 to 0cdb1db Compare February 16, 2026 14:53
@azhivovk
Copy link
Contributor Author

Change: use popen

@openshift-virtualization-qe-bot

D/S test tox -e verify-tc-requirement-polarion failed: cnv-tests-tox-executor/25593

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants