forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Check our saved jupyter interpreters before allowing any of them to be used as active interpreters #10113
Merged
IanMatthewHuff
merged 5 commits into
microsoft:master
from
IanMatthewHuff:dev/ianhu/savedServerFail
Feb 14, 2020
Merged
Check our saved jupyter interpreters before allowing any of them to be used as active interpreters #10113
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
5ec1a99
initial idea
IanMatthewHuff 8bc139a
refactor to save check promise
IanMatthewHuff b25c387
revamp of initial loading
IanMatthewHuff f0eb2be
unit tests added
IanMatthewHuff 331e7f7
slight refactor for setting active jupyter interpreter
IanMatthewHuff File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: not sure on the placement here. Maybe at the same time as PreWarmDaemonPool?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to just make it part of the getSelectedInterpreter. But if I do that, I'm not sure if we are gaining anything from saving it, since we still would verify the first time that we run it and get the slowdown.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't you also get into a problem here if auto start is turned on? Auto start would use the saved interpreter before you reset it?
In reply to: 379103857 [](ancestors = 379103857)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe have the auto start stuff wait for the check too?
In reply to: 379116829 [](ancestors = 379116829,379103857)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I feel like this currently doesn't guarantee a good interpreter. But making things wait for it would reduce / remove the benefit of saving a good server I would think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just the auto start case. Normal startup should not wait.
In reply to: 379118437 [](ancestors = 379118437)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To me it makes sense to have it in activate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rchiodo . How about this. The saved interpreter check is a promise that we save (like ensureNotebook) and we fire it off on activate right away. Then getSelectedInterpreter always awaits on that promise before returning its result. This way we ensure that getSelectedInterpreter is returning something valid for all the notebook launch cases as well as stuff like preWarmVariables and the auto start server. If I do this, by the time the user is actually starting a notebook it should have completed, since it launched on activate so we still get the benefit of the saved server.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good to me 👍