net, tests, stuntime: Add remaining l2bridge migration stuntime scenarios#5026
Conversation
|
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. |
📝 WalkthroughWalkthroughFixtures and test imports updated to label client VMs and control pod placement affinity. Test class parametrized by ChangesL2 Bridge Stuntime Testing Updates
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested labels
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)
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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 `@tests/network/l2_bridge/migration_stuntime/conftest.py`:
- Line 29: The new "# type: ignore" masks a typing root cause when accessing
bridge_nncp.desired_state_spec.interfaces[0].name for
libnad.CNIPluginBridgeConfig; instead of suppressing, narrow or cast the type so
the index and .name are statically valid and then remove the ignore. Concretely,
update the code that defines or references bridge_nncp.desired_state_spec (or
assign it to a local variable) with an explicit type annotation or a typing.cast
to the correct dataclass/Sequence[...] type for .interfaces (or assert its type)
so that interfaces[0].name is recognized as a str, then restore the call to
plugins=[libnad.CNIPluginBridgeConfig(bridge=bridge_nncp.desired_state_spec.interfaces[0].name)]
without any "# type: ignore".
In `@tests/network/l2_bridge/migration_stuntime/test_migration_stuntime.py`:
- Around line 82-83: The test methods in TestMigrationStuntime are using the
wrong fixture name: replace the parameter ip_family with l2_bridge_ip_family in
each affected test method signature (e.g., the method currently declared as
"(self, admin_client, ip_family, stuntime_client_vm, l2_bridge_active_ping)") so
they match the class-level parametrization that uses l2_bridge_ip_family
(indirect=True); update all 5 test function signatures to accept
l2_bridge_ip_family instead of ip_family to restore correct fixture resolution.
🪄 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: 6dc98428-34ff-458a-9077-39457ce508fb
📒 Files selected for processing (6)
tests/network/l2_bridge/libl2bridge.pytests/network/l2_bridge/migration_stuntime/conftest.pytests/network/l2_bridge/migration_stuntime/test_migration_stuntime.pytests/network/libs/stuntime.pytests/network/localnet/migration_stuntime/conftest.pytests/network/localnet/migration_stuntime/test_migration_stuntime.py
1d1f013 to
a5de3b9
Compare
|
/build-and-push-container |
|
Verification failed for PR #5026 (image: openshift-virtualization-tests:pr-5026). |
|
/verified Tested on bm03-tlv2 |
Implement the remaining stuntime measurement tests for Linux bridge live migration, covering all client/server migration directions with IPv4/IPv6. Follows the same pattern as the localnet stuntime PR — Single parametrized class with class-level l2_bridge_ip_family parametrize to group all scenarios per IP family before moving to the next. VMs depend on l2_bridge_ip_family so they're recreated per group, giving each IP family fresh VMs with clean network state. Tests run incrementally within each group, each migration building on the VM positions left by the previous scenario. Add disableContainerInterface=True to the Linux bridge NAD to match the documented configuration and let kubevirt manage the interface directly during migration. Signed-off-by: Anat Wax <awax@redhat.com> Assisted-by: Claude <noreply@anthropic.com>
|
Clean rebase detected — no code changes compared to previous head ( |
|
orelmisan can not be added as reviewer. 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest/pulls/review-requests#request-reviewers-for-a-pull-request", "status": "404"} |
|
frenzyfriday can not be added as reviewer. 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest/pulls/review-requests#request-reviewers-for-a-pull-request", "status": "404"} |
|
nirdothan can not be added as reviewer. 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest/pulls/review-requests#request-reviewers-for-a-pull-request", "status": "404"} |
|
yossisegev can not be added as reviewer. 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest/pulls/review-requests#request-reviewers-for-a-pull-request", "status": "404"} |
|
EdDev can not be added as reviewer. 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest/pulls/review-requests#request-reviewers-for-a-pull-request", "status": "404"} |
|
rnetser can not be added as reviewer. 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest/pulls/review-requests#request-reviewers-for-a-pull-request", "status": "404"} |
|
azhivovk can not be added as reviewer. 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest/pulls/review-requests#request-reviewers-for-a-pull-request", "status": "404"} |
|
servolkov can not be added as reviewer. 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest/pulls/review-requests#request-reviewers-for-a-pull-request", "status": "404"} |
|
/verified No code changes. |
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
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: |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Get current HEAD SHA for PR 5026
gh pr view 5026 --repo RedHatQE/openshift-virtualization-tests --json headRefOid --jq '.headRefOid'
echo "=== Get PR files to confirm first changed line ==="
gh api repos/RedHatQE/openshift-virtualization-tests/pulls/5026/files \
--jq '.[] | {filename: .filename, patch: (.patch | split("\n")[0:3] | join("\n"))}' 2>/dev/null | head -60Length of output: 845 🏁 Script executed: #!/bin/bash
gh api \
repos/RedHatQE/openshift-virtualization-tests/pulls/5026/reviews \
--method POST \
--field commit_id="165ffb2a4da726447d3817eccb0ecd691c70a97a" \
--field event="COMMENT" \
--field body="" \
--field "comments[][path]=tests/network/l2_bridge/migration_stuntime/conftest.py" \
--field "comments[][line]=12" \
--field "comments[][side]=RIGHT" \
--field "comments[][body]=**Test Execution Plan**
**Run smoke tests: False**
No smoke-marked test file has a traced dependency path to the modified fixtures or symbols in this PR.
**Run gating tests: False**
No gating-marked test file has a traced dependency path to the modified fixtures or symbols in this PR.
**Affected tests to run:**
All changes are self-contained within the l2_bridge migration stuntime module. Run all six scenarios for both IPv4 and IPv6 parametrizations:
- \`tests/network/l2_bridge/migration_stuntime/test_migration_stuntime.py::TestMigrationStuntime::test_client_migrates_off_server_node\`
- \`tests/network/l2_bridge/migration_stuntime/test_migration_stuntime.py::TestMigrationStuntime::test_client_migrates_between_non_server_nodes\`
- \`tests/network/l2_bridge/migration_stuntime/test_migration_stuntime.py::TestMigrationStuntime::test_client_migrates_to_server_node\`
- \`tests/network/l2_bridge/migration_stuntime/test_migration_stuntime.py::TestMigrationStuntime::test_server_migrates_off_client_node\`
- \`tests/network/l2_bridge/migration_stuntime/test_migration_stuntime.py::TestMigrationStuntime::test_server_migrates_between_non_client_nodes\` — quarantined via \`@pytest.mark.jira(\"CNV-88755\", run=False)\`; expected skip/xfail
- \`tests/network/l2_bridge/migration_stuntime/test_migration_stuntime.py::TestMigrationStuntime::test_server_migrates_to_client_node\`
Suggested run command: \`pytest -m tier3 tests/network/l2_bridge/migration_stuntime/\`"Length of output: 3665 🧠 Learnings used |
|
/approve |
|
Successfully removed PR tag: quay.io/openshift-cnv/openshift-virtualization-tests:pr-5026. |
|
/cherry-pick cnv-4.22 |
|
Cherry-picked PR net, tests, stuntime: Add remaining l2bridge migration stuntime scenarios into cnv-4.22: #5130 |
Short description:
Complete L2 bridge stuntime coverage for both IP families.
More details:
What this PR does / why we need it:
Add remaining stuntime measurement tests for Linux bridge with both IPv4 and IPv6 coverage, through different migration directions.
Which issue(s) this PR fixes:
Special notes for reviewer:
jira-ticket:
https://redhat.atlassian.net/browse/CNV-80577
Summary by CodeRabbit