From ffcb76597bc3137c806a7dda023afceffef89a12 Mon Sep 17 00:00:00 2001 From: Ashwin Bharambe Date: Sat, 1 Nov 2025 07:45:27 -0700 Subject: [PATCH] fix(ci): export UV_INDEX_STRATEGY to current shell before running uv sync The previous fix only exported UV_INDEX_STRATEGY to GITHUB_ENV, which only affects subsequent GitHub Actions steps. However, uv sync runs in the same step, so it never saw the UV_INDEX_STRATEGY variable. This caused uv to fail when UV_EXTRA_INDEX_URL was set (on release branches) because uv would find packages on test.pypi but refuse to check PyPI for compatible versions, resulting in: setuptools was found on test.pypi but not at the requested version. A compatible version may be available on PyPI. Use --index-strategy unsafe-best-match to check all indexes. The fix adds export UV_INDEX_STRATEGY=unsafe-best-match to make it available in the current shell before running uv commands. --- .github/actions/setup-runner/action.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/actions/setup-runner/action.yml b/.github/actions/setup-runner/action.yml index cf31101e4..3237abb67 100644 --- a/.github/actions/setup-runner/action.yml +++ b/.github/actions/setup-runner/action.yml @@ -29,11 +29,12 @@ runs: env: UV_EXTRA_INDEX_URL: ${{ steps.client-config.outputs.uv-extra-index-url }} run: | - # Export UV env vars to GITHUB_ENV so they persist across steps + # Export UV env vars for current step and persist to GITHUB_ENV for subsequent steps if [ -n "$UV_EXTRA_INDEX_URL" ]; then + export UV_INDEX_STRATEGY=unsafe-best-match echo "UV_EXTRA_INDEX_URL=$UV_EXTRA_INDEX_URL" >> $GITHUB_ENV - echo "UV_INDEX_STRATEGY=unsafe-best-match" >> $GITHUB_ENV - echo "Exported UV environment variables for subsequent steps" + echo "UV_INDEX_STRATEGY=$UV_INDEX_STRATEGY" >> $GITHUB_ENV + echo "Exported UV environment variables for current and subsequent steps" fi echo "Updating project dependencies via uv sync"