litellm/.github/workflows
Yassin Kortam 2d0823abf7 feat(proxy): elect one owner per auxiliary DB job and add a worker role
Every proxy process registers the same scheduler, and it registers it once per
uvicorn worker process rather than once per pod, so a job with a shared side
effect runs replicas times processes. The jobs that did elect an owner each
hand-rolled it, and the dialects disagree on the one case that matters:
acquire_lock reports contention and an unreachable Redis identically, so the
PTU rollup ran unguarded while key rotation, spend log cleanup and UI session
cleanup skipped, meaning a Redis outage silently stopped those three
everywhere at once.

Adds run_as_single_owner and claim_once_per_window, which name that decision
as WhenLockUnavailable and carry the two lease shapes the proxy actually uses:
a mutex held for one run, and a done-marker sized to a reporting window. The
lease is now renewed while the body runs, so the TTL is a failover deadline
rather than a run budget. On a live proxy that is the difference between a
spend log cleanup losing its 60s lock partway through a multi-minute sweep,
which a challenger could take at 75s, 120s and 180s, and holding it to
completion.

LITELLM_JOB_ROLE=serving registers none of these jobs, so an operator can run
them on a dedicated worker deployment instead of on every replica taking
traffic. A serving pod keeps the jobs that drain its own in-memory queues and
refresh its own model registry, so it still writes spend. The default is
unchanged, and an unrecognised value falls back to it with a warning.

Both Helm charts gain an opt-in worker Deployment, off by default and pinned
to one process. Live-Redis integration tests cover election, failover,
renewal, rolling restart and once-per-window claims.

