From dbf76fc29b0aeea5ba040df9bc98031d95caa7c5 Mon Sep 17 00:00:00 2001 From: Yuneng Jiang Date: Sat, 28 Mar 2026 15:56:01 -0700 Subject: [PATCH] [Fix] Install pytest-timeout for per-test timeouts and default LITELLM_LOG to DEBUG Empty LITELLM_LOG causes `getattr(logging, '')` to fail at import time. Default to 'DEBUG' (matching _logging.py default) when no level is specified. Also install pytest-timeout when per-test-timeout is enabled. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/_test-integration-base.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/_test-integration-base.yml b/.github/workflows/_test-integration-base.yml index f3965da6975..b2b6588325b 100644 --- a/.github/workflows/_test-integration-base.yml +++ b/.github/workflows/_test-integration-base.yml @@ -148,11 +148,16 @@ jobs: ${{ runner.os }}-poetry-integration- - name: Install dependencies + env: + PER_TEST_TIMEOUT: ${{ inputs.per-test-timeout }} run: | poetry config virtualenvs.in-project true poetry install --with dev,proxy-dev --extras "proxy semantic-router" poetry run pip install google-genai==1.22.0 \ google-cloud-aiplatform==1.115.0 fastapi-offline==1.7.3 python-multipart==0.0.22 openapi-core==0.23.0 + if [ "${PER_TEST_TIMEOUT}" != "0" ]; then + poetry run pip install pytest-timeout==2.2.0 + fi - name: Setup litellm-enterprise run: | @@ -172,7 +177,7 @@ jobs: WORKERS: ${{ inputs.workers }} RERUNS: ${{ inputs.reruns }} PER_TEST_TIMEOUT: ${{ inputs.per-test-timeout }} - LITELLM_LOG: ${{ inputs.litellm-log-level }} + LITELLM_LOG: ${{ inputs.litellm-log-level || 'DEBUG' }} # Provider API keys — populated only if the GHA environment contains them. # Empty vars are harmless; tests that need a missing key will fail visibly. OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}