feat(python-setup): guide users to a proxy when the package index is unreachable - #2116
Merged
Conversation
Contributor
Author
|
🤖 Integration tests ❌ 3 of 4 test jobs failed for |
rugpanov
force-pushed
the
python-setup-proxy-guidance
branch
from
August 13, 2026 19:58
b4c41e0 to
87041a6
Compare
Contributor
Author
|
🤖 Integration tests ❌ 3 of 4 test jobs failed for |
rugpanov
force-pushed
the
python-setup-proxy-guidance
branch
from
August 13, 2026 21:51
87041a6 to
de78c4b
Compare
Contributor
Author
|
🤖 Integration tests ❌ 3 of 4 test jobs failed for |
misha-db
approved these changes
Aug 14, 2026
…unreachable Why: On locked-down corporate machines pypi.org is blocked and uv must reach an alternate index/proxy. When it cannot, `environments setup-local` fails as E_PROVISION and the extension showed a misleading "dependency version conflict" message, leaving users with no path forward. What: - Detect uv's package-index connectivity failures and surface tailored guidance: a popup naming UV_INDEX_URL / a pip config index-url, a "Configure package index" button linking uv's docs, and copy-pasteable, cross-platform remediation in the output channel. The raw CLI error is still shown. - Detect precisely (E_PROVISION only): structurally exclude git sources (git+, "git repository") and direct distributions (.whl/.tar.), then require uv's "failed to fetch" aimed at a PEP 503 "/simple/" index path AND a host-unreachable connectivity symptom (incl. Linux and macOS DNS phrasings). This includes a git-NAMED package (/simple/gitpython/) while excluding git/direct-URL fetches and names like /simplejson-…, and leaves genuine conflicts on their own message. E_PYTHON_INSTALL is excluded (CPython download from a different mirror). - Add an optional boolean `indexUnreachable` on python_env.setup.result to measure how often a blocked index (vs a conflict) is the cause. Verification: - errorMessages unit tests: 45 passing (detector incl. git-named/git-source/ direct-URL/simple-in-name/macOS-DNS cases, message, action, remediation, telemetry, negatives). Full suite passed at 760 on the prior functional state. - prettier + eslint clean. - Reproduced against real uv 0.12.3 (UV_INDEX_URL -> a refusing endpoint): the genuine "Failed to fetch ... Connection refused" text maps to the guidance. - Reviewed across five rounds (Isaac + Codex + Claude); converged with both fresh reviewers approving and no outstanding findings. Co-authored-by: Isaac
rugpanov
force-pushed
the
python-setup-proxy-guidance
branch
from
August 14, 2026 11:11
de78c4b to
a341335
Compare
Contributor
|
If integration tests don't run automatically, an authorized user can run them manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
rugpanov
had a problem deploying
to
test-trigger-is
August 14, 2026 11:12 — with
GitHub Actions
Error
Contributor
Author
|
🤖 Integration tests ❌ 1 of 35 test jobs failed for |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
On locked-down corporate machines
pypi.orgis blocked and uv must reach an alternate index/proxy. When it can't,environments setup-localfails asE_PROVISIONand the extension showed a misleading "dependency version conflict" message — leaving users with no path forward.What
UV_INDEX_URL/ a pip.confindex-url,E_PROVISIONonly, requiring uv'sfailed to fetchindex context (excluding git deps) plus a host-unreachable symptom — so genuine dependency conflicts, git-dependency fetches, and build-tool stderr are not mislabelled.E_PYTHON_INSTALLis deliberately excluded (a managed-CPython download from a different mirror that this guidance can't fix).indexUnreachableonpython_env.setup.resultto measure how often a blocked index (vs a conflict) is the cause.Verification
yarn test:unit— 757 passing, 0 failing (detector, message, action, output-channel remediation, telemetry, and negative cases).UV_INDEX_URL→ a refusing endpoint): the genuineFailed to fetch … Connection refusedtext maps to the proxy guidance and button.Note
Stacks on #2113 (the "Install uv" button), which introduces the popup action-button infra this builds on. The diff shows those commits too until #2113 merges; please merge this after #2113.
This pull request and its description were written by Isaac.