mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-11 19:56:03 +00:00
fix: set UV_INDEX_STRATEGY=unsafe-best-match for multiple indexes
When using multiple indexes (test.pypi + PyPI), uv uses first-index-wins strategy by default to prevent dependency confusion. This causes it to try fetching all packages from test.pypi first, which fails. Setting UV_INDEX_STRATEGY=unsafe-best-match tells uv to check all indexes for the best version match, allowing it to get common packages from PyPI and RC versions from test.pypi.
This commit is contained in:
parent
7867a08711
commit
2c60990710
2 changed files with 5 additions and 3 deletions
1
.github/actions/setup-runner/action.yml
vendored
1
.github/actions/setup-runner/action.yml
vendored
|
|
@ -29,6 +29,7 @@ runs:
|
||||||
env:
|
env:
|
||||||
UV_INDEX_URL: ${{ steps.client-config.outputs.uv-index-url }}
|
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' || '' }}
|
||||||
run: |
|
run: |
|
||||||
echo "Updating project dependencies via uv sync"
|
echo "Updating project dependencies via uv sync"
|
||||||
uv sync --all-groups
|
uv sync --all-groups
|
||||||
|
|
|
||||||
7
.github/workflows/pre-commit.yml
vendored
7
.github/workflows/pre-commit.yml
vendored
|
|
@ -57,11 +57,11 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
if [ -n "${{ steps.client-config-precommit.outputs.uv-index-url }}" ]; then
|
if [ -n "${{ steps.client-config-precommit.outputs.uv-index-url }}" ]; then
|
||||||
echo "UV_INDEX_URL=${{ steps.client-config-precommit.outputs.uv-index-url }}" >> $GITHUB_ENV
|
echo "UV_INDEX_URL=${{ steps.client-config-precommit.outputs.uv-index-url }}" >> $GITHUB_ENV
|
||||||
echo "Setting UV_INDEX_URL to ${{ steps.client-config-precommit.outputs.uv-index-url }}"
|
|
||||||
fi
|
|
||||||
if [ -n "${{ steps.client-config-precommit.outputs.uv-extra-index-url }}" ]; then
|
|
||||||
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 "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"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Run pre-commit
|
- name: Run pre-commit
|
||||||
|
|
@ -135,6 +135,7 @@ jobs:
|
||||||
env:
|
env:
|
||||||
UV_INDEX_URL: ${{ steps.client-config.outputs.uv-index-url }}
|
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' || '' }}
|
||||||
run: |
|
run: |
|
||||||
uv sync --group dev --group type_checking
|
uv sync --group dev --group type_checking
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue