Repository navigation
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Collaborator
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Add a build-from-source step for the gobgp daemon (gobgpd) and CLI (gobgp) to the docker-ptf image. gobgpd is the BGP-speaker engine for the GoBGP-backed sonic-mgmt PTF route speaker (opt-in via bgp_speaker=gobgp; ExaBGP stays the default), the scalable replacement that streams 100k+ prefixes/neighbor over gRPC. See HLD sonic-net/sonic-mgmt#26382. The image carries the gobgpd/gobgp binaries and the Python gRPC stubs generated from the same checkout into /usr/local/lib/gobgp-api; the shim that drives them ships in sonic-mgmt and is deployed at runtime (mirroring http_api.py). Generating the stubs here keeps them on the same gobgp version as the daemon and keeps generated code out of sonic-mgmt. An import check after generation fails the build if the gencode and the image's protobuf runtime disagree. The mixed-python image pins a protobuf runtime older than the gencode grpcio-tools emits, so the stubs are skipped there, matching the existing gnxi regeneration step. The version is resolved from the latest upstream release rather than hardcoded, following the grpcurl, sflowtool and nanomsg blocks in this file, so the version-refresh build proposes gobgp security updates on its own cadence and freezes the exact commit in versions-git, the same way gnmic and grpcurl are tracked. Version control then resets the clone to that commit, which is why this clone is not shallow: a --depth 1 clone does not contain the recorded commit, so the reset fails without failing the build and leaves the pin silently ineffective. The recipe follows the existing grpcurl and gnmic blocks: reuse the patched Go toolchain installed earlier, and sit before the Go-toolchain-removal step. google.golang.org/grpc, golang.org/x/net and golang.org/x/text are raised above the versions the release's go.mod selects, clearing the MEDIUM+ findings the docker-ptf Trivy job reports against the stock build. They are minimum versions, so Go's minimal version selection keeps them in effect across a gobgp bump. Building from source (vs downloading a release) keeps the Go stdlib patched for S360/CVE scans and provides the .proto sources the stubs are generated from. ExaBGP is retained unchanged. Validated at v4.8.0 (the tag the resolver currently selects): binaries build with the dependency floors applied, stubs regenerate and import cleanly, and a live announce/withdraw through the sonic-mgmt shim against gobgpd v4.8.0 programs and drains both the IPv4 and IPv6 RIBs with AS_PATH, LOCAL_PREF, MED, and standard/large/extended communities intact. Signed-off-by: Deepak Singhal <deepsinghal@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b76b3be2-b70c-418e-9b00-c4c6d4828afa
Leyza
force-pushed
the
202511_gobgp_cp
branch
from
November 12, 2026 02:16
66f5322 to
32055e7
Compare
Collaborator
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
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.
Why I did it
Cherry-pick of sonic-net/sonic-buildimage#28732 .
Gobgp will be used in some of the sonic-mgmt tests.
Work item tracking
How I did it
How to verify it
Which release branch to backport (provide reason below if selected)
Tracking issue/work item for backport/cherry-pick request (GitHub issue or Microsoft ADO):
Failure type:
Tested branch
Test result
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)