You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When prek runs, it will search for uv and, if uv is not present in the system, prek will automatically download and install it.
In some scenarios, it's forbidden by policy or not desirable to make connections to the internet and install arbitrary software on the system, such us in CI pipelines, where security and reproducibility are critical. In these cases, it's more desirable to get an error message when uv is not installed.
prek should also provide a way to disable automatic uv downloads for those scenarios where installing arbitrary software from the internet is not desirable. Automatic downloads should be opt-in.
Implementation idea
The environment variable PREK_UV_SOURCE already enables users to select the download source for uv, but it assumes that users will always want this to happen automatically.
A new value could be added to PREK_UV_SOURCE to disable automatic downloads, such us none or disable, or the behavior of an empty value could be changed to disable.
Alternatively, a separate environment variable could be added, e.g. PREK_UV_DOWNLOADS, with similar semantics as UV_PYTHON_DOWNLOADS / python-downloads.
Ideally, prek should also support an analogous configuration option in the prek configuration file.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Motivation
When prek runs, it will search for uv and, if uv is not present in the system, prek will automatically download and install it.
In some scenarios, it's forbidden by policy or not desirable to make connections to the internet and install arbitrary software on the system, such us in CI pipelines, where security and reproducibility are critical. In these cases, it's more desirable to get an error message when uv is not installed.
uv provides the python-downloads setting and the UV_PYTHON_DOWNLOADS environment variable, which can disable automatic Python downloads.
Proposal
prek should also provide a way to disable automatic uv downloads for those scenarios where installing arbitrary software from the internet is not desirable. Automatic downloads should be opt-in.
Implementation idea
The environment variable PREK_UV_SOURCE already enables users to select the download source for uv, but it assumes that users will always want this to happen automatically.
A new value could be added to PREK_UV_SOURCE to disable automatic downloads, such us
noneordisable, or the behavior of an empty value could be changed todisable.Alternatively, a separate environment variable could be added, e.g.
PREK_UV_DOWNLOADS, with similar semantics as UV_PYTHON_DOWNLOADS / python-downloads.Ideally, prek should also support an analogous configuration option in the prek configuration file.
All reactions