mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-28 00:00:38 +00:00
* ci: start fewer jobs per pull request A typical backend pull request started about 104 runners, and many of them only checked out the repo to find their files had not changed. The unit plan job now classifies the change once and skips ui-unit, dashboard-build, redis-compat, python-310 and helm at the job level when their inputs did not change, and the whole backend set on docs-only and UI-only pull requests. unit passed still accepts a skip only for jobs the plan listed. The lint plan does the same for the ui lint job. Smoke runs its six core interpreters and both all-extras environments in one job, installing the venvs in parallel and then running the existing checks in parallel inside the loopback namespace. dashboard-build moves into the unit workflow so the plan can gate it on the dashboard sources and the Dockerfile, its only inputs. ci-coverage, semgrep and the secret scans move into code-quality, the three OpenAI SDK versions run one after another in one job, and the docs job's checks run in lint-runtime. lint-runtime now runs on release-branch pull requests too, where it skips import safety, the OpenAPI gate and the code-quality checks and runs only the docs checks the docs job ran there. * ci: give the smoke job its own uv cache and check CI coverage before the docs checkout The combined smoke job restored the old py3.15 job's uv cache, an exact key hit that main would never overwrite, so Python 3.14 built grpcio-tools from source on every run (4m41s). It now uses its own cache suffix, and each interpreter starts its checks as soon as its own install finishes. The coverage assertions in code-quality saw the litellm-docs checkout's Dockerfile as an unbuilt image, so they now run before that checkout. * ci(smoke): keep 3.14 and 3.15 on their own cached runners Those two interpreters build grpcio-tools and other packages from source when their uv cache misses. Inside the combined job, with an empty cache and six other installs on four CPUs, 3.14 took 13.9 minutes and 3.15 ran past the 20-minute timeout. They now run as py3.14 and py3.15 again, restoring the same per-version caches as before, and core-checks keeps 3.10 to 3.13 and both all-extras environments. * ci(ui): run the dashboard unit tests on 3 shards instead of 6 * ci(ui): run the dashboard unit tests on 4 shards so the full suite stays under 10 minutes
79 lines
3.3 KiB
Bash
Executable file
79 lines
3.3 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
set -uo pipefail
|
|
|
|
category="${1:?usage: classify_changes.sh <backend|client|ui|cost-map-only|windows-release|redis-compat|python-310|helm|dashboard-build>}"
|
|
|
|
has_client=false
|
|
has_backend=false
|
|
has_ci=false
|
|
has_cost_map=false
|
|
has_windows_release=false
|
|
has_redis_compat=false
|
|
has_python_310=false
|
|
has_helm=false
|
|
has_dashboard_build=false
|
|
outside_cost_map_set=false
|
|
while IFS= read -r file || [ -n "$file" ]; do
|
|
[ -n "$file" ] || continue
|
|
case "$file" in
|
|
litellm/_redis.py | litellm/_redis_credential_provider.py | litellm/caching/redis_cache.py | litellm/caching/evicted_client_closer.py | tests/unit/test_redis.py | tests/integration/sdk/test_redis_cluster_iam_auth.py | tests/unit/caching/test_redis_connection_pool.py | tests/unit/caching/test_redis_cluster_cache.py | tests/unit/caching/test_evicted_client_closer.py | .github/workflows/test-unit.yml | .github/actions/detect-changes/* | .github/scripts/detect_changes.sh | .github/scripts/ci/classify_changes.sh | tests/integration/run.py | pyproject.toml | uv.lock)
|
|
has_redis_compat=true ;;
|
|
esac
|
|
case "$file" in
|
|
litellm/proxy/db/prisma_engine.py | litellm/proxy/db/prisma_client.py | tests/unit/proxy/db/test_prisma_engine.py | tests/unit/proxy/db/test_prisma_planned_engine_restart.py | tests/unit/proxy/db/conftest.py | tests/_process_helpers.py | litellm/integrations/custom_logger_v2/*.py | tests/unit/integrations/custom_logger_v2/test_dispatcher.py | .github/workflows/test-unit.yml | .github/actions/detect-changes/* | .github/scripts/detect_changes.sh | .github/scripts/ci/classify_changes.sh | pyproject.toml | uv.lock)
|
|
has_python_310=true ;;
|
|
esac
|
|
case "$file" in
|
|
litellm/rust/* | litellm/rust_bridge/* | pyproject.toml | uv.lock | tests/windows_tests/* | .github/scripts/ci/* | .github/actions/*)
|
|
has_windows_release=true ;;
|
|
esac
|
|
case "$file" in
|
|
litellm/deploy/helm/*) has_helm=true ;;
|
|
litellm/ui/litellm-dashboard/* | litellm/deploy/docker/Dockerfile | litellm/deploy/docker/Dockerfile.dockerignore) has_dashboard_build=true ;;
|
|
esac
|
|
case "$file" in
|
|
litellm/ui/* | tests/e2e/ui/*) has_client=true ;;
|
|
*.md | *.mdx) : ;;
|
|
.github/*) has_ci=true; has_backend=true ;;
|
|
*) has_backend=true ;;
|
|
esac
|
|
case "$file" in
|
|
model_prices_and_context_window.json | litellm/model_prices_and_context_window_backup.json)
|
|
has_cost_map=true ;;
|
|
tests/unit/proxy/*) : ;;
|
|
*) outside_cost_map_set=true ;;
|
|
esac
|
|
done
|
|
|
|
case "$category" in
|
|
cost-map-only)
|
|
{ [ "$has_cost_map" = true ] && [ "$outside_cost_map_set" = false ]; } && echo run || echo skip
|
|
;;
|
|
windows-release)
|
|
[ "$has_windows_release" = true ] && echo run || echo skip
|
|
;;
|
|
redis-compat)
|
|
[ "$has_redis_compat" = true ] && echo run || echo skip
|
|
;;
|
|
python-310)
|
|
[ "$has_python_310" = true ] && echo run || echo skip
|
|
;;
|
|
backend)
|
|
[ "$has_backend" = true ] && echo run || echo skip
|
|
;;
|
|
client)
|
|
{ [ "$has_client" = true ] || [ "$has_backend" = true ]; } && echo run || echo skip
|
|
;;
|
|
ui)
|
|
{ [ "$has_client" = true ] || [ "$has_ci" = true ]; } && echo run || echo skip
|
|
;;
|
|
helm)
|
|
{ [ "$has_helm" = true ] || [ "$has_ci" = true ]; } && echo run || echo skip
|
|
;;
|
|
dashboard-build)
|
|
{ [ "$has_dashboard_build" = true ] || [ "$has_ci" = true ]; } && echo run || echo skip
|
|
;;
|
|
*)
|
|
echo run
|
|
;;
|
|
esac
|