-
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
GetInterpreterList does not pick up newly added virtual environments (when called from Jupyter) #17492
Comments
Related: microsoft/vscode-jupyter#5319 |
I'm going to look at this. It's blocking development in the jupyter extension. |
@rchiodo If In the extension we get the resource using vscode-python/src/client/interpreter/configuration/interpreterSelector/commands/base.ts Lines 33 to 81 in c383e81
|
We should probably use this logic if no resource is set instead of calling vscode api to get workspace folder directly |
Not sure this fixed it. I can still repro it after rebuilding the bits locally. |
Looks like the first call to getInterpreters can be out of date. |
Wasn't that always the case though? When a new workspace is opened, first call to getInterpreters always relied on the existing cache first, which won't have the latest environments unless discovery is finished. I can reproduce this issue with the stable version of the extension as well, although when trying with the stable version, the kernel list eventually gets updated to contain the new environments, which doesn't make sense as Jupyter supposedly caches the |
Maybe the timing is different then. With stable our tests pass. With insiders our tests fail. Let me try on my machine |
Using this version it doesn't repro for me. Version: 2021.8.1159798656 Using this version it also doesn't repro for me: Version: 2021.9.1246542782 |
But with insiders it does. |
What version of the jupyter extension do you have? The jupyter cache is a recent thing that Don added. |
Actually does it really matter? It's broken either way. Until the event is in the API it makes sense for it to force a refresh. |
Yeah, it just seems like it was never supposed to work. |
Tests seem to be reproing this. I believe there's still a problem with untitled files. At least during our tests running. |
Environment data
python.languageServer
setting: XXX[NOTE: If you suspect that your issue is related to the Microsoft Python Language Server (
python.languageServer: 'Microsoft'
), please download our new language server Pylance from the VS Code marketplace to see if that fixes your issue]Expected behaviour
Virtual environments just created will end up in list of kernels.
Actual behaviour
Virtual environments do not appear as kernels
Steps to reproduce:
[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]
This test run is failing for the same reason:
https://github.com/microsoft/vscode-jupyter/runs/3669744903?check_suite_focus=true
Logs
Here's the logs from jupyter. Notice how the venv 'testDummyVenv' is not listed.
jupyterlog.txt
Here's the logs from python. venv 'testDummyVenv' is listed.
pythonlog.txt
We (Jupyter) are not getting the new venv when calling getInterpreterList. This seems like a recent regression.
The text was updated successfully, but these errors were encountered: