Skip to content

Commit 82ea2d0

Browse files
jopemachineclaude
andcommitted
fix(BA-5650-D): align remaining slice D call sites with owner_id rename
After rebasing on slice C, three residual references in ``session/db_source/db_source.py`` still used the old ``access_key`` variable name. This commit finishes the rename in: - ``get_session_validated`` / ``match_sessions`` / ``update_session_name`` (now forward ``owner_id=...`` instead of the leftover ``owner_access_key`` keyword). - ``_find_dependent_sessions`` and ``get_target_session_ids`` (now pass the local ``owner_id`` UUID instead of the non-existent ``access_key``). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 7e6e70e commit 82ea2d0

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

  • src/ai/backend/manager/repositories/session/db_source

src/ai/backend/manager/repositories/session/db_source/db_source.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ async def get_session_validated(
7373
return await SessionRow.get_session(
7474
db_sess,
7575
session_name_or_id,
76-
owner_access_key=owner_access_key,
76+
owner_id=owner_id,
7777
kernel_loading_strategy=kernel_loading_strategy,
7878
allow_stale=allow_stale,
7979
eager_loading_op=list(eager_loading_op) if eager_loading_op else None,
@@ -88,7 +88,7 @@ async def match_sessions(
8888
return await SessionRow.match_sessions(
8989
db_sess,
9090
id_or_name_prefix,
91-
owner_access_key=owner_access_key,
91+
owner_id=owner_id,
9292
)
9393

9494
async def get_session_to_determine_status(
@@ -140,7 +140,7 @@ async def _update(db_session: AsyncSession) -> SessionRow:
140140
await SessionRow.get_session(
141141
db_session,
142142
new_name,
143-
owner_access_key=owner_access_key,
143+
owner_id=owner_id,
144144
kernel_loading_strategy=KernelLoadingStrategy.NONE,
145145
)
146146
raise SessionAlreadyExists(f"Session with name '{new_name}' already exists")
@@ -151,7 +151,7 @@ async def _update(db_session: AsyncSession) -> SessionRow:
151151
session_row = await SessionRow.get_session(
152152
db_session,
153153
session_name_or_id,
154-
owner_access_key=owner_access_key,
154+
owner_id=owner_id,
155155
kernel_loading_strategy=KernelLoadingStrategy.ALL_KERNELS,
156156
)
157157

@@ -310,7 +310,7 @@ async def modify_session(
310310
sess = await SessionRow.get_session(
311311
db_session,
312312
session_name,
313-
owner_access_key=AccessKey(session_row.access_key),
313+
owner_id=session_row.user_uuid,
314314
)
315315
except SessionNotFound:
316316
pass
@@ -400,7 +400,7 @@ async def _find_recursive_dependencies(session_id: uuid.UUID) -> set[uuid.UUID]:
400400
root_session = await SessionRow.get_session(
401401
db_sess,
402402
root_session_name_or_id,
403-
owner_access_key=access_key,
403+
owner_id=owner_id,
404404
allow_stale=allow_stale,
405405
)
406406
root_session_id = cast(uuid.UUID, root_session.id)
@@ -440,7 +440,7 @@ async def get_target_session_ids(
440440
session = await SessionRow.get_session(
441441
db_sess,
442442
session_name_or_id,
443-
owner_access_key=access_key,
443+
owner_id=owner_id,
444444
kernel_loading_strategy=KernelLoadingStrategy.NONE,
445445
allow_stale=True,
446446
)
@@ -474,7 +474,7 @@ async def get_session_with_group(
474474
return await SessionRow.get_session(
475475
db_sess,
476476
session_name_or_id,
477-
owner_access_key=owner_access_key,
477+
owner_id=owner_id,
478478
kernel_loading_strategy=kernel_loading_strategy,
479479
allow_stale=allow_stale,
480480
eager_loading_op=[selectinload(SessionRow.group)],
@@ -490,7 +490,7 @@ async def get_session_with_routing_minimal(
490490
return await SessionRow.get_session(
491491
db_sess,
492492
session_name_or_id,
493-
owner_access_key=owner_access_key,
493+
owner_id=owner_id,
494494
kernel_loading_strategy=KernelLoadingStrategy.MAIN_KERNEL_ONLY,
495495
eager_loading_op=[
496496
selectinload(SessionRow.routing).options(noload("*")),

0 commit comments

Comments
 (0)