[cherry-pick][202305][build] Fix base OS compilation issue caused by incompatibility between urllib3 and requests packages (#3328) (#3337)#3351
Closed
oleksandrivantsiv wants to merge 1 commit intosonic-net:202305from
Conversation
…en urllib3 and requests packages (sonic-net#3328) (sonic-net#3337) * [build] Fix base OS compilation issue caused by incompatibility between urllib3 and requests packages * [pipeline] Pin request package to v2.31.0
dgsudharsan
approved these changes
May 31, 2024
Collaborator
|
@StormLiangMS Can you please merge this fix? This is required for us to build 202305 branch. This is cherry-pick of #3328 |
Contributor
|
hi @liushilongbuaa do we need this issue for build? I didn't see any build failures without this PR. @dgsudharsan do we still need this PR? Seems no failure in recent builds. |
Contributor
|
It seems that requests 2.32.3 fixed this issue. |
Contributor
|
hi @dgsudharsan @oleksandrivantsiv I think this is not needed any more, could you check, we can close this PR. |
Collaborator
|
Compilation still fails on 19:49:38 + sudo cp files/build_templates/docker_image_ctl.j2 ./fs********-mellanox/usr/share/sonic/templates/docker_image_ctl.j2
19:49:38 + sudo LANG=C DOCKER_HOST= ch******** ./fs********-mellanox /usr/local/bin/generate_shutdown_order.py
19:49:38 Traceback (most recent call last):
19:49:38 File "/usr/local/lib/python3.9/dist-packages/requests/adapters.py", line 633, in send
19:49:38 conn = self.get_connection_with_tls_context(
19:49:38 File "/usr/local/lib/python3.9/dist-packages/requests/adapters.py", line 489, in get_connection_with_tls_context
19:49:38 conn = self.poolmanager.connection_from_host(
19:49:38 File "/usr/local/lib/python3.9/dist-packages/urllib3/poolmanager.py", line 303, in connection_from_host
19:49:38 return self.connection_from_context(request_context)
19:49:38 File "/usr/local/lib/python3.9/dist-packages/urllib3/poolmanager.py", line 325, in connection_from_context
19:49:38 raise URLSchemeUnknown(scheme)
19:49:38 urllib3.exceptions.URLSchemeUnknown: Not supported URL scheme http+docker
19:49:38
19:49:38 During handling of the above exception, another exception occurred:
19:49:38
19:49:38 Traceback (most recent call last):
19:49:38 File "/usr/local/lib/python3.9/dist-packages/docker/api/client.py", line 214, in _retrieve_server_version
19:49:38 return self.version(api_version=False)["ApiVersion"]
19:49:38 File "/usr/local/lib/python3.9/dist-packages/docker/api/daemon.py", line 181, in version
19:49:38 return self._result(self._get(url), json=True)
19:49:38 File "/usr/local/lib/python3.9/dist-packages/docker/utils/decorators.py", line 46, in inner
19:49:38 return f(self, *args, **kwargs)
19:49:38 File "/usr/local/lib/python3.9/dist-packages/docker/api/client.py", line 237, in _get
19:49:38 return self.get(url, **self._set_request_timeout(kwargs))
19:49:38 File "/usr/local/lib/python3.9/dist-packages/requests/sessions.py", line 602, in get
19:49:38 return self.request("GET", url, **kwargs)
19:49:38 File "/usr/local/lib/python3.9/dist-packages/requests/sessions.py", line 589, in request
19:49:38 resp = self.send(prep, **send_kwargs)
19:49:38 File "/usr/local/lib/python3.9/dist-packages/requests/sessions.py", line 703, in send
19:49:38 r = adapter.send(request, **kwargs)
19:49:38 File "/usr/local/lib/python3.9/dist-packages/requests/adapters.py", line 637, in send
19:49:38 raise InvalidURL(e, request=request)
19:49:38 requests.exceptions.InvalidURL: Not supported URL scheme http+docker
19:49:38
19:49:38 During handling of the above exception, another exception occurred:
19:49:38
19:49:38 Traceback (most recent call last):
19:49:38 File "/usr/local/bin/generate_shutdown_order.py", line 15, in <module>
19:49:38 main()
19:49:38 File "/usr/local/bin/generate_shutdown_order.py", line 8, in main
19:49:38 manager = PackageManager.get_manager()
19:49:38 File "/usr/local/lib/python3.9/dist-packages/sonic_package_manager/manager.py", line 1015, in get_manager
19:49:38 docker_api = DockerApi(docker.from_env(), ProgressManager())
19:49:38 File "/usr/local/lib/python3.9/dist-packages/docker/client.py", line 96, in from_env
19:49:38 return cls(
19:49:38 File "/usr/local/lib/python3.9/dist-packages/docker/client.py", line 45, in __init__
19:49:38 self.api = APIClient(*args, **kwargs)
19:49:38 File "/usr/local/lib/python3.9/dist-packages/docker/api/client.py", line 197, in __init__
19:49:38 self._version = self._retrieve_server_version()
19:49:38 File "/usr/local/lib/python3.9/dist-packages/docker/api/client.py", line 221, in _retrieve_server_version
19:49:38 raise DockerException(
19:49:38 docker.errors.DockerException: Error while fetching server API version: Not supported URL scheme http+docker |
Collaborator
|
@saiarcot895 @StormLiangMS We are still noticing build failure in 202305 and hence require this change for the build to pass. Can you please prioritize to merge this? |
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.
[build] Fix base OS compilation issue caused by incompatibility between urllib3 and requests packages
[pipeline] Pin request package to v2.31.0
What I did
How I did it
How to verify it
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)