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

dependabot updater still check poetry explicit source #7918

Closed
1 task done
lucemia opened this issue Aug 29, 2023 · 5 comments · Fixed by #8371
Closed
1 task done

dependabot updater still check poetry explicit source #7918

lucemia opened this issue Aug 29, 2023 · 5 comments · Fixed by #8371
Labels
L: python:poetry Python packages via poetry T: bug 🐞 Something isn't working

Comments

@lucemia
Copy link
Contributor

lucemia commented Aug 29, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Package ecosystem

poetry

Package manager version

poetry 1.6

Language version

python 3.10

Manifest location and content before the Dependabot update

/pyproject.toml and /poetry.lock

dependabot.yml content

version: 2
updates:
  - package-ecosystem: "pip" # See documentation for possible values
    directory: "/" # Location of package manifests
    schedule:
      interval: "daily"
    open-pull-requests-limit: 5
    allow:
      - dependency-type: "all"
  - package-ecosystem: "docker" # See documentation for possible values
    directory: "/" # Location of package manifests
    schedule:
      interval: "daily"
    open-pull-requests-limit: 20

Updated dependency

No response

What you expected to see, versus what you actually saw

Poetry 1.5.0 introduced explicit package source
https://python-poetry.org/docs/repositories/#explicit-package-sources

If package sources are configured as explicit, these sources are only searched when a package configuration explicitly indicates that it should be found on this package source.

However, in latest dependabot, the updater will still check package against source marked as explicit. Which double the execution time.

updater | 2023/08/29 06:15:39 INFO <job_715108988> Checking if protobuf 3.20.3 needs updating
  proxy | 2023/08/29 06:15:39 [044] GET https://pypi.org:443/simple/protobuf/
  proxy | 2023/08/29 06:15:39 [044] 200 https://pypi.org:443/simple/protobuf/
  proxy | 2023/08/29 06:15:40 [046] GET https://[my private pypi]/pypi/protobuf/
  proxy | 2023/08/29 06:15:40 [046] 404 https://[my private pypi]/pypi/protobuf/

Native package manager behavior

will not check protobuf against my private pypi

Images of the diff or a link to the PR, issue, or logs

No response

Smallest manifest that reproduces the issue

No response

@lucemia lucemia added the T: bug 🐞 Something isn't working label Aug 29, 2023
@deivid-rodriguez
Copy link
Contributor

Thanks for reporting!

Yes, it sounds like we could do some extra filtering over Dependabot::Python::UpdateChecker::IndexFinder#index_urls using this information. Maybe optionally pass it a dependency, and exclude any urls from the result that are marked as "explicit" and are not explicitly configured for the dependency.

Happy to review a PR implementing this!

@deivid-rodriguez deivid-rodriguez added the L: python:poetry Python packages via poetry label Sep 19, 2023
@lucemia
Copy link
Contributor Author

lucemia commented Oct 15, 2023

Sure, I'll give it a shot, but I don't have much experience with Ruby.

@lucemia
Copy link
Contributor Author

lucemia commented Nov 11, 2023

Note:

I've observed that the recent Dependabot update retains the "explicit" source at the beginning, but after this line, Dependabot appears to forget about the explicit setting once more.

updater | 2023/11/10 19:38:44 INFO <job_748206401> Requirements to unlock own

lucemia added a commit to lucemia/dependabot-core that referenced this issue Nov 11, 2023
@lucemia
Copy link
Contributor Author

lucemia commented Nov 13, 2023

@deivid-rodriguez

@deivid-rodriguez
Copy link
Contributor

Awesome, thanks so much for persisting on this @lucemia, I will get to your PR as soon as possible!

lucemia added a commit to lucemia/dependabot-core that referenced this issue Nov 16, 2023
lucemia added a commit to lucemia/dependabot-core that referenced this issue Nov 16, 2023
deivid-rodriguez pushed a commit to lucemia/dependabot-core that referenced this issue Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: python:poetry Python packages via poetry T: bug 🐞 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants