Skip to content

Correctly handle interpreter changes for Interactive and Notebook #8385

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

Conversation

IanMatthewHuff
Copy link
Member

For #8019

  • 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.

@@ -935,7 +935,9 @@ export abstract class InteractiveBase extends WebViewHost<IInteractiveWindowMapp

private onInterpreterChanged = () => {
// Update our load promise. We need to restart the jupyter server
this.loadPromise = this.reloadWithNew();
if (this.loadPromise) {
Copy link
Member Author

Choose a reason for hiding this comment

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

So this was the fix for the immediate server loading issue. But as it turns out, interpreter switching was just totally broken. It would look like it was loading, but just pick the same cached server even when you swapped interpreters.

const isRollingBuild = process.env ? process.env.VSCODE_PYTHON_ROLLING !== undefined : false;

// Real Jupyter doesn't help this test at all and is tricky to set up for it, so just skip it
if (!isRollingBuild) {
Copy link
Member Author

Choose a reason for hiding this comment

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

If you think this is wrong I can look into it, but I don't think that real python actually buys us anything for this test, and I think that it would be difficult to set up. Particularly with lockdown tomorrow.

@codecov-io
Copy link

codecov-io commented Nov 5, 2019

Codecov Report

Merging #8385 into master will increase coverage by 0.66%.
The diff coverage is 41.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8385      +/-   ##
==========================================
+ Coverage    58.7%   59.37%   +0.66%     
==========================================
  Files         509      509              
  Lines       22923    23299     +376     
  Branches     3754     3763       +9     
==========================================
+ Hits        13457    13833     +376     
+ Misses       8570     8567       -3     
- Partials      896      899       +3
Impacted Files Coverage Δ
src/client/datascience/types.ts 100% <ø> (ø) ⬆️
...science/jupyter/liveshare/guestJupyterExecution.ts 22.91% <0%> (ø) ⬆️
.../datascience/interactive-common/interactiveBase.ts 24.16% <0%> (-0.05%) ⬇️
...ascience/jupyter/liveshare/hostJupyterExecution.ts 45.45% <100%> (ø) ⬆️
...lient/datascience/jupyter/liveshare/serverCache.ts 50% <50%> (-0.91%) ⬇️
...t/datascience/jupyter/jupyterDataRateLimitError.ts 100% <0%> (ø) ⬆️
src/client/formatters/serviceRegistry.ts 100% <0%> (ø) ⬆️
...lient/datascience/jupyter/jupyterSelfCertsError.ts 100% <0%> (ø) ⬆️
src/client/debugger/extension/serviceRegistry.ts 100% <0%> (ø) ⬆️
...ience/jupyter/jupyterDebuggerRemoteNotSupported.ts 100% <0%> (ø) ⬆️
... and 33 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a139d63...ffeb017. Read the comment docs.

Copy link

@rchiodo rchiodo left a comment

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 ea0dc14 into microsoft:master Nov 5, 2019
@IanMatthewHuff IanMatthewHuff deleted the dev/ianhu/pythonSwitchEditor branch November 5, 2019 23:20
@lock lock bot locked as resolved and limited conversation to collaborators Nov 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants