Skip to content

refactor(proxy-extras): drop the spend-log api_key special case from the row check remedy - #48636

Merged
kerry-berri merged 2 commits into
mainfrom
litellm_migration_data_checks_generic_remedy
Oct 27, 2026
Merged

kerry-berri merged 2 commits into
mainfrom
litellm_migration_data_checks_generic_remedy

Conversation

@kerry-berri

Copy link
Copy Markdown
Contributor

Summary

Removes the one table-specific remedy from the pre-migration row check (#48493). _remedy in migration_data_checks.py printed a hash UPDATE for a too_long finding on LiteLLM_SpendLogs.api_key; every other finding got a generic sentence for its kind. The special case made the report noisy and put a data rewrite in the code path, so it goes, and a too_long finding now always prints Shorten or hash the long "<table>" (<columns>) values so every row's index entry fits. The row-level fix for pre-v1.99.0 raw keys lives in the docs (litellm-docs troubleshooting section 6) instead

-    if check.kind == "too_long" and check.table == "LiteLLM_SpendLogs" and "api_key" in check.columns:
-        return LEGACY_SPEND_LOG_KEY_REMEDY
     joined: Final = ", ".join(check.columns)
     match check.kind:
         case "too_long":
             return f'Shorten or hash the long "{check.table}" ({joined}) values so every row\'s index entry fits.'

Tests: the unit report test asserts the generic line; the integration migration-job test, which took its hash SQL out of the refusal text, now holds that SQL as a constant and still proves the job refuses on the legacy rows and succeeds after the hash. 28 unit and the 3 touched integration tests pass locally

No behavior change for anything except the text of that one remedy line. Companion docs PR removes the UPDATE from the report examples

Link to Devin session: https://app.devin.ai/sessions/14b2bd229edf4b11a3220d90993f6708
Open in Devin Desktop: https://app.devin.ai/desktop/session/14b2bd229edf4b11a3220d90993f6708?variant=devin
Requested by: @kerry-berri

…the row check remedy

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@codecov

codecov Bot commented Oct 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@kerry-berri
kerry-berri enabled auto-merge (squash) October 27, 2026 20:11
@kerry-berri
kerry-berri disabled auto-merge October 27, 2026 20:37
@kerry-berri
kerry-berri enabled auto-merge (squash) October 27, 2026 20:46
@kerry-berri
kerry-berri merged commit 52562c4 into main Oct 27, 2026
90 of 92 checks passed
@kerry-berri
kerry-berri deleted the litellm_migration_data_checks_generic_remedy branch October 27, 2026 20:53
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.

2 participants