fix(BA-5996): propagate session network_type/network_id to scheduler launcher#11561
Merged
Conversation
…launcher (#11543) Propagate `SessionRow.network_type` / `SessionRow.network_id` through `ScheduleDBSource._get_sessions_for_start` into `SessionDataForStart`, so the launcher correctly reuses pre-created networks for `PERSISTENT` sessions instead of falling back to `network_plugin.create_network(...)`. Note: On the 25.15 branch only `_get_sessions_for_start` produces `SessionDataForStart`. The other two call sites that were patched on main (`_fetch_sessions_for_start_by_ids`, `search_sessions_with_kernels_and_user`) do not exist on 25.15, so this backport only adapts the single existing query path. The regression test from main targets `search_sessions_with_kernels_and_user` and is therefore not applicable to 25.15. Backported-from: main (26.4) Backported-to: 25.15 Backport-of: 11543
Contributor
There was a problem hiding this comment.
Pull request overview
Backports #11543 to the 25.15 release branch by ensuring session inter-container network configuration (network_type / network_id) is fetched from the DB and propagated into SessionDataForStart, so the scheduler/launcher can correctly reuse pre-created persistent networks.
Changes:
- Extend
_get_sessions_for_startto selectSessionRow.network_typeandSessionRow.network_id. - Forward
network_type/network_idintoSessionDataForStart. - Add a towncrier news fragment documenting the fix.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/ai/backend/manager/repositories/scheduler/db_source/db_source.py | Selects and propagates network_type/network_id into SessionDataForStart for the scheduler start path. |
| changes/11543.fix.md | Adds a release-note fragment describing the propagated network fields fix. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
2940
to
+2944
| SessionRow.environ, | ||
| SessionRow.cluster_mode, | ||
| SessionRow.user_uuid, | ||
| SessionRow.network_type, | ||
| SessionRow.network_id, |
HyeockJinKim
approved these changes
May 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a manual backport PR of #11543 to the
25.15release.The automated cherry-pick failed with
CONFLICT (directory rename split)because:main, the PR touches threeScheduleDBSourcequery paths that buildSessionDataForStart(_get_sessions_for_start,_fetch_sessions_for_start_by_ids,search_sessions_with_kernels_and_user).25.15, only_get_sessions_for_startexists; the other two methods were introduced after 25.15.maintargetssearch_sessions_with_kernels_and_user, which doesn't exist here, so it is not backported.Changes
SessionRow.network_type/SessionRow.network_idto the_get_sessions_for_startselect and forward them into theSessionDataForStartconstructor.changes/11543.fix.mdnews fragment.Original PR
#11543
Test plan
pants checkon the touched filepants linton the touched filenetwork_type=PERSISTENTand a pre-creatednetwork_id, observe the launcher takes the persistent branch instead of callingcreate_network