Skip to content

test(integration): size restart-mid-burst timeouts from the proxy boot budget - #49376

Merged
yucheng-berri merged 1 commit into
mainfrom
litellm_owned_proxy_restart_timeouts
Oct 31, 2026
Merged

yucheng-berri merged 1 commit into
mainfrom
litellm_owned_proxy_restart_timeouts

Conversation

@yucheng-berri

@yucheng-berri yucheng-berri commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Four integration tests that boot two proxies each had a fixed 180 second timeout, so on a slow runner they timed out while a proxy was still starting or stopping. This sizes their timeout from the same boot budget the harness already uses for proxy readiness, the way the other restart-mid-burst tests do

Details

TLDR

Problem this solves:

  • Four tests flake on slow scheduled integration runs
  • Their 180s cap is shorter than one calibrated proxy boot

How it solves it:

  • Timeout becomes 4 * graceful_stop_seconds() + 120, matching sibling restart tests
  • No product code changes

Relevant issues

The scheduled main runs 41078898295 and 40981180045 each failed these same four tests with Timeout (>180.0s) from pytest-timeout, inside _wait_until_ready or stop_root_process. They passed in the other six runs from 10-29 to 10-31. Those two runs also had the slowest calibration of the eight, with a case budget of 1037s and 1051s against 729s to 990s for the rest

The tests are test_arize_otel_v2_c10_attribute_limit_keeps_tool_prefix, test_s3_v2_hour_proxy_restart_mid_burst_keeps_the_layout_without_duplicates, test_K1_policy_edge_restart_mid_burst_keeps_output_observation_fail_open and test_K2_policy_edge_delay_does_not_delay_concurrent_callers. Each one starts two 2-worker proxies, and the harness itself gives a single 2-worker boot 24 * import_seconds, which is 447s at the import time measured on the VM below

Behavior changes

None. Only the pytest timeout of four integration tests changes, and no product code is touched

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have added meaningful tests
  • The handful of test files covering my change pass locally, e.g. uv run pytest tests/unit/<your_test_file>.py -v. Leave the suites (make test-unit-*, make test-unit) to CI: it finishes in ~15 minutes where a laptop takes an hour or more
  • My PR passes all required CI/CD checks (e.g., lint, schema.d.ts sync check, etc.)
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • Every automated review on my PR's latest commit has finished, and I have addressed or replied to each of its findings before requesting a maintainer review

Delays in PR merge?

If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).

Screenshots / Proof of Fix

E2E exception at fb9f6cc. The diff only changes four pytest.mark.timeout values and one import, so there is no proxy behavior to show before and after. 186 timeout markers under tests/integration on main already derive from graceful_stop_seconds(), and this exact expression is the one test_mid_stream_fallback_continuation.py, test_per_model_rate_limit_fallbacks_lifecycle.py, test_added_backup_deployment_serves_peer_fallbacks.py and test_cache_control_tool_call_marks_owned_proxy.py use for their two-proxy cells

The four tests at the tip pass through the real runner, on a Linux VM with a private Postgres and 4 workers

python tests/integration/run.py extensions --workers 4 \
  tests/integration/observability/test_arize_otel_v2_openinference_modes.py::test_arize_otel_v2_c10_attribute_limit_keeps_tool_prefix \
  tests/integration/observability/test_s3_v2_partition_granularity.py::test_s3_v2_hour_proxy_restart_mid_burst_keeps_the_layout_without_duplicates \
  tests/integration/observability/test_logging_only_scope_chaos.py::test_K1_policy_edge_restart_mid_burst_keeps_output_observation_fail_open \
  tests/integration/observability/test_logging_only_scope_chaos.py::test_K2_policy_edge_delay_does_not_delay_concurrent_callers
4 passed, 10 warnings in 138.27s (0:02:18)
boot-calibration.json {"import_seconds":18.63,"readiness_seconds_2_workers":447.14,"case_timeout_seconds":782.49}

The new cap at the import times CI measured, against the old fixed one

import=17.36s  one 2-worker boot=417s  new timeout=953s   old timeout=180s
import=25.0s   one 2-worker boot=600s  new timeout=1320s  old timeout=180s

Type

✅ Test

@codecov

codecov Bot commented Oct 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@yucheng-berri
yucheng-berri merged commit c8c0248 into main Oct 31, 2026
87 of 88 checks passed
@yucheng-berri
yucheng-berri deleted the litellm_owned_proxy_restart_timeouts branch October 31, 2026 17:17
DeoLeung pushed a commit to aiyou178/litellm that referenced this pull request Nov 5, 2026
…t budget (BerriAI#49376)

Backport note: rc/1.108.0 also needs graceful_stop_seconds imported in test_logging_only_scope_chaos.py, which main already imported

(cherry picked from commit c8c0248)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants