Skip to content

[Nexthop][fboss2] Show FEC histogram for all interfaces when none specified - #1415

Open
zackary-nexthop wants to merge 1 commit into
facebook:mainfrom
nexthop-ai:zackary-nexthop.fboss2.empty-fec-hist
Open

[Nexthop][fboss2] Show FEC histogram for all interfaces when none specified#1415
zackary-nexthop wants to merge 1 commit into
facebook:mainfrom
nexthop-ai:zackary-nexthop.fboss2.empty-fec-hist

Conversation

@zackary-nexthop

Copy link
Copy Markdown
Contributor

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

Summary

fboss2 show interface counters fec <line|system> histogram returned an empty table when no interface was specified. It didn't enumerate ports at all: it just returned an empty table (if (queriedIfs.empty()) return RetType{};). Now enumerates via qsfp_service's getPortMediaInterface, which reports exactly the ports with a transceiver physically present. Ports that fail the per-interface CDB lookup are skipped silently in the enumerate-all case, or reported to stderr when explicitly requested.

Test Plan

  • Added unit tests covering explicit interface, fallback to all interfaces, and skip-on-throw. bazel test //fboss/cli/fboss2/test:cmd_test --test_filter="*FecHistogram*" — 3/3 passed.
  • Verified on a switch: command now lists all up interfaces with transceivers instead of an empty table.

Signed-off-by: Zackary Ayoun <zackary@nexthop.ai>
@zackary-nexthop
zackary-nexthop requested review from a team as code owners July 24, 2026 13:01
@meta-cla meta-cla Bot added the CLA Signed label Jul 24, 2026
@srikrishnagopu
srikrishnagopu self-requested a review July 25, 2026 05:04
@meta-codesync

meta-codesync Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

@srikrishnagopu has imported this pull request. If you are a Meta employee, you can view this in D113635441.

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