Skip to content

fix(BA-1187): None network deletion error when deleting session #4219

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changes/4219.fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix `None` network deletion error when deleting session.
3 changes: 2 additions & 1 deletion src/ai/backend/manager/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -2705,7 +2705,8 @@ async def _fetch_session() -> tuple[SessionRow, str | None]:
session.main_kernel.agent,
order_key=str(session.main_kernel.session_id),
) as rpc:
await rpc.call.destroy_local_network(network_ref_name)
if network_ref_name:
await rpc.call.destroy_local_network(network_ref_name)
except Exception:
log.exception(f"Failed to destroy the agent-local network {network_ref_name}")
elif session.cluster_mode == ClusterMode.MULTI_NODE:
Expand Down
Loading