Repository navigation
fix(proxy-extras): backport #44203 to rc/1.105.0 - #44220
Merged
Merged
Conversation
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
|
|
Contributor
|
1 of 5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TLDR
Problem this solves:
sslcertas a client certHow it solves it:
_strip_prisma_query_paramsturns Prismasslcert+sslaccept=strictintosslrootcert+sslmode=verify-fullUser Flow
Before: an operator on the 1.105 rc with
DATABASE_SSLMODE=verify-fullandDATABASE_SSLROOTCERTcannot roll out the rc imagelitellm-migrationshook job starts with the discreteDATABASE_*varsprisma migrate deploylogsNo pending migrations to applycertificate present, but not private key file ".../.postgresql/postgresql.key"andMigration job failed after retriesOutOfSyncretrying the hook and the gateway never moves to the rc imageAfter: the same rollout completes
prisma migrate deploylogsNo pending migrations to applyRequest-log indexes are all in placeandMigration job completed successfullySyncedand the gateway rolls to the rc imageAffected release
Regression since #43948, which is on rc/1.105.0 (c66c828); fix merged to main in #44203
Linear ticket
Resolves LIT-9169
Backport checklist
git diff | md5sum)_strip_prisma_query_params,build_request_log_indexesand the test module all exist on rc/1.105.0 in the same shape as mainpyproject.tomlstays at 1.105.0 andlitellm-proxy-extrasat 0.4.104; no version bumptests/unit/litellm_proxy_extras/test_litellm_proxy_extras_utils.py96 passed in the worktree at bd55bf6 andscripts/ruff_strict_gate.py --base origin/rc/1.105.0reports OK; the whole-fileruff checkandruff format --checkhits in both files are pre-existing on rc/1.105.0 and on main's tip too, so they are left alone rather than reformatting 300+ unrelated linesScreenshots / Proof of Fix
The pick is byte-identical to main, so the proof is the one captured on #44203 at 80b9b19: read-only psycopg connect to a production Aurora writer over verify-full with IAM token auth (Before fails with the client-key error, After connects over TLSv1.3), a local TLS Postgres migration job (Before
Migration job failed after retries, After builds both indexes and completes), and an 11-cell deployment-mode matrix as the full migration job against a throwaway RDS instance (password and IAM auth over verify-full, rootcert only, require, no TLS vars, pinned libpq URL, DIRECT_URL, Prisma-only params): every cell carrying a root cert fails Before and passes After, the four no-root-cert cells are identical Before and After. See the Screenshots / Proof of Fix section of #44203Type
🐛 Bug Fix
Caveats (if any)
Low
sslaccept=accept_invalid_certs(or nosslaccept) drops the CA so libpq verifies nothing, matching Prisma;sslaccept=strictalways lands onsslmode=verify-fullLink to Devin session: https://app.devin.ai/sessions/31df1e5228c14f0ca299306f8d60b3af
Open in Devin Desktop: https://app.devin.ai/desktop/session/31df1e5228c14f0ca299306f8d60b3af?variant=devin
Requested by: @yassin-berriai