Also fixes the ownership gauge, which only ever fired on a reentrant
re-acquisition and so was driven to 0 by every release and never back up.
2026-08-12 09:51:02 -07:00
..
_test-unit-base.yml fix(ci): drop unsupported arithmetic from the job timeout expression 2026-08-10 17:13:16 +00:00
auto_update_price_and_context_window.yml ci: publish a generated JSON schema for model_prices_and_context_window.json 2026-07-27 12:11:17 -07:00
auto_update_price_and_context_window_file.py only add/update vercel ai gateway models 2025-08-04 17:22:36 -07:00
check-schema-sync.yml ci: give the remaining pull_request workflows a concurrency group 2026-08-08 03:25:38 +00:00
check-ui-api-types.yml ci: cache Prisma CLI and engine binaries, split test timeout from setup 2026-08-10 16:10:54 +00:00
check_duplicate_issues.yml [Infra] Flip remaining CI jobs to Python 3.12 2026-04-22 21:26:19 -07:00
ci-coverage.yml ci: fail the build when a test file or Dockerfile is invoked by no job (#35991) 2026-08-05 14:52:48 -07:00
close_low_quality_prs.yml feat(agent-shin): automated PR/issue triage, low-quality auto-close, and review-gate label lifecycle (#30433) 2026-06-17 20:42:27 -07:00
codeql.yml ci(zizmor): gate PRs on medium+ findings and clear existing ones (#30797) 2026-06-18 18:26:03 -07:00
codspeed.yml ci: only run CodSpeed on backend changes (#34345) 2026-07-23 16:58:55 -07:00
conventional-commits.yml ci: give the remaining pull_request workflows a concurrency group 2026-08-08 03:25:38 +00:00
create-release-branch.yml ci(release): create stable/X.Y.x line branch on X.Y.0 tags (#29457) 2026-06-01 15:56:34 -07:00
create-release.yml fix(release): make Create Release reliable for stable maintenance cuts (#31986) 2026-07-02 16:05:11 -07:00
create_daily_oss_agent_shin_branch.yml fix(ci): make every remaining CI checkout shallow (#35997) 2026-08-05 14:32:17 -07:00
create_daily_staging_branch.yml fix(ci): make every remaining CI checkout shallow (#35997) 2026-08-05 14:32:17 -07:00
guard-fork-dependencies.yml ci: give the remaining pull_request workflows a concurrency group 2026-08-08 03:25:38 +00:00
guard-main-branch.yml chore(ci): retire daily OSS branches in favor of litellm_internal_staging 2026-07-20 11:38:52 -07:00
helm_unit_test.yml ci: give the remaining pull_request workflows a concurrency group 2026-08-08 03:25:38 +00:00
image-scan.yml test(docker): gate the componentized gateway and backend images on an arbitrary-uid offline boot (#36136) 2026-08-07 09:57:37 -07:00
issue-keyword-labeler.yml chore: fixes 2026-04-05 01:30:57 -07:00
label-component.yml chore: fixes 2026-04-05 01:30:57 -07:00
mutation-test.yml ci: cache Prisma CLI and engine binaries, split test timeout from setup 2026-08-10 16:10:54 +00:00
osv-scan.yml fix(ci): point OSS contributor workflows to litellm_oss_staging (#31270) 2026-06-24 21:07:59 -07:00
publish-basedpyright-base-counts.yml ci: cache Prisma CLI and engine binaries, split test timeout from setup 2026-08-10 16:10:54 +00:00
run_llm_translation_tests.py build: migrate packaging, CI, and Docker from Poetry to uv (#25007) 2026-04-09 11:46:23 -07:00
scorecard.yml chore: fixes 2026-04-05 01:30:57 -07:00
stale.yml chore: fixes 2026-04-05 01:30:57 -07:00
sync-schema.yml chore: fixes 2026-04-05 01:30:57 -07:00
test-code-quality.yml fix(ci): drop unsupported arithmetic from the job timeout expression 2026-08-10 17:13:16 +00:00
test-integration-redis.yml feat(proxy): elect one owner per auxiliary DB job and add a worker role 2026-08-12 09:51:02 -07:00
test-linting.yml ci: retry transient network fetch failures in lint workflow 2026-08-11 11:34:26 -07:00
test-litellm-ui-build.yml ci: give the remaining pull_request workflows a concurrency group 2026-08-08 03:25:38 +00:00
test-litellm-ui-lint.yml ci: give the remaining pull_request workflows a concurrency group 2026-08-08 03:25:38 +00:00
test-litellm-ui-unit.yml refactor(ui): make illegal DataTable prop combinations unrepresentable 2026-08-10 15:19:39 -07:00
test-mcp.yml ci: give the remaining pull_request workflows a concurrency group 2026-08-08 03:25:38 +00:00
test-model-map.yaml ci: give the remaining pull_request workflows a concurrency group 2026-08-08 03:25:38 +00:00
test-rust.yml feat(rust): port BaseAWSLLM auth (credential resolution + SigV4) to litellm-core as a base provider (#33888) 2026-07-18 19:12:00 -07:00
test-semgrep.yml fix(ci): retry setup-uv installs to survive transient manifest fetch failures 2026-07-14 14:41:36 -07:00
test-terraform-provider.yml ci: cache Prisma CLI and engine binaries, split test timeout from setup 2026-08-10 16:10:54 +00:00
test-unit-core-utils.yml ci: run unit tests on pushes to main and litellm_internal_staging 2026-08-01 11:58:49 -07:00
test-unit-documentation.yml ci: cache Prisma CLI and engine binaries, split test timeout from setup 2026-08-10 16:10:54 +00:00
test-unit-enterprise-routing.yml ci: run unit tests on pushes to main and litellm_internal_staging 2026-08-01 11:58:49 -07:00
test-unit-integrations.yml ci: run unit tests on pushes to main and litellm_internal_staging 2026-08-01 11:58:49 -07:00
test-unit-llm-providers.yml ci: run unit tests on pushes to main and litellm_internal_staging 2026-08-01 11:58:49 -07:00
test-unit-misc.yml ci: fail the build when a test file or Dockerfile is invoked by no job (#35991) 2026-08-05 14:52:48 -07:00
test-unit-proxy-auth.yml ci: run unit tests on pushes to main and litellm_internal_staging 2026-08-01 11:58:49 -07:00
test-unit-proxy-db.yml ci: cache Prisma CLI and engine binaries, split test timeout from setup 2026-08-10 16:10:54 +00:00
test-unit-proxy-endpoints.yml fix(ci): drop unsupported arithmetic from the job timeout expression 2026-08-10 17:13:16 +00:00
test-unit-proxy-infra.yml ci: fail the build when a test file or Dockerfile is invoked by no job (#35991) 2026-08-05 14:52:48 -07:00
test-unit-proxy-legacy.yml ci: cache Prisma CLI and engine binaries, split test timeout from setup 2026-08-10 16:10:54 +00:00
test-unit-responses-caching-types.yml ci: run unit tests on pushes to main and litellm_internal_staging 2026-08-01 11:58:49 -07:00
triage_issue_with_llm.yml feat(agent-shin): automated PR/issue triage, low-quality auto-close, and review-gate label lifecycle (#30433) 2026-06-17 20:42:27 -07:00
triage_reconsider.yml feat(agent-shin): automated PR/issue triage, low-quality auto-close, and review-gate label lifecycle (#30433) 2026-06-17 20:42:27 -07:00
triage_rollout_heads_up.yml feat(agent-shin): automated PR/issue triage, low-quality auto-close, and review-gate label lifecycle (#30433) 2026-06-17 20:42:27 -07:00
weekly_load_anomaly.yml ci: cache Prisma CLI and engine binaries, split test timeout from setup 2026-08-10 16:10:54 +00:00
zizmor.yml ci: run zizmor and proxy-db unit tests on PRs targeting litellm_ branches 2026-07-16 11:44:35 -07:00