Skip to content

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

Merged
yxieca merged 2 commits intosonic-net:masterfrom
oleksandrivantsiv:master
May 23, 2024
Merged

[build] Fix base OS compilation issue caused by incompatibility between urllib3 and requests packages#3328
yxieca merged 2 commits intosonic-net:masterfrom
oleksandrivantsiv:master

Conversation

@oleksandrivantsiv
Copy link
Copy Markdown
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
Copy Markdown
Collaborator Author

/azpw run

@mssonicbld
Copy link
Copy Markdown
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@yxieca yxieca merged commit d5287d4 into sonic-net:master May 23, 2024
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
Copy Markdown

Can this be backported to 202305 too, please?

@krismarvell
Copy link
Copy Markdown
Contributor

Can this be backported to 202211 as well ? Thank you

@volodymyrsamotiy
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

@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
Copy Markdown
Contributor

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

@dgsudharsan
Copy link
Copy Markdown
Collaborator

@StormLiangMS We already have the PR open #3351

@volodymyrsamotiy
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
nmoray pushed a commit to nmoray/sonic-utilities that referenced this pull request Jun 25, 2025
…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
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.