You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hmm, hashin's interface requires us to know which index specifically the package lives on, but I don't think that this is information that we have in Dependabot right now.
We can likely mimic the interface that pip uses (add multiple indexes via --extra-index-url and then figure it out), and pass all the index URLs we have and try each one. We have them ordered by likelihood here.
So we'd need to:
update the native helper to accept the index url
try all of them in order until we find the hashes
return a better error that we can handle if none can be found
I already did that last part and added a small test to reproduce in this draft PR
Dependabot relies on
hashin
to get Python package hashes:dependabot-core/python/helpers/lib/hasher.py
Lines 7 to 14 in 08ac25e
Dependabot does not supply the
index_url
argument, so thehashin.get_package_hashes
function assumes the package is on PyPI ("https://pypi.org/"
):https://github.com/peterbe/hashin/blob/628bfe1d1dac565d743df76c9090f4534b625f23/hashin.py#L49
As a result, Dependabot errors out when
hashin
tries to look up the package metadata onpypi.org
:Full Dependabot Error Log
The text was updated successfully, but these errors were encountered: