lockFileMaintenance for uv.lock uses wrong index #40201
How are you running Renovate?Self-hosted Renovate Which platform you running Renovate on?GitLab (.com or self-hosted) Which version of Renovate are you using?42.59.1 Please tell us more about your question or problemI am having a Python Project, managed by uv. I am in a company network, where i have to use a custom default pypi index, that i am populating via the environment variable For my renovate installation, i configured a global package rule to use this pypi index: "packageRules": [
{
"matchDatasources": ["pypi"],
"registryUrls": [
"https://repo.example.org/artifactory/api/pypi/pypi-remote/simple"
]
}
]Its important to know, that uv writes the source index and package URLs into its lockfile. As a result of that, my local uv installation is injecting also my local pypi index into my uv.lock file. But if i renovate this project, i get a merge request with e.g. this change in the uv.lock file: (This is happening to all dependencies in the uv.lock file) So it seems like renovate is just ignoring the custom index from the packageRules configuration on lockFileMaintenance actions. I just had a look into the code and found the following:
Renovate just runs So whats the problem? At the one hand, this is a ping pong in the commit history, as my local uv installation and renovate are permanently exchanging the URLs in the lockfile. On the other hand, and thats the real problem: If the uv workspace is installed by executing I already tried to set the mentioned environment variable Logs (if relevant)No response |
Replies: 2 comments
|
So a colleague pointed out, that my assumption of renovate's behavior is correct, and that i need to pass the I will keep this disucssion open, as i personally think, that renovates default behavior is not really the one, that i expected. I am interested in the opinion of renovate's maintainers about this. |
|
Same issue here. This is very counter-intuitive. Even with Renovate configured to use only our Nexus PyPI proxy, updating uv.lock causes Renovate to run uv lock in a way that falls back to the global default (pypi.org) and rewrites the lockfile accordingly. For environments where public PyPI must never be used, this is a serious problem and easy to miss in PR review. Expectation from a user perspective: At minimum, Renovate should either propagate the configured index to uv or fail instead of silently falling back. |
So a colleague pointed out, that my assumption of renovate's behavior is correct, and that i need to pass the
UV_DEFAULT_INDEXviacustomEnvVariablesin the renovate configuration. I added that to our configuration and now, everything works as expected.I will keep this disucssion open, as i personally think, that renovates default behavior is not really the one, that i expected. I am interested in the opinion of renovate's maintainers about this.