Skip to content
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 between urllib3 and requests packages #3328

Merged
merged 2 commits into from
May 23, 2024

Conversation

oleksandrivantsiv
Copy link
Collaborator

What I did

Fix SONiC image compilation issue:

+ sudo LANG=C DOCKER_HOST= chroot ./fsroot-mellanox /usr/local/bin/generate_shutdown_order.py
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/dist-packages/requests/adapters.py", line 532, in send
    conn = self._get_connection(request, verify, proxies=proxies, cert=cert)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/requests/adapters.py", line 400, in _get_connection
    conn = self.poolmanager.connection_from_host(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/urllib3/poolmanager.py", line 304, in connection_from_host
    return self.connection_from_context(request_context)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/urllib3/poolmanager.py", line 326, in connection_from_context
    raise URLSchemeUnknown(scheme)
urllib3.exceptions.URLSchemeUnknown: Not supported URL scheme http+docker

How I did it

Pin request version <= <=2.31.0.

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)

@oleksandrivantsiv
Copy link
Collaborator Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@yxieca yxieca merged commit d5287d4 into sonic-net:master May 23, 2024
7 checks passed
oleksandrivantsiv added a commit to oleksandrivantsiv/sonic-utilities that referenced this pull request May 23, 2024
…en urllib3 and requests packages (sonic-net#3328)

* [build] Fix base OS compilation issue caused by incompatibility between urllib3 and requests packages

* [pipeline] Pin request package to v2.31.0
@jusherma
Copy link

Can this be backported to 202305 too, please?

@krismarvell
Copy link

Can this be backported to 202211 as well ? Thank you

@volodymyrsamotiy
Copy link
Collaborator

@yxieca, the same build issue is observed on 202205 branch, could you please help to check if we need to cherry-pick this fix to 202205?
For now I am setting "request for 202205" label.

@yxieca
Copy link
Contributor

yxieca commented May 28, 2024

@volodymyrsamotiy seems that we need separate PR for 202205 branch.

yxieca pushed a commit that referenced this pull request May 28, 2024
…en urllib3 and requests packages (#3328) (#3337)

* [build] Fix base OS compilation issue caused by incompatibility between urllib3 and requests packages

* [pipeline] Pin request package to v2.31.0
@krismarvell
Copy link

@yxieca should we raise a seperate PR for 202211 as well? Pls let me know how to go about it. We are using 202211 branch actively

ryanzhu706 added a commit to ryanzhu706/sonic-utilities that referenced this pull request May 31, 2024
…en urllib3 and requests packages (sonic-net#3328)

* [build] Fix base OS compilation issue caused by incompatibility between urllib3 and requests packages

* [pipeline] Pin request package to v2.31.0
oleksandrivantsiv added a commit to oleksandrivantsiv/sonic-utilities that referenced this pull request May 31, 2024
…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
@StormLiangMS
Copy link
Contributor

hi @oleksandrivantsiv @dgsudharsan cherry pick conflict for 202305, could you file separate PR?

@dgsudharsan
Copy link
Collaborator

@StormLiangMS We already have the PR open #3351

@volodymyrsamotiy
Copy link
Collaborator

@volodymyrsamotiy seems that we need separate PR for 202205 branch.

@yxieca, I created 202205 PR - #3355 [cherry-pick][202205][build] Fix base OS compilation issue caused by incompatibility between urllib3 and requests packages (#3328)

yxieca pushed a commit that referenced this pull request Jun 5, 2024
…en urllib3 and requests packages (#3328) (#3355)

Co-authored-by: Oleksandr Ivantsiv <oivantsiv@nvidia.com>
@lizhijianrd
Copy link
Contributor

@saiarcot895 I saw you upgraded docker to 7.1.0 to fix this issue: sonic-net/sonic-buildimage#19181

Should we revert this PR? When I run sonic-utilities test, the env is installing requests=2.32.3 but current PR requires request<=2.32.0 so UT cannot run.

@saiarcot895
Copy link
Contributor

@lizhijianrd I think it can be reverted, but as long as docker 7.1.0 is getting installed in the test environment. I don't know if that is the case here.

arfeigin pushed a commit to arfeigin/sonic-utilities that referenced this pull request Jun 16, 2024
…en urllib3 and requests packages (sonic-net#3328)

* [build] Fix base OS compilation issue caused by incompatibility between urllib3 and requests packages

* [pipeline] Pin request package to v2.31.0
nazariig pushed a commit to nazariig/sonic-utilities that referenced this pull request Aug 27, 2024
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.