renovate icon indicating copy to clipboard operation
renovate copied to clipboard

feat(manager/pip-compile): Add support for non-default package repos to the pip-compile manager

Open mbudnek opened this issue 1 year ago • 4 comments

Changes

Update the pip-compile manager to read any --index-url and --extra-index-url flags from the input file and use those to look up credentials in hostRules. The resulting URLs with authentication are passed to pip-compile as environment variables to ensure they don't end up in the lockfile's header comment.

Context

#26854

As discussed in #21838, the pip-compile manager cannot update dependencies in private repos unless you pass in PIP_EXTRA_INDEX_URL environment variables, which is not possible when using the GitHub app version of Renovate.

Some more discussion in https://github.com/renovatebot/renovate/discussions/24725#discussioncomment-8226384

Documentation (please check one with an [x])

  • [x] I have updated the documentation, or
  • [ ] No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • [ ] Code inspection only, or
  • [ ] Newly added/modified unit tests, or
  • [ ] No unit tests but ran on a real repository, or
  • [x] Both unit tests + ran on a real repository

mbudnek avatar Jan 25 '24 00:01 mbudnek

This needs more discussion first. Please create a new discussion list for this particular topic. Changing the manager interface is not ideal

rarkins avatar Jan 25 '24 05:01 rarkins

@rarkins I've had a bit more discussion in https://github.com/renovatebot/renovate/discussions/24725#discussioncomment-8226384 (sorry, I forgot to mention that thread in the initial PR description). I agree that this isn't quite ideal, but I can't think of any way to make this work that doesn't involve somehow pulling this list of URLs into the manager. The only other idea I have would be to look for all registryUrls matching the "pypi" datasource type. I'll look into that tomorrow.

mbudnek avatar Jan 25 '24 05:01 mbudnek

Please start a separate discussion, feel free to link to the previous comments when you do so

rarkins avatar Jan 25 '24 06:01 rarkins

Created #26854 for further discussion.

mbudnek avatar Jan 25 '24 07:01 mbudnek

:tada: This PR is included in version 37.185.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

renovate-release avatar Feb 12 '24 19:02 renovate-release