Skip to content

Commit 202f333

Browse files
jopemachineclaude
andcommitted
fix(BA-5978): drop duplicate _route_legacy_uuid_mounts after rebase
The rebase onto latest main re-applied an out-of-scope copy of ``_route_legacy_uuid_mounts`` that already exists on main (via #11521). Reset the file to main so this PR no longer touches it. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 0a01720 commit 202f333

1 file changed

Lines changed: 0 additions & 49 deletions

File tree

src/ai/backend/manager/api/rest/session/handler.py

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -282,55 +282,6 @@ def _route_legacy_uuid_mounts(creation_config: dict[str, Any]) -> dict[str, Any]
282282
return next_config
283283

284284

285-
def _route_legacy_uuid_mounts(creation_config: dict[str, Any]) -> dict[str, Any]:
286-
"""Lift UUID-shaped strings from legacy mount buckets onto the UUID-keyed
287-
buckets, leaving only name-shaped entries for the name resolver.
288-
"""
289-
legacy_mounts = creation_config.get("mounts") or ()
290-
legacy_mount_map = creation_config.get("mount_map") or {}
291-
legacy_mount_options = creation_config.get("mount_options") or {}
292-
293-
mount_ids: list[Any] = list(creation_config.get("mount_ids") or [])
294-
mount_id_map: dict[Any, str] = dict(creation_config.get("mount_id_map") or {})
295-
mount_options: dict[Any, Any] = {}
296-
name_mounts: list[Any] = []
297-
name_mount_map: dict[str, str] = {}
298-
299-
legacy_mounts_keys = {str(m) for m in legacy_mounts}
300-
seen: set[str] = set()
301-
for raw in list(legacy_mounts) + list(legacy_mount_map) + list(legacy_mount_options):
302-
key = str(raw)
303-
if key in seen:
304-
continue
305-
seen.add(key)
306-
dst = legacy_mount_map.get(key)
307-
opts = legacy_mount_options.get(key)
308-
try:
309-
vfid = UUID(key)
310-
except (ValueError, TypeError):
311-
if key in legacy_mounts_keys:
312-
name_mounts.append(raw)
313-
if dst is not None:
314-
name_mount_map[key] = dst
315-
if opts is not None:
316-
mount_options[key] = opts
317-
continue
318-
if vfid not in mount_ids:
319-
mount_ids.append(vfid)
320-
if dst is not None:
321-
mount_id_map.setdefault(vfid, dst)
322-
if opts is not None:
323-
mount_options.setdefault(vfid, opts)
324-
325-
next_config = dict(creation_config)
326-
next_config["mounts"] = name_mounts
327-
next_config["mount_map"] = name_mount_map
328-
next_config["mount_options"] = mount_options
329-
next_config["mount_ids"] = mount_ids
330-
next_config["mount_id_map"] = mount_id_map
331-
return next_config
332-
333-
334285
def _merge_resolved_legacy_mounts(
335286
creation_config: dict[str, Any],
336287
name_to_id: dict[str, UUID],

0 commit comments

Comments
 (0)