[Refactor] Dockerfile.non_root: drop UI drift guard approach

Revert the .dockerignore ui/ exclusion and remove the UI Drift Guard
workflow. _experimental/out/ refresh is already handled by the release
runbook; the global .dockerignore change also broke Dockerfile.custom_ui
(explicit COPY ./ui/litellm-dashboard) and the enterprise-colors inline
rebuild path in Dockerfile, Dockerfile.database, and Dockerfile.dev.

Dockerfile.non_root itself is unchanged functionally — still stages the
UI from the checked-in _experimental/out/. Only the companion workflow
and global dockerignore exclusion are dropped.
This commit is contained in:
Yuneng Jiang 2026-04-20 13:47:18 -07:00
parent 4c8cbaf0a2
commit db49885102
No known key found for this signature in database
3 changed files with 1 additions and 52 deletions

View File

@ -52,7 +52,3 @@ build/
*.log
.env
.env.local
# UI source tree is not needed for the non_root image — the built output lives in
# litellm/proxy/_experimental/out/ and is copied directly.
ui/

View File

@ -1,47 +0,0 @@
name: UI Drift Guard
permissions:
contents: read
on:
pull_request:
branches:
- main
- litellm_internal_staging
- "litellm_**"
paths:
- "ui/litellm-dashboard/**"
- "litellm/proxy/_experimental/out/**"
- ".github/workflows/ui-drift-guard.yml"
jobs:
verify-ui-output-fresh:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
with:
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version: "20.20.2"
cache: "npm"
cache-dependency-path: ui/litellm-dashboard/package-lock.json
- name: Build UI
working-directory: ui/litellm-dashboard
run: |
npm ci --no-audit --no-fund
npm run build
- name: Compare against committed _experimental/out
run: |
set -euo pipefail
( cd ui/litellm-dashboard/out && find . -type f -exec sha256sum {} + ) | sort > /tmp/fresh.txt
( cd litellm/proxy/_experimental/out && find . -type f -exec sha256sum {} + ) | sort > /tmp/committed.txt
if ! diff -u /tmp/committed.txt /tmp/fresh.txt > /tmp/drift.txt; then
echo "::error::UI output is stale. Regenerate litellm/proxy/_experimental/out/ from ui/litellm-dashboard/out/."
head -200 /tmp/drift.txt
exit 1
fi
echo "UI output is fresh."

View File

@ -56,7 +56,7 @@ COPY . .
ENV LITELLM_NON_ROOT=true
# Stage the pre-built Admin UI from the checked-in Next.js static export.
# The UI Drift Guard CI workflow keeps _experimental/out/ in sync with ui/litellm-dashboard/ source.
# _experimental/out/ is regenerated as part of the release runbook.
# Restructure extensionless routes (foo.html -> foo/index.html) to match the layout
# proxy_server.py expects, and drop a readiness marker.
RUN mkdir -p /var/lib/litellm/ui /var/lib/litellm/assets && \