Skip to content

[Nexthop][fboss2-dev] Mark the fec link direction as required in the help - #1995

Open
saty-nexthop wants to merge 1 commit into
meta:mainfrom
nexthop-ai:fboss2-fec-direction-help
Open

saty-nexthop wants to merge 1 commit into
meta:mainfrom
nexthop-ai:fboss2-fec-direction-help

Conversation

@saty-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

The help of fboss2 show interface counters fec shows the link direction argument as optional. The command fails without it.

  • CmdSubcommands.cpp: the help text of the link direction argument is now "Link direction (required): system|line". Only the fec command uses this argument type, so no other help text changes.
  • CmdShowInterfaceCountersFec.cpp: the error text now reads "use one of the subcommands".

The usage line still shows [direction...]. Removing the brackets needs ->required(), which changes the parse path and the error text.

Test Plan

  • fec --help shows "Link direction (required): system|line".
  • fec with no argument fails with "Incomplete command, expecting '<system|line>'": exit 1.
  • fec line fails with "Incomplete command, please use one of the subcommands": exit 1.
  • pre-commit run --from-ref upstream/main --to-ref HEAD passes.
  • Local cmake build, fake SAI, main at e7ab695 with this change and my other open fixes in one build: fboss2 builds. fboss2_cmd_test --gtest_filter='*Fec*' 9 of 9. Whole fboss2_cmd_test 586 of 586. Both exit 0.

The help of "fboss2 show interface counters fec" showed the link
direction argument as optional, but the command fails without it.

- CmdSubcommands.cpp: the help text of the link direction argument is
  now "Link direction (required): system|line". Only the fec command
  uses this argument type.
- CmdShowInterfaceCountersFec.cpp: fix the typo "use one the
  subcommands" in the error text.
@saty-nexthop
saty-nexthop requested a review from a team as a code owner November 16, 2026 08:25
@github-actions github-actions Bot added nexthop project:fboss2-dev FBOSS project: fboss2-dev labels Nov 16, 2026
@meta-cla meta-cla Bot added the CLA Signed label Nov 16, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants