[docker-ptf] Upgrade docker-ptf from bookworm to trixie#27889
Open
yijingyan2 wants to merge 3 commits into
Open
[docker-ptf] Upgrade docker-ptf from bookworm to trixie#27889yijingyan2 wants to merge 3 commits into
yijingyan2 wants to merge 3 commits into
Conversation
Signed-off-by: Yijing Yan <yijingyan@microsoft.com>
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR migrates the docker-ptf image (used by the VS platform for PTF-based testing) from Debian bookworm to Debian trixie, aligning the container with the newer build environment and updated Python runtime expectations.
Changes:
- Switch
docker-ptfbase image fromdebian:bookwormtodebian:trixieand update a few distro-specific packages. - Update Python path wiring inside the container from Python 3.11 to 3.13.
- Register
docker-ptfunderSONIC_TRIXIE_DOCKERSinstead ofSONIC_BOOKWORM_DOCKERS.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| platform/vs/docker-ptf.mk | Moves docker-ptf image registration to the trixie docker set for VS builds. |
| dockers/docker-ptf/Dockerfile.j2 | Updates base OS to trixie and adjusts package list + Python path wiring accordingly. |
| {% if PTF_ENV_PY_VER == "py3" %} | ||
| # Install the python-saithrift into the virtual environment | ||
| RUN echo "/usr/lib/python3/dist-packages/saithrift-0.9-py3.11.egg" >> /root/env-python3/lib/python3.11/site-packages/easy-install.pth | ||
| RUN echo "/usr/lib/python3/dist-packages/saithrift-0.9-py3.13.egg" >> /root/env-python3/lib/python3.13/site-packages/easy-install.pth |
Comment on lines
+467
to
+471
| RUN mkdir -p /usr/lib/python3.13/dist-packages; \ | ||
| echo "/root/env-python3/lib/python3.13/site-packages" > /usr/lib/python3/dist-packages/virtualenv.pth; \ | ||
| echo "/root/env-python3/lib/python3.13/site-packages" > /usr/lib/python3.13/dist-packages/virtualenv.pth | ||
|
|
||
| RUN echo "PYTHONPATH=/root/env-python3/lib/python3.11/site-packages" >> /etc/environment | ||
| RUN echo "PYTHONPATH=/root/env-python3/lib/python3.13/site-packages" >> /etc/environment |
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
30b4506 to
3d8fa7d
Compare
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
| endif | ||
| SONIC_DOCKER_IMAGES += $(DOCKER_PTF) | ||
| SONIC_BOOKWORM_DOCKERS += $(DOCKER_PTF) | ||
| SONIC_TRIXIE_DOCKERS += $(DOCKER_PTF) |
Comment on lines
435
to
438
| {% if PTF_ENV_PY_VER == "py3" %} | ||
| # Install the python-saithrift into the virtual environment | ||
| RUN echo "/usr/lib/python3/dist-packages/saithrift-0.9-py3.11.egg" >> /root/env-python3/lib/python3.11/site-packages/easy-install.pth | ||
| RUN echo "/usr/lib/python3/dist-packages/saithrift-0.9-py3.13.egg" >> /root/env-python3/lib/python3.13/site-packages/easy-install.pth | ||
| {% endif %} |
Comment on lines
+467
to
+471
| RUN mkdir -p /usr/lib/python3.13/dist-packages; \ | ||
| echo "/root/env-python3/lib/python3.13/site-packages" > /usr/lib/python3/dist-packages/virtualenv.pth; \ | ||
| echo "/root/env-python3/lib/python3.13/site-packages" > /usr/lib/python3.13/dist-packages/virtualenv.pth | ||
|
|
||
| RUN echo "PYTHONPATH=/root/env-python3/lib/python3.11/site-packages" >> /etc/environment | ||
| RUN echo "PYTHONPATH=/root/env-python3/lib/python3.13/site-packages" >> /etc/environment |
Comment on lines
13
to
16
| paths: | ||
| include: | ||
| - dockers/docker-ptf | ||
| - dockers/docker-ptf/** | ||
|
|
Contributor
Author
|
/azp run Azure.docker-ptf |
|
No pipelines are associated with this pull request. |
Contributor
Author
|
/azp run Azure.docker-ptf |
|
No pipelines are associated with this pull request. |
Contributor
Author
|
/azp run Azure.docker-ptf |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: Yijing Yan <yijingyan@microsoft.com>
c798366 to
f078ad0
Compare
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Comment on lines
12
to
+13
| SONIC_DOCKER_IMAGES += $(DOCKER_PTF) | ||
| SONIC_BOOKWORM_DOCKERS += $(DOCKER_PTF) | ||
| SONIC_TRIXIE_DOCKERS += $(DOCKER_PTF) |
Comment on lines
435
to
438
| {% if PTF_ENV_PY_VER == "py3" %} | ||
| # Install the python-saithrift into the virtual environment | ||
| RUN echo "/usr/lib/python3/dist-packages/saithrift-0.9-py3.11.egg" >> /root/env-python3/lib/python3.11/site-packages/easy-install.pth | ||
| RUN echo "/usr/lib/python3/dist-packages/saithrift-0.9-py3.13.egg" >> /root/env-python3/lib/python3.13/site-packages/easy-install.pth | ||
| {% endif %} |
Comment on lines
+467
to
+471
| RUN mkdir -p /usr/lib/python3.13/dist-packages; \ | ||
| echo "/root/env-python3/lib/python3.13/site-packages" > /usr/lib/python3/dist-packages/virtualenv.pth; \ | ||
| echo "/root/env-python3/lib/python3.13/site-packages" > /usr/lib/python3.13/dist-packages/virtualenv.pth | ||
|
|
||
| RUN echo "PYTHONPATH=/root/env-python3/lib/python3.11/site-packages" >> /etc/environment | ||
| RUN echo "PYTHONPATH=/root/env-python3/lib/python3.13/site-packages" >> /etc/environment |
Collaborator
|
This PR has backport request for branch(es): 202605. ---Powered by SONiC BuildBot
|
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
docker-ptf still used Debian bookworm specific package names and Python paths.
To align with current distro direction, docker-ptf is migrated to trixie.
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)