Skip to content

Install pygnmi==0.8.15 for docker-sonic-mgmt - #28339

Merged
yxieca merged 1 commit into
sonic-net:masterfrom
nexthop-ai:install-pygnmi-0-8-15-docker-sonic-mgmt
Jul 14, 2026
Merged

yxieca merged 1 commit into
sonic-net:masterfrom
nexthop-ai:install-pygnmi-0-8-15-docker-sonic-mgmt

Conversation

@liang-nexthop

@liang-nexthop liang-nexthop commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Why I did it

The new native pygnmi-based gNMI client for sonic-mgmt (see sonic-net/sonic-mgmt#26015 and sonic-net/sonic-mgmt#26013) talks gRPC directly to the DUT's gNMI server from the sonic-mgmt orchestrator, replacing the gnmic CLI binary that is being removed from docker-ptf. That client depends on the pygnmi Python package, which is not currently installed in the docker-sonic-mgmt image.

This PR adds pygnmi==0.8.15 to the docker-sonic-mgmt image so the new client and the gNMI tests that use it (tests/common/pygnmi_client.py, tests/gnmi/test_pygnmi_client.py) can run.

Related to sonic-net/sonic-mgmt#26015
Companion PR: sonic-net/sonic-mgmt#26013

Work item tracking
  • Microsoft ADO (number only):

How I did it

Added "pygnmi==0.8.15" to the uv pip install package list in dockers/docker-sonic-mgmt/Dockerfile.j2. The version is pinned for reproducible builds and to match the version validated by the sonic-mgmt changes.

How to verify it

  1. Build the docker-sonic-mgmt image:
    make target/docker-sonic-mgmt.gz

  2. Confirm the package is present and pinned inside the image:
    docker run --rm docker-sonic-mgmt python3 -c "import pygnmi; print(pygnmi.version)" expects 0.8.15

  3. Run the pygnmi client tests from sonic-mgmt (Add native pygnmi MgmtGnmic client and migrate gNMI tests sonic-mgmt#26013) inside the built container and confirm they no longer fail on import pygnmi.

Which release branch to backport (provide reason below if selected)

  • 202305
  • 202311
  • 202405
  • 202411
  • 202505
  • 202511
  • 202512
  • 202605
  • 202608

Tested branch (Please provide the tested image version)

Description for the changelog

Install pygnmi==0.8.15 in docker-sonic-mgmt for the native gNMI test client

Link to config_db schema for YANG module changes

N/A - no YANG/config_db schema changes.

A picture of a cute animal (not mandatory but encouraged)

otter

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@liang-nexthop
liang-nexthop marked this pull request as ready for review July 9, 2026 19:25
@liang-nexthop
liang-nexthop requested a review from lguohan as a code owner July 9, 2026 19:25
@ronan-nexthop

Copy link
Copy Markdown
Contributor

@hdwhdw @bradh352

@hdwhdw

hdwhdw commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Can you push an empty commit to restart build?

@mssonicbld

Copy link
Copy Markdown
Collaborator

This PR has backport request for branch(es): 202505,202511,202605,202608.
Added label(s) for branch(es) 202505,202511,202605,msft-202608.

---Powered by SONiC BuildBot

Signed-off-by: liang-nexthop <liang@nexthop.ai>
@liang-nexthop
liang-nexthop force-pushed the install-pygnmi-0-8-15-docker-sonic-mgmt branch from 7790990 to bb520fd Compare July 10, 2026 18:40
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld

Copy link
Copy Markdown
Collaborator

The backport request for branch(es) msft-202608 has been removed from PR description. Removed label(s)....

---Powered by SONiC BuildBot

@hdwhdw
hdwhdw requested review from Copilot and hdwhdw July 14, 2026 18:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the docker-sonic-mgmt container build to include the pygnmi Python dependency required by the new native pygnmi-based gNMI client and related sonic-mgmt tests.

Changes:

  • Add pygnmi==0.8.15 to the uv pip install package list in the docker-sonic-mgmt image build.

@yxieca
yxieca merged commit 86b830a into sonic-net:master Jul 14, 2026
29 checks passed
@mssonicbld

Copy link
Copy Markdown
Collaborator

The change is not in 202505 yet. @liang-nexthop, please manually create the cherry pick PR for branch 202505.
You can ping the release branch owner(github account: yejianquan) to approve your cherry pick PR.
If this change is already in 202505, please comment "already in 202505". Thanks!

---Powered by SONiC BuildBot

@mssonicbld

Copy link
Copy Markdown
Collaborator

The change is not in 202511 yet. @liang-nexthop, please manually create the cherry pick PR for branch 202511.
You can ping the release branch owner(github account: vmittal-msft) to approve your cherry pick PR.
If this change is already in 202511, please comment "already in 202511". Thanks!

---Powered by SONiC BuildBot

younghuang-CLS pushed a commit to younghuang-CLS/sonic-buildimage that referenced this pull request Jul 15, 2026
What: Adds pygnmi==0.8.15 to dockers/docker-sonic-mgmt/Dockerfile.j2.
Why: The new native pygnmi-based gNMI client for sonic-mgmt talks gRPC directly to the DUT's gNMI server, replacing the gnmic CLI binary being removed from docker-ptf; that client depends on pygnmi, which isn't currently installed in the docker-sonic-mgmt image.
How: Installs the pygnmi Python package in the docker-sonic-mgmt Dockerfile.
Testing: CI green (required checks passing); PR approved.

Signed-off-by: liang-nexthop <liang@nexthop.ai>
@rookie-who

Copy link
Copy Markdown

Hi — this PR is flagged for cherry-pick to the 202605 branch (Request for 202605 Branch). To move forward with the cherry-pick, could you please:

  1. Test this change on the 202605 branch and add the test results to the PR description
  2. Add the label Tested for 202605 branch once testing is complete

This helps us track readiness and ensures we don't cherry-pick untested changes. Thanks!

Comment by @vaibhavhd via automated tooling

@mssonicbld

Copy link
Copy Markdown
Collaborator

This PR has backport request label(s) for branch(es): 202505,202511,202605, but is missing required test information. Please make sure you tick the tested branch(es) in the Tested branch section and provide test evidence (e.g., 202505: <test result>) in the Test result section as well in your PR description.

---Powered by SONiC BuildBot

@liang-nexthop

Copy link
Copy Markdown
Contributor Author

Hi — this PR is flagged for cherry-pick to the 202605 branch (Request for 202605 Branch). To move forward with the cherry-pick, could you please:

  1. Test this change on the 202605 branch and add the test results to the PR description
  2. Add the label Tested for 202605 branch once testing is complete

This helps us track readiness and ensures we don't cherry-pick untested changes. Thanks!

Comment by @vaibhavhd via automated tooling

working on it.

@liang-nexthop

Copy link
Copy Markdown
Contributor Author

This PR has backport request label(s) for branch(es): 202505,202511,202605, but is missing required test information. Please make sure you tick the tested branch(es) in the Tested branch section and provide test evidence (e.g., 202505: ) in the Test result section as well in your PR description.

---Powered by SONiC BuildBot

done

@liang-nexthop

Copy link
Copy Markdown
Contributor Author

Hi — this PR is flagged for cherry-pick to the 202605 branch (Request for 202605 Branch). To move forward with the cherry-pick, could you please:

  1. Test this change on the 202605 branch and add the test results to the PR description
  2. Add the label Tested for 202605 branch once testing is complete

This helps us track readiness and ensures we don't cherry-pick untested changes. Thanks!

Comment by @vaibhavhd via automated tooling

done.

jackson-micas pushed a commit to jackson-micas/sonic-buildimage that referenced this pull request Aug 13, 2026
What: Adds pygnmi==0.8.15 to dockers/docker-sonic-mgmt/Dockerfile.j2.
Why: The new native pygnmi-based gNMI client for sonic-mgmt talks gRPC directly to the DUT's gNMI server, replacing the gnmic CLI binary being removed from docker-ptf; that client depends on pygnmi, which isn't currently installed in the docker-sonic-mgmt image.
How: Installs the pygnmi Python package in the docker-sonic-mgmt Dockerfile.
Testing: CI green (required checks passing); PR approved.

Signed-off-by: liang-nexthop <liang@nexthop.ai>
Signed-off-by: jackson-micas <jackson@micasnetworks.com>
@rookie-who

Copy link
Copy Markdown

@liang-nexthop — This PR is requested for the 202605 branch but is missing test evidence. To move forward with cherry-pick approval, please:

  1. Test on the 202605 branch and add results (image version + test output) to the PR description
  2. Check the 202605 box in the "Tested Branches" section of the PR description
  3. Add the "Tested for 202605 branch" label once testing is complete

Also, to help us prioritize correctly, could you clarify: Is this PR a bug fix / regression fix, a new feature, a platform config change, or a dependency/infra update? Understanding the nature of the change helps us triage the cherry-pick queue.

Thank you!

Review by @vaibhavhd via automated tooling

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.

7 participants