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

fix(pip): fix compatibility with some simple pip indexes #6649

Merged
merged 4 commits into from Jul 7, 2020
Merged

fix(pip): fix compatibility with some simple pip indexes #6649

merged 4 commits into from Jul 7, 2020

Conversation

TheKevJames
Copy link
Contributor

Some "simple"-style pip indexes do not conform to the previous
assumption in this method, namely that they must end in /+simple/ if
they provide only that style of API. Gemfury private indexes, for
example, are assigned as::

pypi.fury.io/<username>

But offer only a simple API, eg. pypi.fury.io/<username>/<pkg>/json
will 404.

This changeset ensures Renovate works with indexes like this by adding a
fallback when the json API 404s to attempt the simple API. This is not
an optimal solution, but I could not find any way to be certain we can
determine whether the API will be json or simple in advance of querying
it.

lib/datasource/pypi/index.ts Outdated Show resolved Hide resolved
lib/datasource/pypi/index.ts Outdated Show resolved Hide resolved
Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need tests for it

Some "simple"-style pip indexes do not conform to the previous
assumption in this method, namely that they must end in `/+simple/` if
they provide only that style of API. Gemfury private indexes, for
example, are assigned as::

    pypi.fury.io/<username>

But offer only a simple API, eg. `pypi.fury.io/<username>/<pkg>/json`
will 404.

This changeset ensures Renovate works with indexes like this by adding a
fallback when the json API 404s to attempt the simple API. This is not
an optimal solution, but I could not find any way to be certain we can
determine whether the API will be json or simple in advance of querying
it.
@TheKevJames
Copy link
Contributor Author

@viceice sorry about that, should have opened this as a draft. Now ready for review!

@rarkins rarkins merged commit 7d3b475 into renovatebot:master Jul 7, 2020
@TheKevJames TheKevJames deleted the fixup-simple-pypi-host-assumption branch July 7, 2020 22:34
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants