chore: pin ptf_nn_agent.py to use nnpy#26912
Conversation
Signed-off-by: Austin Pham <austinpham@microsoft.com>
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
Pins the PTF NN agent script fetched during docker-ptf image build to a specific upstream commit to avoid the newer upstream dependency on pynng (keeping compatibility with the existing nnpy usage).
Changes:
- Update the
ptf_nn_agent.pydownload URL in the PTF Docker image to a fixed upstream commit SHA.
| && mkdir -p /opt \ | ||
| && cd /opt \ | ||
| && wget https://raw.githubusercontent.com/p4lang/ptf/master/ptf_nn/ptf_nn_agent.py | ||
| && wget https://raw.githubusercontent.com/p4lang/ptf/23ebe7237f3c284032bda02fbd1f4a98f1bc12f4/ptf_nn/ptf_nn_agent.py |
There was a problem hiding this comment.
The commit SHA is hard-coded in the download URL without any inline context. Please add a short comment (or lift the SHA into a named ARG/Jinja variable) indicating that this pin is intentional to avoid the upstream switch from nnpy to pynng, and include the upstream commit/link being worked around so future updates know what to change and why.
| && mkdir -p /opt \ | ||
| && cd /opt \ | ||
| && wget https://raw.githubusercontent.com/p4lang/ptf/master/ptf_nn/ptf_nn_agent.py | ||
| && wget https://raw.githubusercontent.com/p4lang/ptf/23ebe7237f3c284032bda02fbd1f4a98f1bc12f4/ptf_nn/ptf_nn_agent.py |
There was a problem hiding this comment.
This pin works as a short-term unblock, but it freezes ptf_nn_agent at a 2024 snapshot and misses any future bug fixes from upstream. The forward fix would be to replace nnpy with pynng in this Dockerfile (and drop the nanomsg-from-source build ~20 lines above), then point back at master. There is already a similar migration in sonic-mgmt PR #23719 for the copp helper path. Is there a tracking issue to do the full pynng migration in docker-ptf so this pin doesn't become permanent?
There was a problem hiding this comment.
Hi @ZhaohuiS. No there is no tracking issue. I didn't upgrade to pynng as i'm not sure if it will introduce any new failures or vulnerability security
To avoid additional work, I pin down the ptf_nn_agent. I agree that we should have an issue and assign to relevant owner to track this.
| && mkdir -p /opt \ | ||
| && cd /opt \ | ||
| && wget https://raw.githubusercontent.com/p4lang/ptf/master/ptf_nn/ptf_nn_agent.py | ||
| && wget https://raw.githubusercontent.com/p4lang/ptf/23ebe7237f3c284032bda02fbd1f4a98f1bc12f4/ptf_nn/ptf_nn_agent.py |
There was a problem hiding this comment.
Yeah installing pynng may be better. I didn't see a failure in the latest docker-ptf image. Is this failing CI / PR checkers already ?
There was a problem hiding this comment.
It's failing on PR check yes
xwjiang-ms
left a comment
There was a problem hiding this comment.
Approve for temporary unblock PR test
|
Cherry-pick PR to 202505: #26942 |
|
Cherry-pick PR to 202511: #26943 |
Why I did it With this commit here, PTF replace nnpy with pynng p4lang/ptf However, we don't have pynng. To unblock us now, I'll pin ptf_nn_agent.py to a previous version that doesn't require pynng Signed-off-by: Austin Pham <austinpham@microsoft.com>
Why I did it With this commit here, PTF replace nnpy with pynng p4lang/ptf However, we don't have pynng. To unblock us now, I'll pin ptf_nn_agent.py to a previous version that doesn't require pynng Signed-off-by: Austin Pham <austinpham@microsoft.com> Signed-off-by: Kalash Nainwal <kalash@nexthop.ai>
Why I did it With this commit here, PTF replace nnpy with pynng p4lang/ptf However, we don't have pynng. To unblock us now, I'll pin ptf_nn_agent.py to a previous version that doesn't require pynng Signed-off-by: Austin Pham <austinpham@microsoft.com>
Why I did it With this commit here, PTF replace nnpy with pynng p4lang/ptf However, we don't have pynng. To unblock us now, I'll pin ptf_nn_agent.py to a previous version that doesn't require pynng Signed-off-by: Austin Pham <austinpham@microsoft.com> Signed-off-by: mhchann <mhchann082@gmail.com>
|
Cherry-pick PR to msft-202412: Azure/sonic-buildimage-msft#2311 |
Pin ptf_nn_agent.py download URL in docker-syncd-mrvl-teralynx-rpc to the last upstream PTF commit that uses nnpy, matching the fix in sonic-net#26912. Ref: sonic-net#26925 Signed-off-by: Ravi Minnikanti <rminnikanti@marvell.com>
…hrift to 0.22.0 to fix build issue. (#2365) <!-- Please make sure you've read and understood our contributing guidelines: https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md ** Make sure all your commits include a signature generated with `git commit -s` ** If this is a bug fix, make sure your description includes "fixes #xxxx", or "closes #xxxx" or "resolves #xxxx" Please provide the following information: --> #### Why I did it to fix build issue. cherry-pick sonic-net/sonic-buildimage#26912 and internal PR to pin thrift. #### How I did it cherry-pick both changes. #### How to verify it PR pipeline. <!-- If PR needs to be backported, then the PR must be tested against the base branch and the earliest backport release branch and provide tested image version on these two branches. For example, if the PR is requested for master, 202211 and 202012, then the requester needs to provide test results on master and 202012. --> #### Which release branch to backport (provide reason below if selected) <!-- - Note we only backport fixes to a release branch, *not* features! - Please also provide a reason for the backporting below. - e.g. - [x] 202006 --> - [ ] 201811 - [ ] 201911 - [ ] 202006 - [ ] 202012 - [ ] 202106 - [ ] 202111 - [ ] 202205 - [ ] 202211 #### Tested branch (Please provide the tested image version) <!-- - Please provide tested image version - e.g. - [x] 20201231.100 --> - [ ] <!-- image version 1 --> - [ ] <!-- image version 2 --> #### Description for the changelog <!-- Write a short (one line) summary that describes the changes in this pull request for inclusion in the changelog: --> <!-- Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU. --> #### Link to config_db schema for YANG module changes <!-- Provide a link to config_db schema for the table for which YANG model is defined Link should point to correct section on https://github.com/Azure/sonic-buildimage/blob/master/src/sonic-yang-models/doc/Configuration.md --> #### A picture of a cute animal (not mandatory but encouraged) --------- Signed-off-by: Austin Pham <austinpham@microsoft.com> Co-authored-by: Austin (Thang Pham) <austinpham@microsoft.com> Co-authored-by: Riff Jiang <riffjiang@microsoft.com>
Why I did it
With this commit here, PTF replace nnpy with pynng p4lang/ptf
However, we don't have pynng. To unblock us now, I'll pin ptf_nn_agent.py to a previous version that doesn't require pynng
Work item tracking
How I did it
How to verify it
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)