← Back to Pull requests

test: make empty network selection independent of host devices #7342

Merged
stevekuznetsov merged 1 files (10 lines) on Oct 15, 2026 10:54 UTC
View on GitHub
stevekuznetsov stevekuznetsov commented on Oct 03, 2026 22:32 UTC
Author

Why

The empty-selection test assumes the host has no PCI-backed interfaces. SwiftDevicePairFilter deliberately accepts PCI links, so ordinary Ethernet and Wi-Fi interfaces make the test fail on a developer machine without SWIFT hardware.

This was discovered while running the full local unit suite for #7332. It is unrelated to that PR's version-catalog implementation or its CI HTTP-connection leak, and is extracted here for independent review. No separate tracking ticket exists for this host-dependent test issue.

Local Failure

The original test produced:

--- FAIL: TestRunSwiftDevicePairFilterEmptySelectedSet (0.00s)
    netwatch_test.go:117: SwiftDevicePairFilter unexpectedly selected 2 interfaces in a namespace with no SWIFT hardware
FAIL github.com/Azure/ARO-HCP/swift-recorder/pkg/netwatch

The two selected links were the host's enp5s0 Ethernet and wlp6s0 Wi-Fi interfaces, both reporting ParentBus:pci. The failure is reproducible with the existing default filter; it does not depend on a SWIFT virtual function being present.

What

Inject a reject-all filter into the test of Run's available-but-empty initial record, and rename it to describe that behavior. The separate TestSwiftDevicePairFilter table continues to test PCI, vmbus, and ordinary-link selection. Production filtering and recorder behavior are unchanged.

Testing

Passed go test -race -count=20 ./swift-recorder/pkg/netwatch on the affected host.

@geoberle: requesting your review as the author of the original root-link recorder test (6b35b0e04).

