-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[Dependencies] Pin pip3 version #7450
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
can you look into the docker-sonic-vs/Dockerfile.j2, the build breaks there. |
docker-sonic-vs uses docker-config-engine-buster as its parent, which in turn uses docker-base-buster as its parent, so this PR should cover it, also. |
@@ -395,7 +395,7 @@ RUN export VERSION=1.14.2 \ | |||
&& echo 'export PATH=$PATH:$GOROOT/bin' >> /etc/bash.bashrc \ | |||
&& rm go$VERSION.linux-*.tar.gz | |||
|
|||
RUN pip3 install --upgrade pip | |||
RUN pip3 install --upgrade 'pip==21.0.1' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With 21.0.1, sonic_yang_models build is broken.
----------------------------- Captured stdout call -----------------------------
Failed: pyang -f tree ./yang-models/*.yang > ./yang-models/sonic_yang_tree
----------------------------- Captured stderr call -----------------------------
./yang-models/sonic-acl.yang:8: error: module "ietf-inet-types" not found in search path
Can we use version 20.3.4 for buster also?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you ask? Can you please provide some reasoning?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Build failure is seen for sonic_yang_models package with pip versions higher than 20.3.4.
The error can be seen in #7407 also.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you verified that pip is the problem here? Why was this error not seen when using pip 21.0, which has been available since January?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I have verified that pip version is the issue here. The build goes through fine when using 20.3.4. With version 21, they made a change in pip that breaks pyang.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me try again with the latest to ensure the build really goes through
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad! When verifying build for version 21.0.1, I still ended up with 21.1.
The breakage came with 21.1. We are good with 21.0.1.
Sorry.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries! Good to know. Thanks for confirming!
Closing as this appears to have been fixed by sonic-net/sonic-utilities#1530 |
Why I did it
A new version of pip (21.1) was released on 4/24, and it appears to have introduced new behavior which is causing the build to break. New log messages such as the following are seen in the build log:
And the build is failing with errors like:
Until we can resolve these issues, pin the version to the last known good version, 21.0.1 in Buster environments, and 20.3.4 in Stretch environments.
Update: This appears to be due to netifaces version 0.10.9 being installed in docker-sonic-vs, whereas sonic-utilities explicitly requires 0.10.7 in its setup.py file. Older versions of pip did not error out here, but 21.1 does.
sonic-net/sonic-utilities#1530 may solve this issue by relaxing the dependencies, therefore this PR may not be necessary.