From 048d87a47623b57e56e664e90c9301bd02990a6f Mon Sep 17 00:00:00 2001 From: Yuneng Jiang Date: Mon, 9 Nov 2026 22:47:46 -0800 Subject: [PATCH] ci(integration): hand the uv cache to the test process The lane exports UV_OFFLINE for itself and then starts pytest through env -i, which drops both that flag and the UV_CACHE_DIR the uv setup action points at its restored cache. The docs gate test builds the base tree with uv, so it looked in an empty default cache and then tried PyPI, which the lane blocks. Pass both variables to the test process, the way rc/1.109.0 already does, and drop the UV_OFFLINE line from the test that could not help without the cache. --- .circleci/scripts/run_integration.sh | 3 +-- tests/integration/configuration/test_openapi_docs_gate.py | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.circleci/scripts/run_integration.sh b/.circleci/scripts/run_integration.sh index fb91bcce77f..9f069f0a200 100644 --- a/.circleci/scripts/run_integration.sh +++ b/.circleci/scripts/run_integration.sh @@ -128,8 +128,6 @@ fi sudo iptables -L integration_only -n -v -x > "$results/egress-guard.txt" awk '$3 == "REJECT" && $1 > 0 { rejected=1 } END { exit !rejected }' "$results/egress-guard.txt" -export UV_OFFLINE=true - if [ "$mode" = parity ]; then export INTEGRATION_WORKERS=1 else @@ -257,6 +255,7 @@ elif [ "${INTEGRATION_COVERAGE:-0}" = 1 ]; then fi env -i PATH="$PATH" HOME="$HOME" PYTHONPATH="$PYTHONPATH" \ + UV_OFFLINE=true UV_CACHE_DIR="$(uv cache dir)" \ INTEGRATION_RUN_ID="$integration_identity" \ DATABASE_URL="$DATABASE_URL" \ "${shared_services[@]}" "${worker_coverage[@]}" \ diff --git a/tests/integration/configuration/test_openapi_docs_gate.py b/tests/integration/configuration/test_openapi_docs_gate.py index 1afa450c67a..eefa663cb10 100644 --- a/tests/integration/configuration/test_openapi_docs_gate.py +++ b/tests/integration/configuration/test_openapi_docs_gate.py @@ -1,11 +1,9 @@ from typing import Final import openapi_docs_gate as gate -import pytest -def test_base_counts_imports_native_extension_from_detached_worktree(monkeypatch: pytest.MonkeyPatch) -> None: - monkeypatch.setenv("UV_OFFLINE", "1") +def test_base_counts_imports_native_extension_from_detached_worktree() -> None: expected_counts: Final = dict(gate.count_by_rule(gate.head_violations())) assert expected_counts assert dict(gate.base_counts("HEAD")) == expected_counts