Skip to content

fix(pypi): skip index lookups when all package overrides are specified#3710

Open
aignas wants to merge 1 commit intobazel-contrib:mainfrom
aignas:aignas.fix.experimental_index_url_overrides_no_index_call
Open

fix(pypi): skip index lookups when all package overrides are specified#3710
aignas wants to merge 1 commit intobazel-contrib:mainfrom
aignas:aignas.fix.experimental_index_url_overrides_no_index_call

Conversation

@aignas
Copy link
Copy Markdown
Collaborator

@aignas aignas commented Apr 16, 2026

When index_url_overrides is provided for all packages, we no longer need to
call the index at all. This improves performance and aligns with the expected
behavior where overrides should be sufficient.

Fixes #3709

When index_url_overrides is provided for all packages, we no longer need to
call the index at all. This improves performance and aligns with the expected
behavior where overrides should be sufficient.

Fixes bazel-contrib#3709
@aignas aignas requested review from groodt and rickeylev as code owners April 16, 2026 12:14
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request modifies the simpleapi_download logic to optimize package URL resolution when index_url_overrides are provided, alongside corresponding updates to the documentation and tests. However, the current implementation introduces a regression by ignoring extra_index_urls whenever any override is present, which breaks support for partial overrides. Feedback suggests refining the early-return condition to ensure that auto-discovery via extra indexes is preserved when necessary. A minor formatting issue with a trailing space in the changelog was also identified.

Comment thread python/private/pypi/simpleapi_download.bzl
Comment thread CHANGELOG.md
@rickeylev rickeylev added this pull request to the merge queue Apr 16, 2026
@rickeylev
Copy link
Copy Markdown
Collaborator

Does this need to be put into the 2.0 release?

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 16, 2026
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.

simpleapi_download: root /simple/ fetch crashes on registries that don't serve PEP 503 root index (e.g. Google Artifact Registry)

2 participants