Skip to content

Conversation

@sarahfu331
Copy link
Contributor

@sarahfu331 sarahfu331 commented Jan 5, 2026

Pre-submission checklist

  • [√] I've ran the linters locally and fixed lint errors related to the files I modified in this PR. You can install the linters by running pip install -r requirements-dev.txt && pre-commit install
  • [√] pre-commit run
    #pre-commit run
    clang-format.............................................................Passed
    black................................................(no files to check)Skipped
    shellcheck...........................................(no files to check)Skipped
    shfmt................................................(no files to check)Skipped
    trim trailing whitespace.................................................Passed
    fix end of files.........................................................Passed
    check yaml...........................................(no files to check)Skipped
    check json...........................................(no files to check)Skipped
    check for merge conflicts................................................Passed
    ruff check...........................................(no files to check)Skipped

Summary

Desciption:
AgentNeighborTest* failed with following exception
C++ exception with description "HwSwitchMatcher::switchId api must be called only when there is a single switchId" thrown in the test body.

Root Cause:
On multi NPU platform, in function facebook::fboss::utility::NeighborInfo getNeighborInfo, when calling following
auto switchId = ensemble.getSw()
->getScopeResolver()
->scope(ensemble.masterLogicalPortIds())
.switchId();

scope(ensemble.masterLogicalPortIds()) returns an array, so can't get switchId().

Fix:
As this function is designed to retrieve the current state of neighbor entry for a specific interfaceId directly from the ASIC, so changed to get the switchId based on the interfaceId information.

Test Plan

rerun all tests of AgentNeighborTest1/3/5/7* and PASSED, AgentNeighborTest0/2/4/6 failed with other errors, will fix and track with other PR
log.tar.gz

@meta-cla meta-cla bot added the CLA Signed label Jan 5, 2026
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.

1 participant