Commit a1185d2
[Feature] Fix Model Serving User Credentials threading scenarios (#907)
## What changes are proposed in this pull request?
Previously in order to get invokers tokens, we always looked at the
current thread's thread data. however this is not always guaranteed as
langchain is internally multi threading calls. Therefore this PR only
looks at the main thread's data to get the credentials. The Main Thread
is guaranteed to have invokers credentials as we set them initially in
the scoring server.
## How is this tested?
Added unit tests
---------
Signed-off-by: aravind-segu <[email protected]>
Co-authored-by: Renaud Hartert <[email protected]>1 parent 8de985d commit a1185d2
File tree
3 files changed
+23
-2
lines changed- databricks/sdk
- tests
3 files changed
+23
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
853 | 853 | | |
854 | 854 | | |
855 | 855 | | |
856 | | - | |
857 | | - | |
| 856 | + | |
| 857 | + | |
858 | 858 | | |
859 | 859 | | |
860 | 860 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
201 | 221 | | |
202 | 222 | | |
203 | 223 | | |
| |||
0 commit comments