Commit 7ab7788
committed
refactor(BA-5713): address slice E review feedback
- repositories/scheduler/types/session.py: rename
PendingSessionData.access_key -> main_access_key (and drop the
outdated resolved-main_access_key comment).
- repositories/scheduler/db_source/db_source.py: update the
PendingSessionData call site to main_access_key + owner_id keyword
names matching the dataclass.
- scheduler/drf.py: use existing_sess.user_uuid (SessionRow stores the
owner UUID there, not owner_id).
- scheduler/predicates.py: guard every _resolve_main_access_key
consumer (check_concurrency, check_keypair_resource_limit,
check_pending_session_count_limit, check_pending_session_resource_limit)
with an early main_ak-is-None return so that NULL main_access_key
users don't fall through to keypair policy lookups that match with
NULL.1 parent 81cdac3 commit 7ab7788
4 files changed
Lines changed: 16 additions & 9 deletions
File tree
- src/ai/backend/manager
- repositories/scheduler
- db_source
- types
- scheduler
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
351 | 351 | | |
352 | 352 | | |
353 | 353 | | |
354 | | - | |
| 354 | + | |
355 | 355 | | |
356 | | - | |
| 356 | + | |
357 | 357 | | |
358 | 358 | | |
359 | 359 | | |
| |||
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | | - | |
| 47 | + | |
49 | 48 | | |
50 | 49 | | |
51 | 50 | | |
| |||
65 | 64 | | |
66 | 65 | | |
67 | 66 | | |
68 | | - | |
| 67 | + | |
69 | 68 | | |
70 | 69 | | |
71 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
63 | 68 | | |
64 | 69 | | |
65 | 70 | | |
| |||
144 | 149 | | |
145 | 150 | | |
146 | 151 | | |
| 152 | + | |
| 153 | + | |
147 | 154 | | |
148 | 155 | | |
149 | 156 | | |
| |||
162 | 169 | | |
163 | 170 | | |
164 | 171 | | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | 172 | | |
169 | 173 | | |
170 | 174 | | |
| |||
308 | 312 | | |
309 | 313 | | |
310 | 314 | | |
| 315 | + | |
| 316 | + | |
311 | 317 | | |
312 | 318 | | |
313 | 319 | | |
| |||
370 | 376 | | |
371 | 377 | | |
372 | 378 | | |
| 379 | + | |
| 380 | + | |
373 | 381 | | |
374 | 382 | | |
375 | 383 | | |
| |||
0 commit comments