fix: use test.pypi as extra index, not primary

UV was configured with test.pypi as primary index and PyPI as extra index.
This caused failures because packages like hf-transfer don't exist on test.pypi.

Changed to use PyPI as primary (default) and test.pypi as extra index.
UV will now find common packages on PyPI and only look for RC versions on test.pypi.
This commit is contained in:
Ashwin Bharambe 2025-10-31 07:29:20 -07:00
parent 275e0b9191
commit 8ebb9195a4
3 changed files with 6 additions and 15 deletions

View file

@ -8,9 +8,6 @@ inputs:
default: "" default: ""
outputs: outputs:
uv-index-url:
description: 'UV_INDEX_URL to use (set for release branches)'
value: ${{ steps.configure.outputs.uv-index-url }}
uv-extra-index-url: uv-extra-index-url:
description: 'UV_EXTRA_INDEX_URL to use (set for release branches)' description: 'UV_EXTRA_INDEX_URL to use (set for release branches)'
value: ${{ steps.configure.outputs.uv-extra-index-url }} value: ${{ steps.configure.outputs.uv-extra-index-url }}
@ -46,9 +43,8 @@ runs:
exit 1 exit 1
fi fi
# Configure to use test.pypi for sync (to resolve RC versions) # Configure to use test.pypi as extra index (PyPI is primary)
echo "uv-index-url=https://test.pypi.org/simple/" >> $GITHUB_OUTPUT echo "uv-extra-index-url=https://test.pypi.org/simple/" >> $GITHUB_OUTPUT
echo "uv-extra-index-url=https://pypi.org/simple/" >> $GITHUB_OUTPUT
echo "install-after-sync=true" >> $GITHUB_OUTPUT echo "install-after-sync=true" >> $GITHUB_OUTPUT
echo "install-source=git+https://github.com/llamastack/llama-stack-client-python.git@$BRANCH" >> $GITHUB_OUTPUT echo "install-source=git+https://github.com/llamastack/llama-stack-client-python.git@$BRANCH" >> $GITHUB_OUTPUT
elif [ "${{ inputs.client-version }}" = "latest" ]; then elif [ "${{ inputs.client-version }}" = "latest" ]; then

View file

@ -27,13 +27,11 @@ runs:
- name: Install dependencies - name: Install dependencies
shell: bash shell: bash
env: env:
UV_INDEX_URL: ${{ steps.client-config.outputs.uv-index-url }}
UV_EXTRA_INDEX_URL: ${{ steps.client-config.outputs.uv-extra-index-url }} UV_EXTRA_INDEX_URL: ${{ steps.client-config.outputs.uv-extra-index-url }}
UV_INDEX_STRATEGY: ${{ steps.client-config.outputs.uv-index-url && 'unsafe-best-match' || '' }} UV_INDEX_STRATEGY: ${{ steps.client-config.outputs.uv-extra-index-url && 'unsafe-best-match' || '' }}
run: | run: |
# Export UV env vars to GITHUB_ENV so they persist across steps # Export UV env vars to GITHUB_ENV so they persist across steps
if [ -n "$UV_INDEX_URL" ]; then if [ -n "$UV_EXTRA_INDEX_URL" ]; then
echo "UV_INDEX_URL=$UV_INDEX_URL" >> $GITHUB_ENV
echo "UV_EXTRA_INDEX_URL=$UV_EXTRA_INDEX_URL" >> $GITHUB_ENV echo "UV_EXTRA_INDEX_URL=$UV_EXTRA_INDEX_URL" >> $GITHUB_ENV
echo "UV_INDEX_STRATEGY=$UV_INDEX_STRATEGY" >> $GITHUB_ENV echo "UV_INDEX_STRATEGY=$UV_INDEX_STRATEGY" >> $GITHUB_ENV
echo "Exported UV environment variables for subsequent steps" echo "Exported UV environment variables for subsequent steps"

View file

@ -55,11 +55,9 @@ jobs:
- name: Export UV environment variables - name: Export UV environment variables
run: | run: |
if [ -n "${{ steps.client-config-precommit.outputs.uv-index-url }}" ]; then if [ -n "${{ steps.client-config-precommit.outputs.uv-extra-index-url }}" ]; then
echo "UV_INDEX_URL=${{ steps.client-config-precommit.outputs.uv-index-url }}" >> $GITHUB_ENV
echo "UV_EXTRA_INDEX_URL=${{ steps.client-config-precommit.outputs.uv-extra-index-url }}" >> $GITHUB_ENV echo "UV_EXTRA_INDEX_URL=${{ steps.client-config-precommit.outputs.uv-extra-index-url }}" >> $GITHUB_ENV
echo "UV_INDEX_STRATEGY=unsafe-best-match" >> $GITHUB_ENV echo "UV_INDEX_STRATEGY=unsafe-best-match" >> $GITHUB_ENV
echo "Setting UV_INDEX_URL to ${{ steps.client-config-precommit.outputs.uv-index-url }}"
echo "Setting UV_EXTRA_INDEX_URL to ${{ steps.client-config-precommit.outputs.uv-extra-index-url }}" echo "Setting UV_EXTRA_INDEX_URL to ${{ steps.client-config-precommit.outputs.uv-extra-index-url }}"
echo "Setting UV_INDEX_STRATEGY to unsafe-best-match" echo "Setting UV_INDEX_STRATEGY to unsafe-best-match"
fi fi
@ -139,9 +137,8 @@ jobs:
- name: Sync dev dependencies for mypy - name: Sync dev dependencies for mypy
env: env:
UV_INDEX_URL: ${{ steps.client-config.outputs.uv-index-url }}
UV_EXTRA_INDEX_URL: ${{ steps.client-config.outputs.uv-extra-index-url }} UV_EXTRA_INDEX_URL: ${{ steps.client-config.outputs.uv-extra-index-url }}
UV_INDEX_STRATEGY: ${{ steps.client-config.outputs.uv-index-url && 'unsafe-best-match' || '' }} UV_INDEX_STRATEGY: ${{ steps.client-config.outputs.uv-extra-index-url && 'unsafe-best-match' || '' }}
run: | run: |
# Check if type_checking group exists, otherwise just use dev # Check if type_checking group exists, otherwise just use dev
if grep -q "type.checking" pyproject.toml; then if grep -q "type.checking" pyproject.toml; then