Skip to content
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

Address missing local-provisioner scenario #692

Merged

Conversation

kevin-bates
Copy link
Member

There have been a few instances of users reporting that they can't run kernels due to the local-provisioner not being available. However, this provisioner is registered in the current jupyter_client package, yet when the package searches for the default provisioner (i.e., local-provisioner) it is not found.

It turns out that in certain circumstances, which remain a mystery to me, there can be multiple dist-info directories present related to jupyter_client - one representing the previous release (6.x - which does not include kernel provisioning and local-provisioner) and the current release, which is obviously running since its looking for the local-provisioner. Since entrypoints uses the first distribution it finds, it locates the 6.x dist-info directory and deems local-provisioner as not available.

This pull request will detect this condition (i.e., local-provisioner is not available), issue a warning message alerting users to the situation instructing them what to do, but then constructs a local-provisioner entrypoint instance so that default behavior is experienced and kernels can be started.

Here's an example of the logged warning:
[W 10:08:17.848 NotebookApp] Kernel Provisioning: The 'local-provisioner' is not found. This is likely due to the presence of multiple jupyter_client distributions and a previous distribution is being used as the source for entrypoints - which does not include 'local-provisioner'. That distribution should be removed such that only the version-appropriate distribution remains (version >= 7). Until then, a 'local-provisioner' entrypoint will be automatically constructed and used.
The candidate distribution locations are: ['/opt/anaconda3/envs/elyra-dev/lib/python3.8/site-packages/jupyter_client-6.1.12.dist-info', '/opt/anaconda3/envs/elyra-dev/lib/python3.8/site-packages/jupyter_client-7.0.2.dist-info']

I think we should treat this as a HOTFIX since it appears to be occurring at a high enough frequency.

If anyone has ideas for what causes a previous distribution to remain, that would be helpful.

@meeseeksmachine
Copy link

@blink1073 blink1073 added the bug label Sep 16, 2021
@blink1073 blink1073 added this to the 7.0 milestone Sep 16, 2021
Copy link
Contributor

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

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

Thank you!

@blink1073 blink1073 merged commit e2e854c into jupyter:master Sep 16, 2021
@blink1073
Copy link
Contributor

Releasing now

@kevin-bates
Copy link
Member Author

Wow - thank you @blink1073!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants