Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dockers/docker-ptf/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ RUN rm -rf /debs \
{% endif %}
&& 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
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
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.

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Bug filed for track: #26925

Copy link
Copy Markdown
Contributor

@opcoder0 opcoder0 Apr 21, 2026

Choose a reason for hiding this comment

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

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 ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It's failing on PR check yes


{% if PTF_ENV_PY_VER == "py3" %}
RUN curl -L -o tacacs.tar.gz https://shrubbery.net/pub/tac_plus/tacacs-F4.0.4.31.tar.gz\
Expand Down
Loading