Skip to content

Conversation

Ithanil
Copy link
Contributor

@Ithanil Ithanil commented Aug 21, 2025

Fix prisma migrations in non-root Docker image

In

def _create_baseline_migration(schema_path: str) -> bool:
write access is required in /usr/lib/python3.13/site-packages/litellm_proxy_extras/migrations/ if LITELLM_MIGRATION_DIR isn't set to a custom path. Otherwise, prisma migrate would fail with a permission denied error. This happened at least in the non-root Docker image.

This PR fixes the issue for the non-root image (didn't check if others need it too!) by making the migrations directory owned by nobody:nogroup (similar to PRISMA_PATH). The specific permissions for OpenShift Compatibility are imposed afterwards and should remain unaffected.

Relevant issues

#13746

Type

🐛 Bug Fix

Changes

Let /usr/lib/python3.13/site-packages/litellm_proxy_extras/migrations/ (not hard-coded) be owned by nogroup:nobody, just like /usr/lib/python3.13/site-packages/prisma.

Copy link

vercel bot commented Aug 21, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
litellm Ready Ready Preview Comment Aug 21, 2025 7:48am

@krrishdholakia krrishdholakia merged commit 33206d2 into BerriAI:main Aug 23, 2025
6 checks passed
@ishaan-jaff
Copy link
Contributor

Hi @Ithanil great work on this, we're hiring a contractor for DevOps tickets + Helm, are you interested ? If yes, I'd love to chat sharing my cal for your convenience - calendar

@Ithanil
Copy link
Contributor Author

Ithanil commented Aug 24, 2025

@ishaan-jaff responded to your message on LinkedIn

@Ithanil Ithanil deleted the fix_non-root_migrations branch August 24, 2025 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants