-
Notifications
You must be signed in to change notification settings - Fork 666
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
[build] Fix base OS compilation issue caused by incompatibility of urllib with requests. #2830
[build] Fix base OS compilation issue caused by incompatibility of urllib with requests. #2830
Conversation
It didn't work. |
…requests >= 2.29.0. - Pin urllib to older version from 2.0.0 Signed-off-by: Oleksandr Ivantsiv <oivantsiv@nvidia.com> Co-authored-by: davidza@nvidia.com
ec0596f
to
bfcaa8c
Compare
@liushilongbuaa now it is fixed |
We are seeing this failure on 202205 as well, please add the fix there too. |
I see a new release hours ago: https://github.com/docker/docker-py/releases/tag/6.1.0 |
bfcaa8c
to
92f8aa7
Compare
92f8aa7
to
bfcaa8c
Compare
@qiluo-msft requests 2.29.0+ and urllib3 2.x doesn't work in the SONiC environment. I got the same error. |
https://dev.azure.com/mssonic/build/_build/results?buildId=268185&view=results |
Hi @liushilongbuaa I still see the same issue in my local build environment. |
It is already fixed by docker's new release.
|
@@ -221,6 +221,7 @@ | |||
}, | |||
install_requires=[ | |||
'click==7.0', | |||
'urllib3<2', | |||
'click-log>=0.3.2', | |||
'docker>=4.4.4', |
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.
docker>=6.1.1
@@ -221,6 +221,7 @@ | |||
}, | |||
install_requires=[ | |||
'click==7.0', | |||
'urllib3<2', |
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.
we don't need to limit urllib3 now.
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.
Hi @liushilongbuaa seems it's not fixed, I still see same issue in my local build, and it also failed the checker of PR sonic-net/sonic-swss#2763.
A similar issue is also observed in the swss vstest: https://dev.azure.com/mssonic/be1b070f-be15-4154-aade-b1d3bfb17054/_apis/build/builds/268784/logs/95 |
…requests >= 2.29.0. (#2830) #### What I did Fix SONiC image compilation issue: ``` [2023-05-03T17:54:00.146Z] + sudo cp files/build_templates/docker_image_ctl.j2 ./fs********-mellanox/usr/share/sonic/templates/docker_image_ctl.j2 [2023-05-03T17:54:00.146Z] + sudo LANG=C DOCKER_HOST= ch******** ./fs********-mellanox /usr/local/bin/generate_shutdown_order.py [2023-05-03T17:54:00.146Z] Traceback (most recent call last): [2023-05-03T17:54:00.146Z] File "/usr/local/lib/python3.9/dist-packages/docker/api/client.py", line 214, in _retrieve_server_version [2023-05-03T17:54:00.146Z] return self.version(api_version=False)["ApiVersion"] [2023-05-03T17:54:00.147Z] File "/usr/local/lib/python3.9/dist-packages/docker/api/daemon.py", line 181, in version [2023-05-03T17:54:00.147Z] return self._result(self._get(url), json=True) [2023-05-03T17:54:00.147Z] File "/usr/local/lib/python3.9/dist-packages/docker/utils/decorators.py", line 46, in inner [2023-05-03T17:54:00.147Z] return f(self, *args, **kwargs) [2023-05-03T17:54:00.147Z] File "/usr/local/lib/python3.9/dist-packages/docker/api/client.py", line 237, in _get [2023-05-03T17:54:00.147Z] return self.get(url, **self._set_request_timeout(kwargs)) [2023-05-03T17:54:00.147Z] File "/usr/local/lib/python3.9/dist-packages/requests/sessions.py", line 600, in get [2023-05-03T17:54:00.147Z] return self.request("GET", url, **kwargs) [2023-05-03T17:54:00.147Z] File "/usr/local/lib/python3.9/dist-packages/requests/sessions.py", line 587, in request [2023-05-03T17:54:00.147Z] resp = self.send(prep, **send_kwargs) [2023-05-03T17:54:00.147Z] File "/usr/local/lib/python3.9/dist-packages/requests/sessions.py", line 701, in send [2023-05-03T17:54:00.147Z] r = adapter.send(request, **kwargs) [2023-05-03T17:54:00.147Z] File "/usr/local/lib/python3.9/dist-packages/requests/adapters.py", line 486, in send [2023-05-03T17:54:00.147Z] resp = conn.urlopen( [2023-05-03T17:54:00.147Z] File "/usr/local/lib/python3.9/dist-packages/urllib3/connectionpool.py", line 790, in urlopen [2023-05-03T17:54:00.147Z] response = self._make_request( [2023-05-03T17:54:00.147Z] File "/usr/local/lib/python3.9/dist-packages/urllib3/connectionpool.py", line 496, in _make_request [2023-05-03T17:54:00.147Z] conn.request( [2023-05-03T17:54:00.147Z] TypeError: request() got an unexpected keyword argument 'chunked' ``` #### How I did it Pin urllib to version < 2 as it was suggested in docker/docker-py#3113. #### How to verify it Run SONiC image compilation.
Hi @abdosi , please help to get this one in 202205. |
@qiluo-msft What is needed to trigger sonic-utilities submodule update in sonic-buildimage repo? Could you help with it, please? |
@oleksandrivantsiv @liushilongbuaa do we still need to cherry-pick this change? Do we need this change at all? |
Yes. We need. |
I thought locking docker to 6.1.1 should have fixed it? @liushilongbuaa |
docker 6.1.1 will fix the issue. |
Removed cherry-pick flag according to Shilong's comment. |
…requests >= 2.29.0. (sonic-net#2830) #### What I did Fix SONiC image compilation issue: ``` [2023-05-03T17:54:00.146Z] + sudo cp files/build_templates/docker_image_ctl.j2 ./fs********-mellanox/usr/share/sonic/templates/docker_image_ctl.j2 [2023-05-03T17:54:00.146Z] + sudo LANG=C DOCKER_HOST= ch******** ./fs********-mellanox /usr/local/bin/generate_shutdown_order.py [2023-05-03T17:54:00.146Z] Traceback (most recent call last): [2023-05-03T17:54:00.146Z] File "/usr/local/lib/python3.9/dist-packages/docker/api/client.py", line 214, in _retrieve_server_version [2023-05-03T17:54:00.146Z] return self.version(api_version=False)["ApiVersion"] [2023-05-03T17:54:00.147Z] File "/usr/local/lib/python3.9/dist-packages/docker/api/daemon.py", line 181, in version [2023-05-03T17:54:00.147Z] return self._result(self._get(url), json=True) [2023-05-03T17:54:00.147Z] File "/usr/local/lib/python3.9/dist-packages/docker/utils/decorators.py", line 46, in inner [2023-05-03T17:54:00.147Z] return f(self, *args, **kwargs) [2023-05-03T17:54:00.147Z] File "/usr/local/lib/python3.9/dist-packages/docker/api/client.py", line 237, in _get [2023-05-03T17:54:00.147Z] return self.get(url, **self._set_request_timeout(kwargs)) [2023-05-03T17:54:00.147Z] File "/usr/local/lib/python3.9/dist-packages/requests/sessions.py", line 600, in get [2023-05-03T17:54:00.147Z] return self.request("GET", url, **kwargs) [2023-05-03T17:54:00.147Z] File "/usr/local/lib/python3.9/dist-packages/requests/sessions.py", line 587, in request [2023-05-03T17:54:00.147Z] resp = self.send(prep, **send_kwargs) [2023-05-03T17:54:00.147Z] File "/usr/local/lib/python3.9/dist-packages/requests/sessions.py", line 701, in send [2023-05-03T17:54:00.147Z] r = adapter.send(request, **kwargs) [2023-05-03T17:54:00.147Z] File "/usr/local/lib/python3.9/dist-packages/requests/adapters.py", line 486, in send [2023-05-03T17:54:00.147Z] resp = conn.urlopen( [2023-05-03T17:54:00.147Z] File "/usr/local/lib/python3.9/dist-packages/urllib3/connectionpool.py", line 790, in urlopen [2023-05-03T17:54:00.147Z] response = self._make_request( [2023-05-03T17:54:00.147Z] File "/usr/local/lib/python3.9/dist-packages/urllib3/connectionpool.py", line 496, in _make_request [2023-05-03T17:54:00.147Z] conn.request( [2023-05-03T17:54:00.147Z] TypeError: request() got an unexpected keyword argument 'chunked' ``` #### How I did it Pin urllib to version < 2 as it was suggested in docker/docker-py#3113. #### How to verify it Run SONiC image compilation.
What I did
Fix SONiC image compilation issue:
How I did it
Pin urllib to version < 2 as it was suggested in docker/docker-py#3113.
How to verify it
Run SONiC image compilation.
Previous command output (if the output of a command-line utility has changed)
New command output (if the output of a command-line utility has changed)