From baf61c53b1406f3cf729ab3188ac6e4a34793770 Mon Sep 17 00:00:00 2001 From: mateo-berri <277851410+mateo-berri@users.noreply.github.com> Date: Fri, 23 Oct 2026 07:36:14 -0700 Subject: [PATCH] build(dev-env): make check stops copying .env into the worktree make check ran the whole bootstrap target, whose last step copies the main checkout's .env into any worktree that has none. A QA run that deliberately removed its .env between legs got it back mid-run. bootstrap now splits into bootstrap-deps (venv, Prisma client, dashboard packages) and bootstrap-env (the .env copy), and make check depends only on the deps half. --- Makefile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index dec853515b9..772f19c6bee 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ lint-ruff-strict lint-gate lint-test-quality lint-openapi-docs \ install-dev install-proxy-dev install-test-deps install-hooks \ install-helm-unittest check-circular-imports check-import-safety check check-inner pre-commit \ - lint-install lint-fetch-base bootstrap + lint-install lint-fetch-base bootstrap bootstrap-deps bootstrap-env # Default target help: @@ -88,17 +88,21 @@ install-dev: # Deliberately unqueued: provisioning is I/O bound, so it doesn't need one of the # machine-wide slots the CPU-bound gates below share. -bootstrap: +bootstrap: bootstrap-deps bootstrap-env + @echo "bootstrap: done" + +bootstrap-deps: $(UV) sync --inexact --frozen --extra proxy --group proxy-dev --group e2e-dev $(UV_RUN) python scripts/prisma_generate_if_needed.py cd ui/litellm-dashboard && ../../scripts/with_dashboard_node.sh npm install --no-audit --no-fund + +bootstrap-env: @main_root=$$(git worktree list --porcelain | head -1 | sed 's/^worktree //'); \ if [ "$$main_root" != "$$(git rev-parse --show-toplevel)" ] && [ -f "$$main_root/.env" ] && [ ! -f .env ]; then \ cp "$$main_root/.env" .env && echo "bootstrap: copied .env from $$main_root"; \ else \ echo "bootstrap: .env left untouched"; \ fi - @echo "bootstrap: done" install-proxy-dev: $(UV) sync --frozen --group proxy-dev --extra proxy @@ -271,7 +275,7 @@ lint-dev: lint-format-changed check-circular-imports check-import-safety check: @$(GATE_SLOT_LOCK) $(MAKE) check-inner -check-inner: bootstrap +check-inner: bootstrap-deps ./scripts/pre_commit_lint.sh pre-commit: