-
-
Notifications
You must be signed in to change notification settings - Fork 5k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
What happened?
Hello,
I noticed that at least with version 1.75.5 and 1.74.15 the non_root image cannot be used for database migrations any longer. When running this as part of of a Helm chart, rolled out via ArgoCD, I get the following permission error:
I ran almost the same yaml file as provided by LiteLLM: https://github.com/BerriAI/litellm/blob/main/deploy/charts/litellm-helm/templates/migrations-job.yaml
(had to make adjustments, as I had to add another container for Cloud SQL Proxy, as I'm running on GCP)
Interestingly, it should not try to run the migrations at all, as I'm running against a DB that is already established (or at least not all of them)
Relevant log output
2025-08-19 09:04:22,757 - litellm_proxy_extras - INFO - Running prisma migrate deploy
2025-08-19 09:04:25,444 - litellm_proxy_extras - INFO - prisma db error: prisma:warn Prisma doesn't know which engines to download for the Linux distro "wolfi". Falling back to Prisma engines built "debian".
Please report your experience by creating an issue at https://github.com/prisma/prisma/issues so we can add your distro to the list of known supported distros.
prisma:warn Prisma doesn't know which engines to download for the Linux distro "wolfi". Falling back to Prisma engines built "debian".
Please report your experience by creating an issue at https://github.com/prisma/prisma/issues so we can add your distro to the list of known supported distros.
Error: P3005
The database schema is not empty. Read more about how to baseline an existing production database: https://pris.ly/d/migrate-baseline
, e: Prisma schema loaded from schema.prisma
Datasource "client": PostgreSQL database "litellm", schema "public" at "localhost"
34 migrations found in prisma/migrations
2025-08-19 09:04:25,444 - litellm_proxy_extras - INFO - Database schema is not empty, creating baseline migration
Traceback (most recent call last):
File "/usr/lib/python3.13/site-packages/litellm_proxy_extras/utils.py", line 257, in setup_database
result = subprocess.run(
["prisma", "migrate", "deploy"],
...<3 lines>...
text=True,
)
File "/usr/lib/python3.13/subprocess.py", line 577, in run
raise CalledProcessError(retcode, process.args,
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['prisma', 'migrate', 'deploy']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/litellm/proxy/prisma_migration.py", line 16, in <module>
run_server(["--skip_server_startup"], standalone_mode=False)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/usr/lib/python3.13/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/app/litellm/proxy/proxy_cli.py", line 780, in run_server
PrismaManager.setup_database(use_migrate=not use_prisma_db_push)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/litellm/proxy/db/prisma_client.py", line 157, in setup_database
return ProxyExtrasDBManager.setup_database(use_migrate=use_migrate)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/site-packages/litellm_proxy_extras/utils.py", line 304, in setup_database
ProxyExtrasDBManager._create_baseline_migration(schema_path)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/lib/python3.13/site-packages/litellm_proxy_extras/utils.py", line 57, in _create_baseline_migration
init_dir.mkdir(parents=True, exist_ok=True)
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/pathlib/_local.py", line 722, in mkdir
os.mkdir(self, mode)
~~~~~~~~^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/usr/lib/python3.13/site-packages/litellm_proxy_extras/migrations/0_init'
Are you a ML Ops Team?
No
What LiteLLM version are you on ?
v1.75.5
Twitter / LinkedIn details
No response
ronenl1, unique-jakub, Ithanil, michaelcpd, andrzej-pomirski-yohana and 6 more
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working