From 98fa43fd94a868bee1573de7bd7ed5960bfbbb06 Mon Sep 17 00:00:00 2001 From: Ashwin Bharambe Date: Fri, 31 Oct 2025 09:52:33 -0700 Subject: [PATCH] fix: pass UV index config to docker build for RC dependencies Docker builds on release branches need access to UV_EXTRA_INDEX_URL and UV_INDEX_STRATEGY to resolve RC client dependencies from test.pypi. Changes: - Add UV_EXTRA_INDEX_URL and UV_INDEX_STRATEGY build args to Containerfile - Pass these env vars as build args in integration-tests.sh - ENV variables are now available during uv pip install in Docker builds --- containers/Containerfile | 4 ++++ scripts/integration-tests.sh | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/containers/Containerfile b/containers/Containerfile index 1ddf102af..050f52940 100644 --- a/containers/Containerfile +++ b/containers/Containerfile @@ -19,6 +19,8 @@ ARG KEEP_WORKSPACE="" ARG DISTRO_NAME="starter" ARG RUN_CONFIG_PATH="" ARG UV_HTTP_TIMEOUT=500 +ARG UV_EXTRA_INDEX_URL="" +ARG UV_INDEX_STRATEGY="" ENV UV_HTTP_TIMEOUT=${UV_HTTP_TIMEOUT} ENV PYTHONDONTWRITEBYTECODE=1 ENV PIP_DISABLE_PIP_VERSION_CHECK=1 @@ -56,6 +58,8 @@ ENV TEST_PYPI_VERSION=${TEST_PYPI_VERSION} ENV KEEP_WORKSPACE=${KEEP_WORKSPACE} ENV DISTRO_NAME=${DISTRO_NAME} ENV RUN_CONFIG_PATH=${RUN_CONFIG_PATH} +ENV UV_EXTRA_INDEX_URL=${UV_EXTRA_INDEX_URL} +ENV UV_INDEX_STRATEGY=${UV_INDEX_STRATEGY} # Copy the repository so editable installs and run configurations are available. COPY . /workspace diff --git a/scripts/integration-tests.sh b/scripts/integration-tests.sh index 93739052b..008a420bf 100755 --- a/scripts/integration-tests.sh +++ b/scripts/integration-tests.sh @@ -271,6 +271,16 @@ if [[ "$STACK_CONFIG" == *"docker:"* && "$COLLECT_ONLY" == false ]]; then --build-arg "LLAMA_STACK_DIR=/workspace" ) + # Pass UV index configuration for release branches + if [[ -n "${UV_EXTRA_INDEX_URL:-}" ]]; then + echo "Adding UV_EXTRA_INDEX_URL to docker build: $UV_EXTRA_INDEX_URL" + build_cmd+=(--build-arg "UV_EXTRA_INDEX_URL=$UV_EXTRA_INDEX_URL") + fi + if [[ -n "${UV_INDEX_STRATEGY:-}" ]]; then + echo "Adding UV_INDEX_STRATEGY to docker build: $UV_INDEX_STRATEGY" + build_cmd+=(--build-arg "UV_INDEX_STRATEGY=$UV_INDEX_STRATEGY") + fi + if ! "${build_cmd[@]}"; then echo "❌ Failed to build Docker image" exit 1