Diff: 10 lines (+4 / -6) across 1 files Reviewer: raelga Review duration: 16582m
All Vouch review confidence checks passed
Residual risk 0.02 = Change Risk (0.17) × (1 − Review Confidence (0.91)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.17 · 10 lines diff across 1 files
0.17
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.90 · 5 substantive comment(s)
0.90
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 50%
91%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.143
Real PR Conversation Timeline
18 items
openshift-merge-bot[bot] openshift-merge-bot[bot] commented on Oct 03, 2026 22:32 UTC
Bot

Pipeline controller notification

This PR uses the pipeline controller for second-stage tests. Selection and triggering follow the repository configuration.

Use /test ? to list jobs, /pipeline remaining to request missing second-stage tests, or /pipeline required to rerun the selected second-stage set.

openshift-ci[bot] openshift-ci[bot] commented on Oct 03, 2026 22:32 UTC
Bot

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

copilot-pull-request-reviewer[bot] copilot-pull-request-reviewer[bot] commented on Oct 03, 2026 22:34 UTC
Reviewer

<!-- ccr-overview-v2 -->

Copilot review overview

🟢 Approval recommended

The focused test-only change correctly preserves coverage while eliminating host-dependent behavior.

Review effort: Balanced
Findings: None

<details>
<summary><strong>What changed in this PR</strong></summary>

Makes the empty-selection test deterministic across hosts with PCI-backed network interfaces.

Changes:

  • Injects a reject-all filter into the test.

  • Renames the test and updates its diagnostics.
  • | File | Description |
    | ---- | ----------- |
    | swift-recorder/​pkg/​netwatch/​netwatch_test.go | Removes host-device assumptions from the empty-state test. |
    </details>

    ---

    💡 <a href="/Azure/ARO-HCP/new/main?filename=.github/skills/code-review/SKILL.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Add a code-review agent skill</a> or configure MCP servers for context-aware, tailored reviews. <a href="https://docs.github.com/copilot/how-tos/use-copilot-agents/request-a-code-review/use-code-review?tool=webui#mcp-servers-and-agent-skills" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Learn more in the docs.</a>

    openshift-merge-bot[bot] openshift-merge-bot[bot] commented on Oct 04, 2026 00:34 UTC
    Bot

    Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
    /test e2e-parallel

    geoberle geoberle commented on Oct 05, 2026 06:09 UTC
    Contributor

    /approve
    /lgtm

    openshift-merge-bot[bot] openshift-merge-bot[bot] commented on Oct 05, 2026 06:58 UTC
    Bot

    /retest-required

    Remaining retests: 0 against base HEAD 52b81a55274d11896e2d2bdc9b48315c195d451d and 2 for PR HEAD b81b319d980c248ae54fecdb7301a1f26eea05f7 in total

    openshift-merge-bot[bot] openshift-merge-bot[bot] commented on Oct 05, 2026 17:59 UTC
    Bot

    /retest-required

    Remaining retests: 0 against base HEAD 238c44f22107b8aaf7d14cb7520d3541f05c5731 and 1 for PR HEAD b81b319d980c248ae54fecdb7301a1f26eea05f7 in total

    openshift-merge-bot[bot] openshift-merge-bot[bot] commented on Oct 05, 2026 23:04 UTC
    Bot

    /retest-required

    Remaining retests: 0 against base HEAD 4e398af3e08749a88da803ce7be602764869784b and 0 for PR HEAD b81b319d980c248ae54fecdb7301a1f26eea05f7 in total

    openshift-merge-bot[bot] openshift-merge-bot[bot] commented on Oct 06, 2026 02:05 UTC
    Bot

    /hold

    Revision b81b319d980c248ae54fecdb7301a1f26eea05f7 was retested 3 times: holding

    raelga raelga approved these changes on Oct 06, 2026 10:36 UTC
    Approved Reviewer

    /lgtm
    /approve
    /retest

    openshift-ci[bot] openshift-ci[bot] commented on Oct 06, 2026 10:36 UTC
    Bot

    [APPROVALNOTIFIER] This PR is APPROVED

    This pull-request has been approved by: <a href="https://github.com/Azure/ARO-HCP/pull/7342#issuecomment-5989076945" title="LGTM">geoberle</a>, <a href="https://github.com/Azure/ARO-HCP/pull/7342#pullrequestreview-5427114482" title="Approved">raelga</a>, <a href="https://github.com/Azure/ARO-HCP/pull/7342#" title="Author self-approved">stevekuznetsov</a>

    The full list of commands accepted by this bot can be found here.

    The pull request process is described here

    <details >
    Needs approval from an approver in each of these files:

  • ~~OWNERS~~ [geoberle,raelga,stevekuznetsov]
  • Approvers can indicate their approval by writing /approve in a comment
    Approvers can cancel approval by writing /approve cancel in a comment
    </details>
    <!-- META={"approvers":[]} -->

    stevekuznetsov stevekuznetsov commented on Oct 08, 2026 21:36 UTC
    Author

    /override ci/prow/e2e-parallel
    /label lgtm

    openshift-ci[bot] openshift-ci[bot] commented on Oct 08, 2026 21:36 UTC
    Bot

    @stevekuznetsov: Overrode contexts on behalf of stevekuznetsov: ci/prow/e2e-parallel

    <details>

    In response to this:

    >/override ci/prow/e2e-parallel
    >/label lgtm

    Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
    </details>

    geoberle geoberle commented on Oct 14, 2026 22:01 UTC
    Contributor

    /hold cancel

    openshift-merge-bot[bot] openshift-merge-bot[bot] commented on Oct 14, 2026 22:39 UTC
    Bot

    Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
    /test e2e-parallel

    openshift-merge-bot[bot] openshift-merge-bot[bot] commented on Oct 15, 2026 02:28 UTC
    Bot

    /retest-required

    Remaining retests: 0 against base HEAD 56e655b05d089072840185c67940ec3f670c8773 and 2 for PR HEAD b81b319d980c248ae54fecdb7301a1f26eea05f7 in total

    openshift-merge-bot[bot] openshift-merge-bot[bot] commented on Oct 15, 2026 07:26 UTC
    Bot

    /retest-required

    Remaining retests: 0 against base HEAD 459393efbcf7240b5e9d18e61b574886c95d61fe and 1 for PR HEAD b81b319d980c248ae54fecdb7301a1f26eea05f7 in total

    Reviewers
    Assignees
    stevekuznetsov stevekuznetsov
    Labels
    risk: low confidence: 91.1% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 17.3% (LOW) · Higher = larger blast radius
    17.3%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 91.1% · Lower = rushed or shallow review
    91.1%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 2% · Safe to merge
    2%
    Repository