← Back to Pull requests

[Cisco ACI] Fix TypeError when submitting APIC controller interface status #25744

Closed
unknown closed this pull request without merging on Oct 22, 2026 14:48 UTC
View on GitHub
unknown unknown commented on Oct 22, 2026 04:03 UTC
Author

What does this PR do?

Fixes a TypeError in the Cisco ACI check when send_ndm_metadata is enabled and an APIC controller reports physical interfaces (cnwPhysIf):

TypeError: Fabric.submit_interface_status_metric() takes 3 positional arguments but 4 were given
  File ".../cisco_aci/fabric.py", line 183, in process_cphys

#24707 removed the hostname parameter from submit_interface_status_metric but missed the call in process_cphys (added in #24193). This drops the leftover argument, matching #24707's intent; the metric keeps device_hostname as a tag.

Today every run aborts at the first APIC: fabric metrics for later nodes, capacity, faults, the NDM payload and check telemetry are skipped, and cisco_aci.can_connect reports CRITICAL. Tenant metrics are unaffected.

Tests never hit this because no fixture returns cnwPhysIf. The new test returns one controller interface and asserts an OK service check, the controller port.status metric with its tags, and the interface in the NDM payload. It fails on master.

<img width="1934" height="986" alt="Image 10-22-26 at 12 20 AM" src="https://github.com/user-attachments/assets/0f880227-594a-45a9-97dc-c91db54e0092" />

Motivation

Reported after upgrading to Agent 7.84.3: all cisco_aci.capacity.* metrics stopped. Affects cisco_aci 6.0.0 and 6.1.0 (Agent 7.84.x, 7.85.x).

Related: #24707, #24193. Requesting backports to 7.85.x (7.85.0 is in RC with this bug; otherwise the fix waits for 7.86) and 7.84.x (affected customer is on 7.84; patch applies cleanly).

Checklist before requesting review

  • I self-reviewed the full diff, and this description matches the final change

  • Tests cover the change, or this description explains why none are needed

  • Automated review comments, including Codex review, were addressed or answered

  • I, the human author, understand this change, can explain it to reviewers, and believe it meets the repository standards
  • 🤖 Generated with Claude Code

    Diff: 266 lines (+199 / -67) across 3 files Reviewer: HadhemiDD Review duration: 645m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.39) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.39 · 266 lines diff across 3 files
    0.39
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    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.334
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #25744"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% 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: 39.4% (MEDIUM) · Higher = larger blast radius
    39.4%
    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: 56.8% · Lower = rushed or shallow review
    56.8%
    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: 17% · Safe to merge
    17%