fix: use test.pypi for uv sync on release branches

The previous approach tried to install before uv sync, but there's no
venv yet. The correct solution:

- Release branches: Point UV_INDEX_URL to test.pypi so uv sync can
  resolve RC versions, then install exact git version after sync
- Non-release branches: Run uv sync normally, then install git version
  if client-version=latest

This lets uv sync create the venv first, then we install/override the
client version as needed.
This commit is contained in:
Ashwin Bharambe 2025-10-30 23:11:14 -07:00
parent 0924d8ad87
commit 34471d87c1
3 changed files with 60 additions and 26 deletions

View file

@ -18,13 +18,17 @@ runs:
python-version: ${{ inputs.python-version }}
version: 0.7.6
- name: Install llama-stack-client
- name: Configure client installation
id: client-config
uses: ./.github/actions/install-llama-stack-client
with:
client-version: ${{ inputs.client-version }}
- name: Install dependencies
shell: bash
env:
UV_INDEX_URL: ${{ steps.client-config.outputs.uv-index-url }}
UV_EXTRA_INDEX_URL: ${{ steps.client-config.outputs.uv-extra-index-url }}
run: |
echo "Updating project dependencies via uv sync"
uv sync --all-groups
@ -32,5 +36,11 @@ runs:
echo "Installing ad-hoc dependencies"
uv pip install faiss-cpu
# Install specific client version after sync if needed
if [ "${{ steps.client-config.outputs.install-after-sync }}" = "true" ]; then
echo "Installing llama-stack-client from: ${{ steps.client-config.outputs.install-source }}"
uv pip install ${{ steps.client-config.outputs.install-source }}
fi
echo "Installed llama packages"
uv pip list | grep llama