Skip to content

net: NAD live update VM info test#4962

Merged
rnetser merged 5 commits into
RedHatQE:mainfrom
azhivovk:nad-ref-pr1
May 27, 2026
Merged

net: NAD live update VM info test#4962
rnetser merged 5 commits into
RedHatQE:mainfrom
azhivovk:nad-ref-pr1

Conversation

@azhivovk
Copy link
Copy Markdown
Contributor

@azhivovk azhivovk commented May 21, 2026

What this PR does / why we need it:

Adds test_vm_state_iface_info_preserved: verifies that live-updating a secondary Linux bridge network's NAD reference on a running VM does not alter the guest interface identity (MAC address, name,
IP addresses). This is the first test in the NAD live-update series for Linux bridge: it establishes the shared infrastructure that subsequent PRs in
the series build on.

Which issue(s) this PR fixes: -
Special notes for reviewer:

The two connectivity tests and the non-migratable negative test are present as STD placeholders (test = False) they document the full planned test class but are not collected by pytest. They
will be implemented in follow-up PRs.

jira-ticket: https://redhat.atlassian.net/browse/CNV-80573

Summary by CodeRabbit

  • Tests

    • Added fixtures, helpers and a VM factory for VLAN-backed bridge scenarios; new tests verify interface metadata and connectivity remain stable when network-attachment references are changed live.
  • New Features

    • Added an atomic method to update a VM’s network attachments.
    • Cloud-init user data now supports runcmd to run commands on first boot.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 21, 2026

📝 Walkthrough

Walkthrough

Adds cloud-init runcmd support, a VM network patch API, VMI condition waiters, test helpers/fixtures for two-secondary-interface VMs, and tests that perform a live NAD reference swap asserting interface metadata is preserved.

Changes

Linux Bridge NAD Reference Update Test Infrastructure

Layer / File(s) Summary
Cloud-init runcmd support
tests/network/libs/cloudinit.py
Extends UserData dataclass with optional runcmd field for cloud-init first-boot commands.
VM network update API
libs/vm/vm.py
Adds Network import and BaseVirtualMachine.set_networks() to atomically replace spec.template.spec.networks and persist via a single patch.
VMI condition watchers
libs/net/vmspec.py
Adds VMI condition exception types and watch-based helpers wait_for_vmi_condition_status and wait_for_no_vmi_condition to wait for condition appearance/clearance with optional resourceVersion scoping and timeouts.
Bridge interface name constants
tests/network/l2_bridge/libl2bridge.py
Introduces LINUX_BRIDGE_IFACE_NAME_1 and LINUX_BRIDGE_IFACE_NAME_2 constants.
VMI stability helper imports
tests/network/l2_bridge/vmi_interfaces_stability/lib_helpers.py
Replaces local bridge-name constants with imports from libl2bridge.
NAD and VM test fixtures
tests/network/l2_bridge/nad_ref_change/conftest.py
Introduces bridge_nad_a and bridge_nad_b module fixtures creating VLAN-tagged NADs, and under_test_vm_two_ifaces class fixture that provisions a VM with two secondary bridge interfaces, validates reported IPs, and yields the VM for live mutation.
Test helpers and VM factory
tests/network/l2_bridge/nad_ref_change/lib_helpers.py
Adds deterministic constants, update_nad_references() to patch VM template networks and wait for MigrationRequired transitions, and two_secondary_bridge_vm() to build Fedora VMs with optional cloud-init runcmd.
Test implementation for live NAD switching
tests/network/l2_bridge/nad_ref_change/test_nad_ref_change.py
Updates imports to include iface-status lookup and update_nad_references; modifies test_vm_state_iface_info_preserved to accept fixtures, capture pre-update iface metadata, swap the NAD reference for an interface, re-capture metadata, and assert equality; disables certain connectivity tests from collection.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • RedHatQE/openshift-virtualization-tests#4950: Main PR’s L2 NAD reference-change test helpers/VM setup now rely on tests.network.libs.connectivity.ARP_ISOLATION_SYSCTL_CMD and the shared cloud-init wiring updated by retrieved PR #4950, so the changes are directly connected via the same constant/helper integration.
  • RedHatQE/openshift-virtualization-tests#4957: The main PR’s change to tests/network/l2_bridge/vmi_interfaces_stability/lib_helpers.py (switching LINUX_BRIDGE_IFACE_NAME_1/2 to shared constants) directly affects the vmi_interfaces_stability suite that PR #4957 extends with a guest-agent restart stability test.

Suggested labels

new-tests

Suggested reviewers

  • ore lmisan
  • Anatw
  • nirdothan
  • EdDev
  • servolkov
  • yossisegev
  • dshchedr
  • frenzyfriday
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed Title clearly describes the main change: adding a test for NAD (NetworkAttachmentDefinition) live-update VM info verification on Linux bridge networks.
Description check ✅ Passed Description includes all required sections (What/Why, Issues fixed, Special notes, Jira ticket) with substantive content explaining the test's purpose and placeholder status.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stp Link Required ✅ Passed No newly added test files (test_*.py) found. File test_nad_ref_change.py is modified (not new) and already has module-level STP link covering any new test functions per the rule exception.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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-4
Copy link
Copy Markdown

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, has-conflicts labels and PR must be mergeable (no conflicts)
  5. Verified: PR must be marked as verified

📊 Review Process

Approvers and Reviewers

Approvers:

  • EdDev
  • dshchedr
  • myakove
  • rnetser
  • vsibirsk

Reviewers:

  • Anatw
  • EdDev
  • RoniKishner
  • azhivovk
  • dshchedr
  • frenzyfriday
  • nirdothan
  • orelmisan
  • rnetser
  • servolkov
  • vsibirsk
  • yossisegev
Available Labels
  • hold
  • verified
  • wip
  • lgtm
  • approve
AI Features
  • Cherry-Pick Conflict Resolution: Enabled (claude/claude-opus-4-6[1m])

💡 Tips

  • WIP Status: Use /wip when your PR is not ready for review
  • Verification: The verified label is removed on new commits unless the push is detected as a clean rebase
  • 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.

Copy link
Copy Markdown
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: 4

