chore(release): backport #33592 to stable/1.90.x and cut 1.90.5 - #33610
Conversation
#33592) * fix(docker): restore litellm-proxy-extras source dir in runtime images #30243 narrowed the runtime stage to an allowlist COPY, which dropped /app/litellm-proxy-extras from the published images. Downstream migration jobs point prisma migrate deploy at that path; with the schema gone (or a schema with no adjacent migrations dir, where prisma exits 0 without applying anything) those jobs went green while never migrating the database. Restore the folder in all three runtime stages and assert in image-scan that the schema and a non-empty migrations dir ship at the source path * chore(ci): drop image-scan migration-assets assertion (cherry picked from commit 111d447)
Greptile SummaryThis backport restores
Confidence Score: 5/5Safe to merge — a single-line addition per Dockerfile that restores a directory dropped by a prior allowlist narrowing; the builder stage provably produces the path, permissions are covered by the existing recursive chown, and the fix is verified end-to-end against all three images. The change is minimal and surgical: one COPY instruction added to each of three Dockerfiles, a version bump in two places in pyproject.toml, and a lock refresh. Every claim in the PR description is backed by concrete docker-run output. The builder stage already copies the full source tree, guaranteeing the source path exists. The non_root image's existing /app chown sweep covers the new directory before the uid drop. No Python, schema, or configuration changes are included. No files require special attention.
|
| Filename | Overview |
|---|---|
| Dockerfile | Adds COPY --from=builder /app/litellm-proxy-extras /app/litellm-proxy-extras to the runtime stage; builder already produces this path via COPY . ., so the source is always present. |
| docker/Dockerfile.database | Identical single-line addition of the litellm-proxy-extras COPY to its runtime stage, mirroring the main Dockerfile fix. |
| docker/Dockerfile.non_root | Adds the litellm-proxy-extras COPY before the /app recursive chown, so the new directory is correctly owned by nobody:nogroup before the privilege drop to uid 65534. |
| pyproject.toml | Version bumped from 1.90.4 to 1.90.5 in both the [project] section and [tool.commitizen] section — consistent. |
| uv.lock | Lock file refreshed: litellm version updated to 1.90.5 and exclude-newer timestamp advanced to 2026-07-13. |
Reviews (1): Last reviewed commit: "chore: refresh uv.lock for 1.90.5" | Re-trigger Greptile
Relevant issues
Backports #33592 onto
stable/1.90.xand cuts1.90.5. #30243 narrowed the runtime stage of the three Dockerfiles to an allowlist COPY, which dropped/app/litellm-proxy-extrasfrom published images startingv1.90.0. Deployments that run their own pre-deploy migration job (modeled on the helm migration job: pull the same image the app runs, thenprisma migrate deployagainst the schema and migrations shipped at that path) broke on upgrade to 1.90.x, and the breakage is silent becauseprisma migrate deployexits 0 without applying anything when the schema it is pointed at has no adjacent migrations directory. This restores the folder in the runtime stage of all three Dockerfiles, matching what images up tov1.89.xcontained (about 6 MB per image)Linear ticket
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
@greptileaito re-request a review after pushing changes)What is included
111d447e1b), cherry-picked with-x1.90.4->1.90.5uv.lockfor1.90.5Adaptation notes
None. The pick is patch-identical (
git patch-id --stablematches the staging squash) and applied without conflicts. The change touches no Python, so the line's Black 88-columnformat-checkscope is unaffectedKnown noise on this line
The pick adds or modifies no Python or test files, so there is no targeted pytest delta to judge. The claim was verified directly on images built from this branch (below)
Screenshots / Proof of Fix
Broken behavior, captured on the published
ghcr.io/berriai/litellm:v1.90.4image (the tip of this line before the pick). The folder is gone, and pointing prisma at the/app/schema.prismathat does still ship exits 0 while applying nothing, so a migration job reports success against an unmigrated database:The single table left behind is prisma's own
_prisma_migrationsbookkeeping tableFixed behavior, on images built locally from this branch from each of the three Dockerfiles, each run against a fresh database:
The same flow passes on the
docker/Dockerfile.databasebuild (schema present and matching, 127 migrations applied to a fresh database, 66 tables, exit 0) and on thedocker/Dockerfile.non_rootbuild running as its default uid 65534 (schema present and matching, migrations dir readable, 127 migrations applied, 66 tables, exit 0). 127 is the correct count here: it is this line's own migrations catalog (staging ships 135), which is exactly what a v1.90.5 image should carryAn adversarial verification pass over the pick survived on all three sub-claims: each builder stage provably produces the directory before the new COPY references it (so it cannot land empty), the runtime contract ships it in all three images, and nothing on this line depends on the directory's absence (the non_root recursive chown covers the new folder before the privilege drop to uid 65534, and
.dockerignorestrips nothing from it). The pass also confirmed the restored folder is read only by external pre-deploy migration jobs: every in-repo migration path resolves schema and migrations from the installedlitellm_proxy_extraspackage in site-packages, and the helm migration job uses the separatelitellm-migrationsimage that always carried the folder. That matches the upstream PR's framing and means the change is inert for in-repo code paths; the risk is presence-onlyType
🐛 Bug Fix
Changes
Cherry-pick of #33592 onto
stable/1.90.x, plus the1.90.5version bump and lock refresh. OneCOPY --from=builder /app/litellm-proxy-extras /app/litellm-proxy-extrasline in the runtime stage of each ofDockerfile,docker/Dockerfile.database, anddocker/Dockerfile.non_root. No schema, dependency, or configuration changesQA runbook
git fetch origin && git checkout litellm_backport_1_90_x_bp_proxy_extras_0716docker build -t qa-190x:main -f Dockerfile .docker run --rm --entrypoint sh qa-190x:main -c 'ls /app/litellm-proxy-extras/litellm_proxy_extras/migrations | head'and confirm the migrations directory is present and non-emptydocker run --rm -e DATABASE_URL="postgresql://<user>:<pass>@host.docker.internal:<port>/<fresh-db>" --entrypoint sh qa-190x:main -c 'prisma migrate deploy --schema /app/litellm-proxy-extras/litellm_proxy_extras/schema.prisma'and confirm 127 migrations apply with exit 0Final Attestation