8 views
-/https://github.com/berriai/litellm/issues/33135
GitHub · issue

#33135 run_migration.py deletes root migrations/ folder (Dockerfile, run.py) via temp-dir path collision

  • State: open
  • Author: @devin-ai-integration[bot]

## Summary

`ci_cd/run_migration.py` builds its temporary migrations directory at `schema_path.parent / "migrations"`, which resolves to the repo root `migrations/` folder. That folder already exists in the repo and holds `migrations/Dockerfile` and `migrations/run.py`. The script `rmtree`s that path both before copying the real migrations in and again in its `finally` cleanup, so running the runbook deletes those two tracked files as a side effect

## Where

`ci_cd/run_migration.py`

```python root_dir = Path(__file__).parent.parent # line 218 -> repo root schema_path = root_dir / "schema.prisma" # line 232 temp_migrations_dir = schema_path.parent / "migrations" # line 239 -> repo_root/migrations (COLLISION) if temp_migrations_dir.exists(): shutil.rmtree(temp_migrations_dir) # line 244 -> deletes repo_root/migrations shutil.copytree(migrations_dir, temp_migrations_dir) # line 245 ... finally: if temp_migrations_dir.exists(): shutil.rmtree(temp_migrations_dir) # line 311 -> deletes it again ```

The real migrations live under `litellm-proxy-extras/litellm_proxy_extras/migrations` (`migrations_dir`), but prisma needs the temp copy n…

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (2 events)
#0 of 0 · 31d18h50m51s ago — entered · #import:https:::github.com:berriai:litellm post #2013
The right-hand change spans configuration modeling, registration, persistence, and billing behavior, requiring compatibility analysis and broad regression coverage; the left is a localized filesystem-safety fix with comparatively limited scope.
#0 of 0 · 31d18h46m50s ago — current · #import:https:::github.com:berriai:litellm post #2083
Issue 32973 is harder because it requires coordinated provider and endpoint translation changes across multiple request paths, model-version conditions, and compatibility cases, with substantial regression-test coverage. Issue 33135 is comparatively localized to temporary-path handling and cleanup in one migration script.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search