🤖 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/libl2bridge.py`:
- Around line 45-52: MULTI_IFACE_ARP_RUNCMD is missing an explicit type
annotation; add a typing annotation (e.g., List[str]) to the constant
declaration and ensure typing.List (or from typing import List) is imported at
the top of the module so static type checks pass; update the
MULTI_IFACE_ARP_RUNCMD constant definition to include the annotation (List[str])
while keeping the same string elements and semantics.

In `@tests/network/l2_bridge/nad_ref_change/lib_helpers.py`:
- Around line 70-73: Before constructing the list comprehension that zips
iface_names and nad_names into Network(...) entries, add a fail-fast length
validation that checks len(iface_names) == len(nad_names) and raise a clear
exception (e.g., ValueError or AssertionError) if they differ; locate the code
that builds the list of Network objects (the comprehension using iface_names,
nad_names, Network and Multus) and insert the check immediately above it so
mismatched lists fail loudly rather than being silently truncated.

In `@tests/network/l2_bridge/nad_ref_change/test_nad_ref_change.py`:
- Around line 89-95: Add an explicit assertion that the VM interface was updated
to the new NAD before checking invariants: after calling
update_nad_references(...) and waiting for readiness, inspect iface_after =
iface_info(under_test_vm_two_ifaces, VM_IFACE_1) and assert that the interface's
NAD reference field (e.g., the key holding the NetworkAttachmentDefinition name
such as 'nad' or 'network_attachment_definition') equals bridge_nad_b.name; only
then proceed to the existing equality/assertion comparing iface_before and
iface_after so the test fails if the patch was not applied.

In `@tests/network/libs/connectivity.py`:
- Around line 25-36: update_nad_references currently silently ignores update
keys that don't match any interface; change it to fail fast by collecting the
existing interface names from vm.instance.spec.template.spec.networks (the local
variable networks), compute missing = set(updates.keys()) - set(network["name"]
for network in networks), and if missing is non-empty raise a ValueError (or
appropriate exception) listing the missing interface names before performing the
network modifications and calling ResourceEditor(...).update(); keep the rest of
the logic (iterating networks, updating network["multus"]["networkName"], and
the atomic ResourceEditor patch) unchanged.
🪄 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: fe2510c4-b048-48f3-9584-5f15cdcdb2fa

📥 Commits

Reviewing files that changed from the base of the PR and between b51a9bb and b29d1e1.

📒 Files selected for processing (6)
  • tests/network/l2_bridge/libl2bridge.py
  • tests/network/l2_bridge/nad_ref_change/conftest.py
  • tests/network/l2_bridge/nad_ref_change/lib_helpers.py
  • tests/network/l2_bridge/nad_ref_change/test_nad_ref_change.py
  • tests/network/libs/cloudinit.py
  • tests/network/libs/connectivity.py

Comment thread tests/network/l2_bridge/libl2bridge.py Outdated
Comment thread tests/network/l2_bridge/nad_ref_change/lib_helpers.py
Comment thread tests/network/l2_bridge/nad_ref_change/test_nad_ref_change.py Outdated
Comment thread tests/network/libs/connectivity.py Outdated
@azhivovk
Copy link
Copy Markdown
Contributor Author

Change: drop connectivity related changes - will implement in upcoming PRs

Comment thread libs/net/vmspec.py
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 27, 2026

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Step 1: Get current head commit SHA
HEAD_SHA=$(gh pr view 4962 --repo RedHatQE/openshift-virtualization-tests --json headRefOid -q .headRefOid)
echo "HEAD SHA: $HEAD_SHA"

# Step 2: Get list of changed files
echo "=== Changed files ==="
gh pr diff 4962 --repo RedHatQE/openshift-virtualization-tests --name-only

# Step 3: Get diff to find first changed line of first file
echo "=== PR diff (first 120 lines) ==="
gh pr diff 4962 --repo RedHatQE/openshift-virtualization-tests | head -120

Length of output: 5536


🏁 Script executed:

#!/bin/bash
# Post inline review comment on libs/net/vmspec.py line 6 (first changed line, new import)
gh api \
  --method POST \
  -H "Accept: application/vnd.github+json" \
  repos/RedHatQE/openshift-virtualization-tests/pulls/4962/comments \
  -f body="**Test Execution Plan**

- **Run smoke tests: False** — No concrete dependency path exists from any smoke-marked test to the changed files. All changes are additive or backward-compatible (new exception classes, new watch helpers, optional \`runcmd\` field defaulting to \`None\`, new constants, import refactor with identical values).

- \`tests/network/l2_bridge/nad_ref_change/test_nad_ref_change.py::TestRunningVMLinuxBridgeVlanChange::test_vm_state_iface_info_preserved\` — newly enabled test; validates guest interface identity (MAC, name, IPs) is preserved after a live NAD reference update.

- \`tests/network/l2_bridge/vmi_interfaces_stability/test_interfaces_stability.py\`\`LINUX_BRIDGE_IFACE_NAME_1\`/\`LINUX_BRIDGE_IFACE_NAME_2\` are now imported from \`libl2bridge\` instead of being locally defined; values are identical but the import refactor warrants a run." \
  -f commit_id="3d2c619ee69e7ad94c5c195e9eeeba326a8f2a3d" \
  -f path="libs/net/vmspec.py" \
  -F line=6 \
  -f side="RIGHT"
echo "Exit code: $?"

Length of output: 4866



@EdDev
Copy link
Copy Markdown
Contributor

EdDev commented May 27, 2026

/approve

Copy link
Copy Markdown
Contributor

@frenzyfriday frenzyfriday left a comment

Choose a reason for hiding this comment

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

/lgtm

Comment thread libs/net/vmspec.py Outdated
Comment thread libs/net/vmspec.py Outdated
Comment thread tests/network/l2_bridge/nad_ref_change/test_nad_ref_change.py
Comment thread tests/network/l2_bridge/nad_ref_change/lib_helpers.py
Comment thread libs/vm/vm.py
Comment thread tests/network/libs/cloudinit.py
@servolkov
Copy link
Copy Markdown
Contributor

My comments can be considered as nit and fixed in a follow-up (don't want to block the PR)

azhivovk added 3 commits May 27, 2026 19:42
Add Watch-API-based helpers for waiting on VMI status
conditions, following the same resource-version-capture pattern
as lookup_iface_status, to avoid missing transitions between
the triggering action and the watch.

Two separate helpers make the intent explicit:
use wait_for_vmi_condition when a condition must be present with
a given status, and wait_for_no_vmi_condition when
it must have been cleared.

Signed-off-by: Asia Khromov <azhivovk@redhat.com>
Assisted-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Asia Khromov <azhivovk@redhat.com>
Assisted-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Add test_vm_state_iface_info_preserved: verifies that updating the
NAD reference on a running VM's secondary Linux bridge network does
not alter the guest interface MAC address, name, or IP addresses.

Introduces two_secondary_bridge_vm() — a shared VM factory for
Linux bridge tests with multiple secondary interfaces — and the
supporting fixtures.

Update nad helper is saving the resource version of VMI, then
updating NAD and then ensures the changes are applied
by watching the conditions - MigrationRequired=True and then
the condition disappears.
Currently, this is the way of knowing the NAD live update was
successfully  applied.

Signed-off-by: Asia Khromov <azhivovk@redhat.com>
Assisted-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@azhivovk
Copy link
Copy Markdown
Contributor Author

Change: Remove empty list and avoid false "True" in all()

Copy link
Copy Markdown
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.

♻️ Duplicate comments (1)
libs/net/vmspec.py (1)

273-276: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

HIGH: Treat empty/None conditions as “not set” in wait_for_no_vmi_condition

Line 274 and Line 284 currently require existing_conditions to be truthy before calling _vmi_condition_not_set(...). That blocks the success path when conditions are None/[], even though this function is documented to succeed when the condition is absent, and can cause an unnecessary timeout.

Suggested fix
-    existing_conditions = vmi_instance.status.conditions
-    if existing_conditions and _vmi_condition_not_set(
-        existing_conditions=existing_conditions, required_condition=condition
-    ):
+    existing_conditions = vmi_instance.status.conditions
+    if _vmi_condition_not_set(
+        existing_conditions=existing_conditions or [], required_condition=condition
+    ):
         return
@@
-        existing_conditions = event["object"].status.conditions
-        if existing_conditions and _vmi_condition_not_set(
-            existing_conditions=existing_conditions, required_condition=condition
-        ):
+        existing_conditions = event["object"].status.conditions
+        if _vmi_condition_not_set(
+            existing_conditions=existing_conditions or [], required_condition=condition
+        ):
             return

Also applies to: 283-286

🤖 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 `@libs/net/vmspec.py` around lines 273 - 276, In wait_for_no_vmi_condition,
don't gate the check on existing_conditions being truthy — treat None or an
empty list as "condition not set": remove the `if existing_conditions and
_vmi_condition_not_set(...)` pattern and instead call
`_vmi_condition_not_set(existing_conditions=existing_conditions,
required_condition=condition)` unconditionally (or update
`_vmi_condition_not_set` to explicitly return True for None/[]); reference
`existing_conditions`, `_vmi_condition_not_set`, and `wait_for_no_vmi_condition`
when making the change so the function succeeds immediately when conditions are
absent.
🤖 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.

Duplicate comments:
In `@libs/net/vmspec.py`:
- Around line 273-276: In wait_for_no_vmi_condition, don't gate the check on
existing_conditions being truthy — treat None or an empty list as "condition not
set": remove the `if existing_conditions and _vmi_condition_not_set(...)`
pattern and instead call
`_vmi_condition_not_set(existing_conditions=existing_conditions,
required_condition=condition)` unconditionally (or update
`_vmi_condition_not_set` to explicitly return True for None/[]); reference
`existing_conditions`, `_vmi_condition_not_set`, and `wait_for_no_vmi_condition`
when making the change so the function succeeds immediately when conditions are
absent.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 1309aea9-7c2c-426f-a090-62b30f00b334

📥 Commits

Reviewing files that changed from the base of the PR and between 3d2c619 and 2d48c5d.

📒 Files selected for processing (6)
  • libs/net/vmspec.py
  • tests/network/l2_bridge/libl2bridge.py
  • tests/network/l2_bridge/nad_ref_change/conftest.py
  • tests/network/l2_bridge/nad_ref_change/lib_helpers.py
  • tests/network/l2_bridge/nad_ref_change/test_nad_ref_change.py
  • tests/network/l2_bridge/vmi_interfaces_stability/lib_helpers.py

@azhivovk
Copy link
Copy Markdown
Contributor Author

/verified
Dual-stack BM with cnv-4.22:
uv run pytest --verbose -rs -s -o log_cli=true --leftovers-collector --tb=native --skip-deprecated-api-test --cluster-sanity-skip-storage-check tests/network/l2_bridge/nad_ref_change/test_nad_ref_change.py
Result: 1 passed, 1 deselected in 386.60s (0:06:26)

@openshift-virtualization-qe-bot-3
Copy link
Copy Markdown
Contributor

@coderabbitai

Test execution plan request details

CRITICAL: You MUST post an inline review comment on the first changed line of the first file.
The inline comment should contain the Test Execution Plan with the smoke tests recommendation.
Do NOT submit a formal review - just post the inline comment directly.

As an expert software testing engineer, analyze all modified files in this PR and create a targeted test execution plan.
You will post an inline review comment with the test execution plan on the first changed file.
If you fail to run or post a comment, retry.

Analysis Requirements:

  1. Examine code changes in each modified file
  2. Identify affected code paths, functions, and classes
  3. Analyze pytest-specific elements: fixtures (scope, dependencies), parametrization, markers, conftest changes
  4. Trace test dependencies through imports, shared utilities, and fixture inheritance
  5. Detect new tests introduced in the PR
  6. Smoke Test Impact Analysis: Determine if any changes could affect smoke tests by checking:
    • Changes to files/functions used by tests marked with @pytest.mark.smoke
    • Changes to fixtures or utilities imported by smoke tests
    • Changes to conftest.py files that may affect smoke test execution
    • Changes to core infrastructure code (utilities/, libs/) that smoke tests depend on

Your deliverable:
Your change request comment will be based on the following requirements:

Test Execution Plan

  • Run smoke tests: True / False (Based on your smoke test impact analysis - True if any changes may affect smoke tests)
  • path/to/test_file.py - When the entire test file needs verification
  • path/to/test_file.py::TestClass::test_method - When specific test(s) needed
  • path/to/test_file.py::test_function - When specific test(s) needed
  • -m marker - When specific marker(s) can be used to cover multiple cases.

Guidelines:

  • Include only tests directly affected by the changes
  • Use a full file path only if ALL tests in that file require verification
  • Use file path + test name if only specific tests are needed
  • If a test marker can cover multiple files/tests, provide the marker
  • Balance coverage vs over-testing - Keep descriptions minimal

Hardware-Related Checks (SR-IOV, GPU, DPDK):

When PR modifies fixtures for hardware-specific resources:

  • Collection Safety: Fixtures MUST have existence checks (return None when hardware unavailable)
  • Test Plan: MUST verify both WITH and WITHOUT hardware:
    • Run affected tests on cluster WITH hardware
    • Verify collection succeeds on cluster WITHOUT hardware

CRITICAL WORKFLOW COMPLETION RULES:

When responding to this test execution plan request, you MUST follow these rules EXACTLY:

  1. YOUR ONLY DELIVERABLE: Post an inline review comment containing the test execution plan on the first changed line
  2. THEN STOP IMMEDIATELY - Do NOT generate any additional response
  3. FALLBACK ONLY: If submitting the review fails after retrying, post as a regular PR comment
  4. SILENCE = SUCCESS: After successfully submitting the review, your task is complete. No confirmation needed.

ABSOLUTE PROHIBITIONS (violating these creates empty/meaningless reviews):

  • ❌ Do NOT post acknowledgment messages like "Test execution plan posted", "Review posted successfully", "I've successfully posted"
  • ❌ Do NOT mention review IDs, URLs, or confirmation of posting in the PR thread
  • ❌ Do NOT add any follow-up comments after submitting the review
  • ❌ Do NOT reply to confirm task completion
  • ❌ Do NOT explain what you did - just do it and stop

Remember: The pull request review is visible to users. Additional comments are redundant noise.

CRITICAL: Before setting "Run smoke tests: True", you MUST use shell scripts to:
- Trace the actual fixture dependency chain from smoke tests to changed fixtures
- Verify that smoke tests actually import/use changed utilities or functions
- Confirm the dependency path exists; do NOT assume based on scope or semantics
- Be conservative: Session-scoped fixtures or infrastructure-sounding names do NOT
automatically mean smoke test impact. Only flag smoke test impact when you can
demonstrate a concrete dependency path.
WRONG: "This session-scoped storage fixture might affect smoke tests"
RIGHT: "Smoke test X uses fixture Y, which depends on the changed fixture Z"

Comment thread libs/net/vmspec.py
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 27, 2026

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Get current HEAD SHA and first changed line
HEAD_SHA=$(gh pr view 4962 --repo RedHatQE/openshift-virtualization-tests --json headRefOid -q .headRefOid)
echo "HEAD SHA: $HEAD_SHA"

# Get first changed file
FIRST_FILE=$(gh pr diff 4962 --repo RedHatQE/openshift-virtualization-tests --name-only | head -1)
echo "First file: $FIRST_FILE"

# Get the diff for that file to find the first added line number
gh pr diff 4962 --repo RedHatQE/openshift-virtualization-tests | head -60

Length of output: 2590


🏁 Script executed:

#!/bin/bash
# Post inline review comment on libs/net/vmspec.py line 6 for the latest commit
gh api \
  --method POST \
  -H "Accept: application/vnd.github+json" \
  repos/RedHatQE/openshift-virtualization-tests/pulls/4962/comments \
  -f body="**Test Execution Plan**

- **Run smoke tests: False** — No concrete dependency path exists from any smoke-marked test to the changed files. All changes are additive or backward-compatible (new exception classes, new VMI watch helpers, optional \`runcmd\` field defaulting to \`None\`, new constants, import refactor with identical values).

- \`tests/network/l2_bridge/nad_ref_change/test_nad_ref_change.py::TestRunningVMLinuxBridgeVlanChange::test_vm_state_iface_info_preserved\` — newly enabled test; validates guest interface identity (MAC, name, IPs) is preserved after a live NAD reference update.

- \`tests/network/l2_bridge/vmi_interfaces_stability/test_interfaces_stability.py\`\`LINUX_BRIDGE_IFACE_NAME_1\`/\`LINUX_BRIDGE_IFACE_NAME_2\` are now imported from \`libl2bridge\` instead of being locally defined; values are identical but the import refactor warrants a run." \
  -f commit_id="2d48c5d0e94b01ff4a92b87459aac8fe786648a6" \
  -f path="libs/net/vmspec.py" \
  -F line=6 \
  -f side="RIGHT"
echo "Exit code: $?"

Length of output: 4863



Copy link
Copy Markdown
Contributor

@frenzyfriday frenzyfriday left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link
Copy Markdown
Collaborator

@rnetser rnetser left a comment

Choose a reason for hiding this comment

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

/approve
/lgtm

@azhivovk
Copy link
Copy Markdown
Contributor Author

/check-can-merge

@openshift-virtualization-qe-bot-5
Copy link
Copy Markdown

New container for quay.io/openshift-cnv/openshift-virtualization-tests:latest published

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.

10 participants