Repository navigation
[Nexthop][fboss2-dev] Mark the fec link direction as required in the help - #1995
Open
saty-nexthop wants to merge 1 commit into
Open
saty-nexthop wants to merge 1 commit into
saty-nexthop wants to merge 1 commit into
Conversation
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.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pre-submission checklist
pip install -r requirements-dev.txt && pre-commit installpre-commit runSummary
The help of
fboss2 show interface counters fecshows 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 thefeccommand 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 --helpshows "Link direction (required): system|line".fecwith no argument fails with "Incomplete command, expecting '<system|line>'": exit 1.fec linefails with "Incomplete command, please use one of the subcommands": exit 1.pre-commit run --from-ref upstream/main --to-ref HEADpasses.mainat e7ab695 with this change and my other open fixes in one build:fboss2builds.fboss2_cmd_test --gtest_filter='*Fec*'9 of 9. Wholefboss2_cmd_test586 of 586. Both exit 0.