Skip to content

Second refactor for non-jupyter kernel search#11527

Merged
IanMatthewHuff merged 4 commits into
microsoft:masterfrom
IanMatthewHuff:master
May 1, 2020
Merged

Second refactor for non-jupyter kernel search#11527
IanMatthewHuff merged 4 commits into
microsoft:masterfrom
IanMatthewHuff:master

Conversation

@IanMatthewHuff

Copy link
Copy Markdown
Member

For #

  • Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
  • Title summarizes what is changing.
  • Has a news entry file (remember to thank yourself!).
  • Appropriate comments and documentation strings in the code.
  • Has sufficient logging.
  • Has telemetry for enhancements.
  • Unit tests & system/integration tests are added/updated.
  • Test plan is updated as appropriate.
  • package-lock.json has been regenerated by running npm install (if dependencies have changed).
  • The wiki is updated with any design decisions/details.

@IanMatthewHuff

Copy link
Copy Markdown
Member Author

One more refactor that I wanted to roll in here for non-jupyter kernel searching

@IanMatthewHuff IanMatthewHuff added the no-changelog No news entry required label Apr 30, 2020
@sonarqubecloud

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@reportAction(ReportableAction.KernelsGetKernelForLocalConnection)
public async getKernelForLocalConnection(
resource: Resource,
type: 'raw' | 'jupyter' | 'noConnection',

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Main crux of the change is to have the rawKernelProvider call into getKernelForLocalConnection to get the initial launch kernel / interpreter. This lets it participate in stuff like the prewarming of the kernel switcher selections.

}

// Get our kernelspec and matching interpreter for a connection to a local jupyter server
private async getKernelForLocalJupyterConnection(

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Just a move into a function of the jupyter specific code that was in getKernelForLocalConnection.

// Before we try to connect we need to find a kernel and install ipykernel
const kernelSpec = await this.kernelFinder.findKernelSpec(
// We need to locate kernelspec and possible interpreter for this launch based on resource and notebook metadata
const kernelSpecInterpreter = await this.kernelSelector.getKernelForLocalConnection(

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Pushed kernelFinder and kernelService calls into the kernel selector here.

@rchiodo rchiodo left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

:shipit:

@IanMatthewHuff IanMatthewHuff merged commit 87dd3d6 into microsoft:master May 1, 2020
@lock lock Bot locked as resolved and limited conversation to collaborators May 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

no-changelog No news entry required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants