Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(pip-compile): Provide credentials for registries in all input files #28959

Conversation

mbudnek
Copy link
Contributor

@mbudnek mbudnek commented May 9, 2024

Changes

Pip-compile can compile multiple input files into one lock file. Renovate calls the manager's updateArtifacts function once for each input file, but currently it only looks for private package registries in the input file currently being processed. This changes it to look for them in all of the input files.

Context

#28958

Documentation (please check one with an [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
  • Both unit tests + ran on a real repository

Pip-compile can compile multiple input files into one lock file.
Renovate calls the manager's `updateArtifacts` function once for each
input file, but currently it only looks for private package registries
in the input file currently being processed.  This changes it to look
for them in all of the input files.
@mbudnek mbudnek changed the title feat(pip-compile) Provide credentials for registries in all input files feat(pip-compile): Provide credentials for registries in all input files May 9, 2024
@mbudnek
Copy link
Contributor Author

mbudnek commented May 16, 2024

@viceice @rarkins Bump, just to make sure this PR hasn't fallen through the cracks.

@mbudnek mbudnek requested a review from viceice May 17, 2024 14:55
lib/modules/manager/pip-compile/extract.ts Outdated Show resolved Hide resolved
lib/modules/manager/pip_requirements/extract.ts Outdated Show resolved Hide resolved
lib/modules/manager/pip-compile/common.ts Outdated Show resolved Hide resolved
mbudnek added a commit to mbudnek/renovate that referenced this pull request May 30, 2024
Move the matchManager function to common.ts since it will be used in
artifacts.ts in renovatebot#28959
mbudnek added a commit to mbudnek/renovate that referenced this pull request May 30, 2024
The pip-compile manager will need to extract flags from pip requirements
files in renovatebot#28959, so move that code into a common.ts
@mbudnek mbudnek requested a review from viceice June 3, 2024 14:34
@mbudnek
Copy link
Contributor Author

mbudnek commented Jun 4, 2024

@viceice Did you mean to merge this when you approved it, or is there something blocking it?

@viceice viceice requested a review from secustor June 4, 2024 15:03
@secustor secustor added this pull request to the merge queue Jun 4, 2024
Merged via the queue into renovatebot:main with commit c27e0ec Jun 4, 2024
35 checks passed
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 37.389.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@mbudnek mbudnek deleted the feat/pip-compile-private-registry-multiple-inputs branch June 4, 2024 17:31
mbudnek added a commit to mbudnek/renovate that referenced this pull request Jun 6, 2024
This fixes a case I missed in renovatebot#28959 where a lock file uses another lock
file as an input file.  In that case, we need to treat the input lock
file as a pip_requirements file so that we extract the
--[extra-]index-url flags from it and pass the correct credentials to
pip-compile.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants