Repository navigation
fix(plugins): drop a trailing slash from pypi_url before adding /simple - #4081
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 2867-pypi_url-not-passed-to-uv-during-docker-image-builds-breaking-air-gappedproxy-environments #4081 +/- ##
===================================================================================================================================
- Coverage 80.57% 80.52% -0.06%
===================================================================================================================================
Files 904 904
Lines 68996 68993 -3
Branches 2681 2681
===================================================================================================================================
- Hits 55592 55554 -38
- Misses 12741 12773 +32
- Partials 663 666 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
mcosgriff
left a comment
There was a problem hiding this comment.
Approved in CodeRabbit Change Stack
A pypi_url setting or PYPI_URL ending in / produced //simple, and https://pypi.org/ no longer matched the default, so uv got --no-config for the public index. Normalize the same way the image builds do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
d97ecfc to
83fb9dc
Compare
|



Stacked on #3891.
#3891 makes the image builds tolerate a trailing slash on
PYPI_URL(${PYPI_URL%/}/simple), but runtime plugin and package installs appended/simpleto the rawpypi_urlsetting orPYPI_URLvalue. A value ending in/gavehttps://mirror//simple.https://pypi.org/also stopped matchingPypiUrl::DEFAULT, so uv got--no-config(and--no-sources) for the public index.seed_databasecopiesPYPI_URLinto the setting verbatim, so a trailing slash the build now accepts would reach runtime installs.Changes
PypiUrl.index_urlstrips trailing slashes, then adds/simplePluginModel.resolve_pypi_urlandPythonPackageModel.installuse it for both the setting and thePYPI_URLfallbackTesting
index_urlplus trailing-slash cases for both models; the 4 new model specs fail without the fixbundle exec rspec spec/utilities/pypi_url_spec.rb spec/models/plugin_model_spec.rb spec/models/python_package_model_spec.rb: 135 examples, 0 failures🤖 Generated with Claude Code
Summary by CodeRabbit