From 1158022e9b362ebe2ccc18914a21372276b4428c Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Wed, 22 Jul 2026 12:14:00 +1000 Subject: [PATCH] [ci] replace python3-pip with uv in vs test pipeline (#4777) **What I did** Remove usage of `pip3` from the vs test pipeline script following the removal of `python3-pip` from the CI agent. Replace all `pip3 install` calls with `uv pip install --system` to maintain equivalent system-wide package installation behaviour. **Why I did it** `python3-pip` was removed from CI agent because S360 flags python3-pip as a security vulnerability **How I verified it** **Details if related** Signed-off-by: Sonic Build Admin --- .azure-pipelines/test-docker-sonic-vs-template.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.azure-pipelines/test-docker-sonic-vs-template.yml b/.azure-pipelines/test-docker-sonic-vs-template.yml index c16ed60b..95a9a576 100644 --- a/.azure-pipelines/test-docker-sonic-vs-template.yml +++ b/.azure-pipelines/test-docker-sonic-vs-template.yml @@ -117,7 +117,7 @@ jobs: - script: | set -ex # install packages for vs test - sudo pip3 install pytest flaky exabgp docker lcov_cobertura + sudo uv pip install --system pytest flaky exabgp docker lcov_cobertura # install other dependencies sudo apt-get -o DPkg::Lock::Timeout=600 install -y net-tools \ @@ -143,9 +143,11 @@ jobs: # from PyPI instead — same fallback as the inline amd64/ubuntu-22.04 # job. --no-build-isolation + apt's python3-cffi sidesteps a cffi # version-mismatch Exception that jammy's pip 22.0.2 build-isolation - # env otherwise triggers. - sudo apt-get install -y python3-cffi - sudo pip3 install --no-build-isolation 'libyang==3.3.0' + # env otherwise triggers. --no-build-isolation needs wheel present + # in the environment to provide bdist_wheel, so install it first. + sudo apt-get install -y python3-cffi python3-dev + sudo uv pip install --system wheel + sudo uv pip install --system --no-build-isolation 'libyang==3.3.0' sudo dpkg -i $(Build.ArtifactStagingDirectory)/download/libprotobuf*_amd64.deb $(Build.ArtifactStagingDirectory)/download/libprotobuf-lite*_amd64.deb $(Build.ArtifactStagingDirectory)/download/python3-protobuf*_amd64.deb sudo dpkg -i $(Build.ArtifactStagingDirectory)/download/libdashapi*.deb