Skip to content

Implement baseline db logic in litellm-proxy-extras #9885

@mohittalele

Description

@mohittalele

I am trying to upgrade from v1.61.3-stable to v1.65.4-stable

I have my migration job setup using command: ["litellm", "--use_prisma_migrate"]

I get below error : -

litellm_proxy_extras - INFO - prisma db error: 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 "llmapi-v2-postgresql"

5 migrations found in prisma/migrations

The tool correctly found 5 migrations in litellm-proxy-extras folder.

  • Any pointers what is the issue?
  • command: ["litellm", "--use_prisma_migrate"] would do the migration and start the proxy server. How can we do only migration in a job ? similar to https://github.com/BerriAI/litellm/blob/b8597d3de4808fddaa44881f6253220c41c45183/deploy/charts/litellm-helm/templates/migrations-job.yaml
  • What happens in time between k8s job completion and pods with newer version starts receiving traffic with k8s ready state (Time period between k8s migration job is successfully completed and deployments with new litellm version are starting-up) Database has schema of new litellm version, however request for brief period of time would still be served using pods with old litellm version ? Is there some kind of lock being used on DB so that only pods with new litellm versions can write to DB.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions