Repository navigation
Conversation
|
@induvsuresh @AarjunC please review. |
|
@AarjunC has imported this pull request. If you are a Meta employee, you can view this in D122188731. |
|
Hi @selekkala, can you please take a look at failing unit test? |
|
@selekkala has updated the pull request. You must reimport the pull request before landing. |
|
Hi @AarjunC, thanks for flagging this. The mock was not correctly reproducing the |
|
@selekkala, I don't see getBuildInfo() implementation in https://github.com/facebook/BGP/blob/main/neteng/fboss/bgp/cpp/BgpServiceBase.h . Is there different PR open for the same? Cc: @induvsuresh |
|
Hi @AarjunC, you’re right—the daemon-side implementation was missing from I opened the companion PR facebook/BGP#14. It adds and implements The two PRs can be merged independently because the RPC is additive:
For the complete |
Pre-submission checklist
pre-commit run --filesfor every modified file.Summary
fboss2 show bgp versioncurrently throws unconditionally in OSS builds because the Meta-internalgetRegexExportedValuesextension is unavailable.This change adds an additive
TBgpService.getBuildInfoRPC to the shared BGP Thrift definition and uses it only in the OSS CLI path. Internal builds retain the existing fb303 path. If the CLI reaches a pre-API daemon, it converts Thrift'sUNKNOWN_METHODresponse into an actionable upgrade-and-restart message.The BGP daemon-side handler lives in the separate
facebook/BGPrepository and must be deployed together with this client change. The compatibility error makes mixed-version rollout explicit rather than failing with the previous unsupported-command exception.Test Plan
pre-commit run --files cmake/CliFboss2Test.cmake fboss/cli/fboss2/commands/show/bgp/CmdShowVersionBgp.cpp fboss/cli/fboss2/test/CmdShowBgpVersionTest.cpp fboss/cli/fboss2/test/bgp/MockBgpClient.h neteng/fboss/bgp/if/bgp_thrift.thrift— passed.CmdShowBgpVersionTestFixture.QueryClientReturnsRunningBuildInfoto verify the CLI returns daemon-provided metadata.CmdShowBgpVersionTestFixture.QueryClientRejectsOldDaemonto verify the mixed-version compatibility error.Live OSS router validation logs (two switches)
Switch A:
Switch B:
Both switches had the BGP Thrift listener active and no BGP warnings or new coredumps during the validation window.
The focused C++ tests are included for CI execution; the production image used for runtime validation does not package test binaries.