Skip to content

Make UV_HTTP_TIMEOUT default value bigger in WSL2 environment#38742

Merged
potiuk merged 2 commits intoapache:mainfrom
potiuk:improve-uv-timeout-setting
Apr 4, 2024
Merged

Make UV_HTTP_TIMEOUT default value bigger in WSL2 environment#38742
potiuk merged 2 commits intoapache:mainfrom
potiuk:improve-uv-timeout-setting

Conversation

@potiuk
Copy link
Copy Markdown
Member

@potiuk potiuk commented Apr 4, 2024

When uv docker build is run in WSL2 the default timeout does not cope well with downloading big packages and times-out with the default UV timeout. This PR performs detection of whether you are in a WSL environment and changes the timeout in case you are in WSL2. It also raises error when WSL1 is detected (not supported by Breeze at all). In case the WSL1 detection is wrong we also have an escape hatch by manually specifying --uv-http-timeout.


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@potiuk
Copy link
Copy Markdown
Member Author

potiuk commented Apr 4, 2024

cc: @dabla

@potiuk potiuk requested a review from uranusjr April 4, 2024 10:28
When uv docker build is run in WSL2 the default timeout does not
cope well with downloading big packages and times-out with the
default UV timeout. This PR performs detection of whether you
are in a WSL environment and changes the timeout in case you are
in WSL2. It also raises error when WSL1 is detected (not supported
by Breeze at all). In case the WSL1 detection is wrong we also
have an escape hatch by manually specifying `--uv-http-timeout`.
@potiuk potiuk force-pushed the improve-uv-timeout-setting branch from 7f9c602 to d3c55f7 Compare April 4, 2024 10:29
@potiuk potiuk force-pushed the improve-uv-timeout-setting branch from 7da0642 to c93ca09 Compare April 4, 2024 10:54
Co-authored-by: Andrey Anshin <Andrey.Anshin@taragol.is>
@potiuk potiuk force-pushed the improve-uv-timeout-setting branch from c93ca09 to 273f7e1 Compare April 4, 2024 10:55
@potiuk potiuk added this to the Airflow 2.9.0 milestone Apr 4, 2024
@potiuk potiuk merged commit fb7f82c into apache:main Apr 4, 2024
@potiuk potiuk deleted the improve-uv-timeout-setting branch April 4, 2024 11:51
potiuk added a commit that referenced this pull request Apr 4, 2024
* Make UV_HTTP_TIMEOUT default value bigger in WSL2 environment

When uv docker build is run in WSL2 the default timeout does not
cope well with downloading big packages and times-out with the
default UV timeout. This PR performs detection of whether you
are in a WSL environment and changes the timeout in case you are
in WSL2. It also raises error when WSL1 is detected (not supported
by Breeze at all). In case the WSL1 detection is wrong we also
have an escape hatch by manually specifying `--uv-http-timeout`.

* Update dev/breeze/src/airflow_breeze/utils/platforms.py

Co-authored-by: Andrey Anshin <Andrey.Anshin@taragol.is>

---------

Co-authored-by: Andrey Anshin <Andrey.Anshin@taragol.is>
(cherry picked from commit fb7f82c)
@potiuk potiuk added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:dev-tools changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants