-
Notifications
You must be signed in to change notification settings - Fork 1k
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
pip & poetry backend does not honor poetry's "secondary" repo setting #4400
Comments
Hi! Is there a timeline for reaction to this? I would like to see the issue resolved. I've tried disabling proxying to global PyPI on our private registry and it almost fixed the problem, however This is plain wrong :( |
Hi there. A timeline would be great! I have the same issue and unfortunately I can't use dependabot. |
@brrygrdn can we have your attention please? This issue is blocking us from using dependabot for projects within our organization. |
I made some changes in how Poetry operates in #5222 which fixes the reference change issue. It may also address honoring the secondary setting. Let me know if it's working for you now, thanks for your patience! |
Hey @jakecoffman, it seems that did not fix the issue at hand: After adding the following to [[tool.poetry.source]]
name = "aws"
url = "https://dgx-shared-codeartifact-REDACTED.d.codeartifact.REDACTED.amazonaws.com/pypi/dgx-shared-pypi-repo/simple/"
secondary = true I've went ahead and retried a Dependabot update that was pending PR creation on the same repo. Here are the dependabot logs for that.
Once I remove the CodeArtifact source, Dependabot is able to create the PR without issues. |
@pliniodng did you configure credentials for that repository in dependabot.yml and in github repo secrets? |
@jakecoffman the fix seems to work for us! There is one minor nuisance I noticed, I will look into that and then close the issue. |
Since credentials for CodeArtifact expires every 12 hours, setting it is not a viable option for the company I'm working. The ideia was that if DependaBot honored the |
@pliniodng as per the
I suspect if you fire up I'm going to close as the original issue here is resolved, and the remaining edge case unfortunately sounds like an upstream issue with how |
Package ecosystem
pip + poetry
Package manager version
Poetry version 1.1.11
Language version
Python 3.8
Manifest location and content prior to update
https://github.com/maksbotan/dependabot-poetry-demo/blob/master/pyproject.toml
https://github.com/maksbotan/dependabot-poetry-demo/blob/master/poetry.lock
dependabot.yml content
https://github.com/maksbotan/dependabot-poetry-demo/blob/master/.github/dependabot.yml
Updated dependency
Bump docxtpl from 0.14.1 to 0.14.2
What you expected to see, versus what you actually saw
I have a private registry with
secondary = true
in mypyproject.toml
, i.e. I intend to use it only for my private packages, not overriding the global pypi.poetry
correctly locks only private package to this repo (see https://github.com/maksbotan/dependabot-poetry-demo/blob/7c539a42a3e2ff108140827142be6bd19e8c5767/poetry.lock#L299-L302).But dependabot's update locks all packages to use this private repo, including global pypi's ones. See this diff: https://github.com/maksbotan/dependabot-poetry-demo/pull/7/files#diff-f53a023eedfa3fbf2925ec7dc76eecdc954ea94b7e47065393dbad519613dc89
Note that all packages got a
[[package.source]]
section, with a bogusreference
at that. And the one with correct reference got rewritten:https://github.com/maksbotan/dependabot-poetry-demo/pull/7/files#diff-f53a023eedfa3fbf2925ec7dc76eecdc954ea94b7e47065393dbad519613dc89L302
Native package manager behavior
poetry will not try to get a dependency from a private repo with
secondary = true
unless explicitly told so.By the way, this exact bug was present in poetry 1.1.4 and was only fixed in 1.1.10. See the relevant issue: python-poetry/poetry#3306. Maybe it would be enough to update poetry version used by dependabot?
Images of the diff or a link to the PR, issue or logs
https://github.com/maksbotan/dependabot-poetry-demo/pull/7/files
Here it can be seen that dependabot tries to check this package in private repo (even though lock files states that it should not happen) and finds it there (since the repo redirects unknown packages to global pypi).
🕹 Bonus points: Smallest manifest that reproduces the issue
https://github.com/maksbotan/dependabot-poetry-demo/
The text was updated successfully, but these errors were encountered: