Skip to content

Create a subshell per target and kernel when using CommsOverSubshells.PerCommTarget #17634

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

Merged
merged 1 commit into from
Jun 26, 2025

Conversation

ianthomas23
Copy link
Contributor

References

Using subshells for comms was originally implemented in #17363. The default option for CommsOverSubshells is PerCommTarget meaning use one subshell per comm target, but this should really be one subshell per kernel per comm target as subshells are specific to a kernel.

Fixes #17633.

Code changes

The private static CommHandler._commTargetSubShellsId is changed from

    { [targetName: string]: Promise<string> | null }

to

    { [kernelId: string]: { [targetName: string]: Promise<string> | null }}

so that two kernels using the same comm-target will use different subshells, not attempt to erroneously reuse the subshell from just one of the kernels.

User-facing changes

No user facing changes apart from fixing a bug.

Backwards-incompatible changes

None.

Copy link

Thanks for making a pull request to jupyterlab!
To try out this branch on binder, follow this link: Binder

Copy link
Member

@krassowski krassowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me, thank you @ianthomas23!

@krassowski krassowski changed the title CommsOverSubshells.PerCommTarget is also per kernel Create a subshell per kernel when using CommsOverSubshells.PerCommTarget Jun 26, 2025
@krassowski krassowski merged commit 26bbccc into jupyterlab:main Jun 26, 2025
85 of 86 checks passed
meeseeksmachine pushed a commit to meeseeksmachine/jupyterlab that referenced this pull request Jun 26, 2025
@krassowski krassowski changed the title Create a subshell per kernel when using CommsOverSubshells.PerCommTarget Create a subshell per target and kernel when using CommsOverSubshells.PerCommTarget Jun 26, 2025
krassowski pushed a commit that referenced this pull request Jun 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using a subshell perCommTarget fails if using more than one kernel
2 participants