Repository navigation
fix(azure_storage): keep client call ids from sharing one Data Lake file - #44099
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…n Data Lake file Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
|
|
bugbot run |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…ta Lake file names Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
bugbot run |
|
bugbot run |
|
@greptileai please review the current head 1e5587f |
…orkers Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
bugbot run |
|
@greptileai please review the current head 0add818 |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
2 issues from previous reviews remain unresolved.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 0add818. Configure here.

TLDR
Problem this solves:
svc/req-1andsvc_req-1both becamesvc_req-1.jsonHow it solves it:
resp_ids get the/and=rewrite from fix(azure_storage): name Data Lake objects without base64 padding or slashes #43914{id}.jsonname, as before fix(azure_storage): name Data Lake objects without base64 padding or slashes #43914.or..path segment still get the rewriteUser Flow
Before: a team that tags each request with its own
x-litellm-call-idloses logs in Azure Data Lakecallbacks: ["azure_storage"]and points it at an ADLS Gen2 accountx-litellm-call-id: svc/req-1, then again withsvc_req-1svc_req-1.json, and the first request's log is goneAfter: every call id leaves its own log file
callbacks: ["azure_storage"]and points it at an ADLS Gen2 accountx-litellm-call-id: svc/req-1, then again withsvc_req-1svc/req-1.jsonandsvc_req-1.json, each with its own request's logRelevant issues
Fixes a regression from #43914
Screenshots / Proof of Fix
Four live proxies (2 workers each) with real Postgres and Redis, real OpenAI
text-embedding-3-smallandgpt-4.1-nanoResponses calls, and a real ADLS Gen2 account with hierarchical namespace on. One proxy per tree per auth mode: the Entra bearer path and the account-key path, each writing to its own filesystemThe listing reads every object in the filesystem back from ADLS and prints the
idstored inside itBefore (4b1d9bf)
Bearer path
resp_...=idsvc/r12-4311andtracer12-4311have no log:Account-key path
resp_...=idsvc_r12-4312andtracer12-4312have no log because their look-alike ids took the file:After (4b96809)
Bearer path
resp_...=idAccount-key path
resp_...=idtrace=r12-4314, which SharedKey rejects as it did before fix(azure_storage): name Data Lake objects without base64 padding or slashes #43914 (see Caveats):On both trees and both paths each filesystem also holds one
resp_file per Responses call, with the padding dropped as #43914 intendedMutation check: applying the rewrite to every id again, dropping the
resp_condition, or narrowing the segment check to..alone each turns the mapped unit test and the integration test redAudit at 0add818
Merge base 4b1d9bf, head 0add818. Every cell runs the tests/integration harness with a real proxy on two workers, real Postgres and real Redis, with a scripted upstream and a wire-compatible Data Lake sink as the only doubles. The live rows are the four ADLS Gen2 proxies above
svc/req-1vssvc_req-1, embeddings successtest_client_call_ids_differing_only_by_slash_or_underscore_land_in_separate_filesxvs./xvs//xtest_client_call_ids_with_dot_or_empty_segments_keep_their_own_filestest_failed_requests_with_look_alike_call_ids_keep_separate_failure_logstest_cache_hits_with_look_alike_call_ids_keep_separate_logstest_longest_oversized_and_blank_call_ids_each_leave_one_logresp_ids still rewrittentest_responses_ids_with_base64_padding_land_under_adls_safe_namestest_client_call_ids_with_parent_segments_stay_inside_the_log_directorytest_azure_storage_client_ttl.py(11 cells)test_azure_storage_chaos.py(4 cells)The file name cells ran at 0add818, the only commit after 1e5587f, which changed nothing but their worker count. The TTL and chaos cells and the live rows are kept from 1e5587f and 4b96809, which carry the same product code
Type
🐛 Bug Fix
Caveats (if any)
Medium
resp_client id with=, liketrace=7, still fails SharedKeyresp_that differ just by/or=.or..segment, likesvc/./xandsvc_._xa/banda%2Fbboth land ata/b.json, and the later log winsa/bPre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
uv run pytest tests/unit/<your_test_file>.py -v. Leave the suites (make test-unit-*,make test-unit) to CI: it finishes in ~15 minutes where a laptop takes an hour or more@greptileaito re-request a review after pushing changes)Final Attestation
Link to Devin session: https://app.devin.ai/sessions/8580345ed9ed42abbcd536b5745cabc1
Open in Devin Desktop: https://app.devin.ai/desktop/session/8580345ed9ed42abbcd536b5745cabc1?variant=devin
Requested by: @yucheng-berri