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

.resolveEnvironment returns incorrect information for the same envionment Id #20070

Closed
DonJayamanne opened this issue Oct 25, 2022 · 17 comments · Fixed by #20112
Closed

.resolveEnvironment returns incorrect information for the same envionment Id #20070

DonJayamanne opened this issue Oct 25, 2022 · 17 comments · Fixed by #20112
Assignees
Labels
area-environments Features relating to handling interpreter environments author-verification-requested Issues potentially verifiable by issue author bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster needs PR Ready to be worked on verification-steps-needed Steps to verify are needed for verification verified Verification succeeded
Milestone

Comments

@DonJayamanne
Copy link

I have a conda enviornment .conda created using the Python extension UI.
Upon calling resolveEnviornment I get the value for sysPrefix, however after we call this a couple of times, sometimes the value for sysPrefix is an empty string.

  • Load VS Code
  • Call resolveEnvironment a few times for the same env id and we get sysPrefix
  • Call this again a few times, and sometimes we'll get the return value with sysPrefix:''

This is definitely incorrect and causes issues in Jupyter extension when attempting to install things and run kernels.
I.e. getting resolveEnvionment should return the full details, but for some reason its an empty string.

Here are the some of the logs

Logs
Telemetry level is off
Experiments are disabled, only manually opted experiments are active.
LSP Notebooks experiment is enabled
LSP Notebooks interactive window support is enabled
[INFO 2022-9-26 9:50:47.363]: [
'Display locator refreshing progress, Class name = g, completed in 0ms, has a falsy return value, , Return Value: undefined'
]
Python interpreter path: ./.conda/bin/python
> ~/miniforge3/bin/conda info --json
[INFO 2022-9-26 9:51:47.481]: Found: /usr/bin/python3 --> /usr/bin/python3
> ~/miniforge3/bin/conda info --json
> ~/miniforge3/bin/conda run -p ./.conda/bin/python --no-capture-output python ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/printEnvVariables.py
> ~/.pyenv/versions/3.10.4/bin/python ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
[INFO 2022-9-26 9:51:47.949]: Found: /opt/homebrew/bin/python3 --> /opt/homebrew/Cellar/python@3.9/3.9.13_1/Frameworks/Python.framework/Versions/3.9/bin/python3.9
[INFO 2022-9-26 9:51:47.977]: Found interpreter for /Users/donjayamanne/.pyenv/versions/3.10.4/bin/python,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
[INFO 2022-9-26 9:51:48.47]: Found: /opt/homebrew/bin/python3.9 --> /opt/homebrew/Cellar/python@3.9/3.9.13_1/Frameworks/Python.framework/Versions/3.9/bin/python3.9
> ./.venv/bin/python ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
[ERROR 2022-9-26 9:51:48.157]: getActivatedEnvironmentVariables Error: Command failed: /Users/donjayamanne/miniforge3/bin/conda run -p /Users/donjayamanne/crap/.conda/bin/python --no-capture-output python /Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py /Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/printEnvVariables.py

EnvironmentLocationNotFound: Not a conda environment: /Users/donjayamanne/crap/.conda/bin/python


  at ChildProcess.exithandler (node:child_process:408:12)
  at ChildProcess.emit (node:events:526:28)
  at maybeClose (node:internal/child_process:1092:16)
  at Socket.<anonymous> (node:internal/child_process:451:11)
  at Socket.emit (node:events:526:28)
  at Pipe.<anonymous> (node:net:687:12)
  at Pipe.callbackTrampoline (node:internal/async_hooks:130:17) {
killed: false,
code: 1,
signal: null,
cmd: '/Users/donjayamanne/miniforge3/bin/conda run -p /Users/donjayamanne/crap/.conda/bin/python --no-capture-output python /Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py /Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/printEnvVariables.py'
}
[INFO 2022-9-26 9:51:48.158]: [
'getActivatedEnvironmentVariables, Class name = I, completed in 1852ms, has a falsy return value, Arg 1: undefined, Arg 2: {"id":"/Users/donjayamanne/crap/.conda/bin/python","sysPrefix":"/Users/donjayamanne/crap/.conda","envPath":"/Users/donjayamanne/crap/.conda/bin/python","envName":"","displayName":"","envType":"Conda","version":{"major":3,"minor":8,"patch":13,"raw":"3.8.13 | packaged by conda-forge | (default, Mar 25 2022, 06:05:16) \\n[Clang 12.0.1 ]"},"path":"/Users/donjayamanne/crap/.conda/bin/python"}, Arg 3: false'
]
> ./.conda/bin/python ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
[INFO 2022-9-26 9:51:48.233]: Found interpreter for /Users/donjayamanne/crap/.conda/bin/python,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
[ERROR 2022-9-26 9:52:23.430]: Error: python /Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py returned bad JSON () (SyntaxError: Unexpected end of JSON input)
  at /Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/out/client/extension.js:2:224675
  at t.getInterpreterInfo (/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/out/client/extension.js:2:556155)
  at c.g [as workerFunc] (/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/out/client/extension.js:2:551531)
  at start (/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/out/client/extension.js:2:314397)
> ./.venvClean/bin/python ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
> ./.venvCrap/bin/python ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
[INFO 2022-9-26 9:52:23.567]: Found interpreter for /Users/donjayamanne/crap/.venvClean/bin/python,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
> ./.venvIssue11031/bin/python ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
[INFO 2022-9-26 9:52:23.584]: Found interpreter for /Users/donjayamanne/crap/.venvCrap/bin/python,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
> ./.venvJupyterLab/bin/python ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
[INFO 2022-9-26 9:52:23.608]: Found interpreter for /Users/donjayamanne/crap/.venvIssue11031/bin/python,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
> ./.venvLab/bin/python ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
[INFO 2022-9-26 9:52:23.656]: Found interpreter for /Users/donjayamanne/crap/.venvJupyterLab/bin/python,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
> ./.venvLatest/bin/python ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
[INFO 2022-9-26 9:52:23.691]: Found interpreter for /Users/donjayamanne/crap/.venvLab/bin/python,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
> ./.venvTF/bin/python ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
[INFO 2022-9-26 9:52:23.726]: Found interpreter for /Users/donjayamanne/crap/.venvLatest/bin/python,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
> ./.venvWidgets/bin/python ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
[INFO 2022-9-26 9:52:23.800]: Found interpreter for /Users/donjayamanne/crap/.venvTF/bin/python,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
> ./.venvWidgetsLatest/bin/python ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
[INFO 2022-9-26 9:52:23.885]: Found interpreter for /Users/donjayamanne/crap/.venvWidgetsLatest/bin/python,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
> ~/miniconda3/bin/python ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
[INFO 2022-9-26 9:52:23.906]: Found interpreter for /Users/donjayamanne/crap/.venvWidgets/bin/python,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
> ~/miniconda3/envs/condaEnv/bin/python ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
[INFO 2022-9-26 9:52:24.6]: Found interpreter for /Users/donjayamanne/miniconda3/bin/python,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
> ~/miniconda3/envs/condaenv/bin/python ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
[INFO 2022-9-26 9:52:24.119]: Found interpreter for /Users/donjayamanne/miniconda3/envs/condaEnv/bin/python,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
> ~/miniconda3/envs/ipyemail/bin/python ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
[INFO 2022-9-26 9:52:24.140]: Found interpreter for /Users/donjayamanne/miniconda3/envs/condaenv/bin/python,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
> ~/miniconda3/envs/new_env/bin/python ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
[INFO 2022-9-26 9:52:24.228]: Found interpreter for /Users/donjayamanne/miniconda3/envs/ipyemail/bin/python,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
> ~/miniconda3/envs/pypdfenv/bin/python ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
[INFO 2022-9-26 9:52:24.285]: Found interpreter for /Users/donjayamanne/miniconda3/envs/new_env/bin/python,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
> ~/miniconda3/envs/sqlite/bin/python ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
[INFO 2022-9-26 9:52:24.373]: Found interpreter for /Users/donjayamanne/miniconda3/envs/pypdfenv/bin/python,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
> ~/miniforge3/bin/python ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
[INFO 2022-9-26 9:52:24.399]: Found interpreter for /Users/donjayamanne/miniconda3/envs/sqlite/bin/python,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
> ~/miniforge3/envs/ipympl-dev/bin/python ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
[INFO 2022-9-26 9:52:24.452]: Found interpreter for /Users/donjayamanne/miniforge3/bin/python,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
> ~/miniforge3/envs/ipywidgets/bin/python ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
[INFO 2022-9-26 9:52:24.534]: Found interpreter for /Users/donjayamanne/miniforge3/envs/ipympl-dev/bin/python,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
> ~/miniforge3/envs/ipywidgets_dev/bin/python ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
[INFO 2022-9-26 9:52:24.554]: Found interpreter for /Users/donjayamanne/miniforge3/envs/ipywidgets/bin/python,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
> ~/miniforge3/envs/test2/bin/python ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
[INFO 2022-9-26 9:52:24.609]: Found interpreter for /Users/donjayamanne/miniforge3/envs/ipywidgets_dev/bin/python,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
> ~/miniforge3/envs/tf/bin/python ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
[INFO 2022-9-26 9:52:24.735]: Found interpreter for /Users/donjayamanne/miniforge3/envs/tf/bin/python,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
> ~/miniforge3/envs/widgets_dev/bin/python ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
[INFO 2022-9-26 9:52:24.838]: Found interpreter for /Users/donjayamanne/miniforge3/envs/widgets_dev/bin/python,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
> /usr/bin/python3 ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
[INFO 2022-9-26 9:52:24.923]: Found interpreter for /usr/bin/python3,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
> /opt/homebrew/bin/python3 ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
[INFO 2022-9-26 9:52:24.954]: Found interpreter for /opt/homebrew/bin/python3,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
[INFO 2022-9-26 9:52:24.977]: Found interpreter for /Users/donjayamanne/miniforge3/envs/test2/bin/python,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/get_output_via_markers.py,/Users/donjayamanne/.vscode-insiders/extensions/ms-python.python-2022.16.1/pythonFiles/interpreterInfo.py
[INFO 2022-9-26 9:52:24.990]: Environments added to cache [{"name":"","location":"","kind":"global-other","executable":{"filename":"/usr/bin/python3","sysPrefix":"/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9","ctime":1661331579000,"mtime":1661331579000},"display":"Python 3.9.6 64-bit","version":{"major":3,"minor":9,"micro":6,"release":{"level":"final","serial":0},"sysVersion":"3.9.6 (default, Aug  5 2022, 15:21:02) \n[Clang 14.0.0 (clang-1400.0.29.102)]"},"arch":3,"distro":{"org":""},"source":["path env var"],"id":"/usr/bin/python3","detailedDisplayName":"Python 3.9.6 64-bit"},{"name":".venvWidgets","location":"/Users/donjayamanne/crap/.venvWidgets","kind":"virt-venv","executable":{"filename":"/Users/donjayamanne/crap/.venvWidgets/bin/python","sysPrefix":"/Users/donjayamanne/crap/.venvWidgets","ctime":1651818989338,"mtime":1651818989338},"searchLocation":{"$mid":1,"path":"/Users/donjayamanne/crap/.venvWidgets","scheme":"file"},"display":"Python 3.9.13 ('.venvWidgets': venv)","version":{"major":3,"minor":9,"micro":13,"release":{"level":"final","serial":0},"sysVersion":"3.9.13 (main, May 24 2022, 21:13:51) \n[Clang 13.1.6 (clang-1316.0.21.2)]"},"arch":3,"distro":{"org":""},"source":[],"type":"Virtual","id":"/Users/donjayamanne/crap/.venvWidgets/bin/python","detailedDisplayName":"Python 3.9.13 ('.venvWidgets': venv)"},{"name":"3.10.4","location":"/Users/donjayamanne/.pyenv/versions/3.10.4","kind":"global-pyenv","executable":....
@DonJayamanne DonJayamanne added the feature-request Request for new features or functionality label Oct 25, 2022
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Oct 25, 2022
@DonJayamanne
Copy link
Author

@karrtikr if you look at the logs, the conda environment isn't detected as a conda env , even though that env is created by Python extension.

There could be other issues here

@DonJayamanne
Copy link
Author

pythonlogs.log

@DonJayamanne
Copy link
Author

@karrtikr this isn't a feature request, sorry I accidentally labled that incorectly.
FYI - I'm hoping we can get this addressed before the release

@DonJayamanne
Copy link
Author

Note, the requirement here is if i were to call resolveEnvironment 10 times it should return the same information.
This is curicial for Jupyter extesnion, else today we run into an infinite loop as we keep detecting changes in the environments.

Considering this issue exists, I'm going to try and improve this code at our end to ensure we don't run into this inifinite loop.

@karrtikr
Copy link

karrtikr commented Oct 28, 2022

Given this has the same logs as the issue #20071, the cause is likely the same: #20071 (comment). Let us know if it re-occurs after making the fix there.

@karrtikr karrtikr closed this as not planned Won't fix, can't repro, duplicate, stale Oct 28, 2022
@karrtikr karrtikr reopened this Oct 28, 2022
@karrtikr
Copy link

karrtikr commented Oct 28, 2022

@DonJayamanne I'm unable to reproduce this issue on my sample extension:

setTimeout(async () => {
    let resolved = await proposedApi.environments.resolveEnvironment(
        proposedApi.environments.getActiveEnvironmentPath(),
    );
    console.log(resolved?.executable.sysPrefix);
    let sysPrefix = resolved?.executable.sysPrefix;
    console.log('Intial', resolved?.executable.sysPrefix);
    await sleep(1000);
    while (true) {
        await sleep(1000);
        resolved = await proposedApi.environments.resolveEnvironment(
            proposedApi.environments.getActiveEnvironmentPath(),
        );
        if (resolved?.executable.sysPrefix !== sysPrefix) {
            console.log('Different', resolved?.executable.sysPrefix);
            sysPrefix = resolved?.executable.sysPrefix;
        }
    }
});

Calling it every one second but sys.prefix is always the same. proposedApi.environments.getActiveEnvironmentPath() corresponds to the path to .conda environment python.

I also checked the value of sysPrefix when resolvedEnvironment returns, and it's never empty string unless we're talking about environments without python.

@karrtikr karrtikr added info-needed Issue requires more information from poster area-environments Features relating to handling interpreter environments labels Oct 28, 2022
@DonJayamanne
Copy link
Author

also checked the value of sysPrefix when resolvedEnvironment returns, and it's never empty string unless we're talking about environments without python.

possibly, what i find was that at one point it had a value then, empty string then undefined.
i added a work around in our code to default undefined properties with empty string and to ignore changes in some cases. the pr is linked to this issue

will try to debug and find the code next week

@DonJayamanne
Copy link
Author

try your code with all environments in the list of known. not just one

@DonJayamanne
Copy link
Author

DonJayamanne commented Oct 28, 2022

I can still repro this issue, sometimes the name is empty string and sometimes its undefined, hence at my end when I compare the two its a change for me.

Happens with a conda environment.

@karrtikr
Copy link

The original issue talked about sysPrefix, I'll try all environments and with name.

@DonJayamanne
Copy link
Author

The original issue talked about sysPrefix, I'

I can't repro that anymore, but name is also changing.

I'll try all environments and with name.

I would suggest testing with all properties, not just name.
E.g. JSON.stringify should never produce a new value

@karrtikr karrtikr added bug Issue identified by VS Code Team member as probable bug needs PR Ready to be worked on labels Oct 28, 2022
@karrtikr
Copy link

I discovered a bug due to which name property could change, other properties seem stable to me:

async function logChange(x: Environment) {
        let env = await proposedApi.environments.resolveEnvironment(x);
        await sleep(1000);
        while (true) {
            await sleep(1000);
            const yy = await proposedApi.environments.resolveEnvironment(x);
            if (JSON.stringify(yy) !== JSON.stringify(env)) {
                console.log('Different', yy?.id, JSON.stringify(env));
                env = yy;
            }
        }
    }
    setTimeout(async () => {
        console.log('About to log', proposedApi.environments.known.length);
        for (const x of proposedApi.environments.known) {
            await logChange(x);
        }
    });

@karrtikr karrtikr added author-verification-requested Issues potentially verifiable by issue author and removed triage-needed Needs assignment to the proper sub-team labels Oct 28, 2022
karrtikr pushed a commit that referenced this issue Oct 28, 2022
@karrtikr karrtikr added this to the October 2022 milestone Nov 2, 2022
@karrtikr
Copy link

karrtikr commented Nov 2, 2022

@DonJayamanne Verified?

@karrtikr karrtikr modified the milestones: October 2022, November 2022 Nov 2, 2022
@karrtikr
Copy link

karrtikr commented Nov 2, 2022

Changing milestone to November as this isn't critical to verify given Jupyter already has a workaround.

@connor4312
Copy link
Member

Are there verification steps available for this?

@connor4312 connor4312 added the verification-steps-needed Steps to verify are needed for verification label Dec 1, 2022
@karrtikr
Copy link

As Jupyter hasn't gotten back marking as verified.

@karrtikr karrtikr added the verified Verification succeeded label Dec 12, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 12, 2023
@DonJayamanne
Copy link
Author

Oops, sorry I missed the message.
@karrtikr I have verified this issue.
Next time please ping again (thats generally what we do, instead of just the one ping), sometimes we can miss such messages due to the volume of notifications in github.

wesm pushed a commit to posit-dev/positron that referenced this issue Mar 28, 2024
--------------------
Commit message for microsoft/vscode-python@b32ca0a:

Putting new properties in GDPR (microsoft/vscode-python#20111)

Co-authored-by: Luciana Abud <45497113+luabud@users.noreply.github.com>
--------------------
Commit message for microsoft/vscode-python@f0ce532:

Only return local environments from the currently opened workspace folders in environments api (microsoft/vscode-python#20108)

Closes microsoft/vscode-python#20068
Fixes microsoft/vscode-python#20105
--------------------
Commit message for microsoft/vscode-python@43c059e:

Resolve conda environments without relying on the updated list of conda envs (microsoft/vscode-python#20112)

Closes microsoft/vscode-python#20069
Closes microsoft/vscode-python#20110
Closes microsoft/vscode-python#20070
--------------------
Commit message for microsoft/vscode-python@1db65b8:

Ensure that search location is stored as a string (microsoft/vscode-python#20106)

For microsoft/vscode-python#20104

The Cause: The `workspaceFolder` field is set using an internal field
`searchLocation`. `searchLocation` is what gets saved to Memento as
`Uri`. when we read it back it looks like this:

![image](https://user-images.githubusercontent.com/3840081/198420406-fb4c9b87-1276-4717-8043-69d95dcdba48.png)

Interim Solution:
* Reading (broken case): Since there are already existing cases where
this is broken. The surgical fix is to read bad value, extract the
`scheme` and `path`, use that to re-create the URI.
* Reading/Writing (new case): Make sure that we convert Uri to string
before writing and parse back the Uri when reading.

Long term solution:
Object written to memento needs to be serialized using a custom
serializer that validates all values before writing and after reading.
--------------------
Commit message for microsoft/vscode-python@83fff4f:

Fix for env creation errors (microsoft/vscode-python#20075)

1. We ensure that non-zero error codes are handled
2. We show error message, with got to logs, and select interpreter.
3. Uses conda base environment to find base python.

Fixes: microsoft/vscode-python#20072
Fixes: microsoft/vscode-python#20062
--------------------
Commit message for microsoft/vscode-python@654fd19:

Add to release notes (microsoft/vscode-python#19943)

Adding clarity to release notes which I found helpful after going
through the process myself. Currently a draft PR as I will make more
changes Wednesday after next steps in process
--------------------
Commit message for microsoft/vscode-python@2d53622:

Bump actions/checkout from 2 to 3 (microsoft/vscode-python#20059)

Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to
3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/checkout/releases">actions/checkout's
releases</a>.</em></p>
<blockquote>
<h2>v3.0.0</h2>
<ul>
<li>Updated to the node16 runtime by default
<ul>
<li>This requires a minimum <a
href="https://github.com/actions/runner/releases/tag/v2.285.0">Actions
Runner</a> version of v2.285.0 to run, which is by default available in
GHES 3.4 or later.</li>
</ul>
</li>
</ul>
<h2>v2.5.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Update <code>@​actions/core</code> to 1.10.0 by <a
href="https://github.com/rentziass"><code>@​rentziass</code></a> in <a
href="https://github-redirect.dependabot.com/actions/checkout/pull/962">actions/checkout#962</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/checkout/compare/v2...v2.5.0">https://github.com/actions/checkout/compare/v2...v2.5.0</a></p>
<h2>v2.4.2</h2>
<h2>What's Changed</h2>
<ul>
<li>Add set-safe-directory input to allow customers to take control. (<a
href="https://github-redirect.dependabot.com/actions/checkout/issues/770">#770</a>)
by <a
href="https://github.com/TingluoHuang"><code>@​TingluoHuang</code></a>
in <a
href="https://github-redirect.dependabot.com/actions/checkout/pull/776">actions/checkout#776</a></li>
<li>Prepare changelog for v2.4.2. by <a
href="https://github.com/TingluoHuang"><code>@​TingluoHuang</code></a>
in <a
href="https://github-redirect.dependabot.com/actions/checkout/pull/778">actions/checkout#778</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/checkout/compare/v2...v2.4.2">https://github.com/actions/checkout/compare/v2...v2.4.2</a></p>
<h2>v2.4.1</h2>
<ul>
<li>Fixed an issue where checkout failed to run in container jobs due to
the new git setting <code>safe.directory</code></li>
</ul>
<h2>v2.4.0</h2>
<ul>
<li>Convert SSH URLs like <code>org-&lt;ORG_ID&gt;@github.com:</code> to
<code>https://github.com/</code> - <a
href="https://github-redirect.dependabot.com/actions/checkout/pull/621">pr</a></li>
</ul>
<h2>v2.3.5</h2>
<p>Update dependencies</p>
<h2>v2.3.4</h2>
<ul>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/379">Add
missing <code>await</code>s</a></li>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/360">Swap
to Environment Files</a></li>
</ul>
<h2>v2.3.3</h2>
<ul>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/345">Remove
Unneeded commit information from build logs</a></li>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/326">Add
Licensed to verify third party dependencies</a></li>
</ul>
<h2>v2.3.2</h2>
<p><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/320">Add
Third Party License Information to Dist Files</a></p>
<h2>v2.3.1</h2>
<p><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/284">Fix
default branch resolution for .wiki and when using SSH</a></p>
<h2>v2.3.0</h2>
<p><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/278">Fallback
to the default branch</a></p>
<h2>v2.2.0</h2>
<p><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/258">Fetch
all history for all tags and branches when fetch-depth=0</a></p>
<h2>v2.1.1</h2>
<p>Changes to support GHES (<a
href="https://github-redirect.dependabot.com/actions/checkout/pull/236">here</a>
and <a
href="https://github-redirect.dependabot.com/actions/checkout/pull/248">here</a>)</p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/actions/checkout/blob/main/CHANGELOG.md">actions/checkout's
changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<h2>v3.1.0</h2>
<ul>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/939">Use
<code>@​actions/core</code> <code>saveState</code> and
<code>getState</code></a></li>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/922">Add
<code>github-server-url</code> input</a></li>
</ul>
<h2>v3.0.2</h2>
<ul>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/770">Add
input <code>set-safe-directory</code></a></li>
</ul>
<h2>v3.0.1</h2>
<ul>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/762">Fixed
an issue where checkout failed to run in container jobs due to the new
git setting <code>safe.directory</code></a></li>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/744">Bumped
various npm package versions</a></li>
</ul>
<h2>v3.0.0</h2>
<ul>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/689">Update
to node 16</a></li>
</ul>
<h2>v2.3.1</h2>
<ul>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/284">Fix
default branch resolution for .wiki and when using SSH</a></li>
</ul>
<h2>v2.3.0</h2>
<ul>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/278">Fallback
to the default branch</a></li>
</ul>
<h2>v2.2.0</h2>
<ul>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/258">Fetch
all history for all tags and branches when fetch-depth=0</a></li>
</ul>
<h2>v2.1.1</h2>
<ul>
<li>Changes to support GHES (<a
href="https://github-redirect.dependabot.com/actions/checkout/pull/236">here</a>
and <a
href="https://github-redirect.dependabot.com/actions/checkout/pull/248">here</a>)</li>
</ul>
<h2>v2.1.0</h2>
<ul>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/191">Group
output</a></li>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/199">Changes
to support GHES alpha release</a></li>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/184">Persist
core.sshCommand for submodules</a></li>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/163">Add
support ssh</a></li>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/179">Convert
submodule SSH URL to HTTPS, when not using SSH</a></li>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/157">Add
submodule support</a></li>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/144">Follow
proxy settings</a></li>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/141">Fix
ref for pr closed event when a pr is merged</a></li>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/128">Fix
issue checking detached when git less than 2.22</a></li>
</ul>
<h2>v2.0.0</h2>
<ul>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/108">Do
not pass cred on command line</a></li>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/107">Add
input persist-credentials</a></li>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/104">Fallback
to REST API to download repo</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/actions/checkout/commit/93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8"><code>93ea575</code></a>
Prepare release v3.1.0 (<a
href="https://github-redirect.dependabot.com/actions/checkout/issues/940">#940</a>)</li>
<li><a
href="https://github.com/actions/checkout/commit/6a84743051be17cee477b0a26bd866b5dba996e4"><code>6a84743</code></a>
Bump <code>@​actions/core</code> to 1.10.0 (<a
href="https://github-redirect.dependabot.com/actions/checkout/issues/939">#939</a>)</li>
<li><a
href="https://github.com/actions/checkout/commit/e6d535c99c374d0c3f6d8cd8086a57b43c6c700a"><code>e6d535c</code></a>
Inject GitHub host to be able to clone from another GitHub instance (<a
href="https://github-redirect.dependabot.com/actions/checkout/issues/922">#922</a>)</li>
<li><a
href="https://github.com/actions/checkout/commit/2541b1294d2704b0964813337f33b291d3f8596b"><code>2541b12</code></a>
Prepare changelog for v3.0.2. (<a
href="https://github-redirect.dependabot.com/actions/checkout/issues/777">#777</a>)</li>
<li><a
href="https://github.com/actions/checkout/commit/0ffe6f9c5599e73776da5b7f113e994bc0a76ede"><code>0ffe6f9</code></a>
Add set-safe-directory input to allow customers to take control. (<a
href="https://github-redirect.dependabot.com/actions/checkout/issues/770">#770</a>)</li>
<li><a
href="https://github.com/actions/checkout/commit/dcd71f646680f2efd8db4afa5ad64fdcba30e748"><code>dcd71f6</code></a>
Enforce safe directory (<a
href="https://github-redirect.dependabot.com/actions/checkout/issues/762">#762</a>)</li>
<li><a
href="https://github.com/actions/checkout/commit/add3486cc3b55d4a5e11c8045058cef96538edc7"><code>add3486</code></a>
Patch to fix the dependbot alert. (<a
href="https://github-redirect.dependabot.com/actions/checkout/issues/744">#744</a>)</li>
<li><a
href="https://github.com/actions/checkout/commit/5126516654c75f76bca1de45dd82a3006d8890f9"><code>5126516</code></a>
Bump minimist from 1.2.5 to 1.2.6 (<a
href="https://github-redirect.dependabot.com/actions/checkout/issues/741">#741</a>)</li>
<li><a
href="https://github.com/actions/checkout/commit/d50f8ea76748df49594d9b109b614f3b4db63c71"><code>d50f8ea</code></a>
Add v3.0 release information to changelog (<a
href="https://github-redirect.dependabot.com/actions/checkout/issues/740">#740</a>)</li>
<li><a
href="https://github.com/actions/checkout/commit/2d1c1198e79c30cca5c3957b1e3b65ce95b5356e"><code>2d1c119</code></a>
update test workflows to checkout v3 (<a
href="https://github-redirect.dependabot.com/actions/checkout/issues/709">#709</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/actions/checkout/compare/v2...v3">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=2&new-version=3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
--------------------
Commit message for microsoft/vscode-python@a074e8b:

Updating package.json for Create Env tile  (microsoft/vscode-python#20066)

Updated package.json to include a Create Environment tile in the Python
Getting Started walkthrough if there is a workspace open. If there is no
workspace open, it will default to the normal Getting Started
walkthrough with the Select Interpreter tile.

This also incorporates the new walkthrough artwork.

Co-authored-by: Kartik Raj <karraj@microsoft.com>
Co-authored-by: Luciana Abud <45497113+luabud@users.noreply.github.com>

Lead-authored-by: Kartik Raj <karraj@microsoft.com>
Co-authored-by: Heejae Chang <1333179+heejaechang@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Eleanor Boyd <eleanorboyd@microsoft.com>
Co-authored-by: Jonathan McPherson <jonathan@rstudio.com>
Co-authored-by: Karthik Nadig <kanadig@microsoft.com>
wesm pushed a commit to posit-dev/positron that referenced this issue Mar 28, 2024
--------------------
Commit message for microsoft/vscode-python@b32ca0a:

Putting new properties in GDPR (microsoft/vscode-python#20111)

Co-authored-by: Luciana Abud <45497113+luabud@users.noreply.github.com>
--------------------
Commit message for microsoft/vscode-python@f0ce532:

Only return local environments from the currently opened workspace folders in environments api (microsoft/vscode-python#20108)

Closes microsoft/vscode-python#20068
Fixes microsoft/vscode-python#20105
--------------------
Commit message for microsoft/vscode-python@43c059e:

Resolve conda environments without relying on the updated list of conda envs (microsoft/vscode-python#20112)

Closes microsoft/vscode-python#20069
Closes microsoft/vscode-python#20110
Closes microsoft/vscode-python#20070
--------------------
Commit message for microsoft/vscode-python@1db65b8:

Ensure that search location is stored as a string (microsoft/vscode-python#20106)

For microsoft/vscode-python#20104

The Cause: The `workspaceFolder` field is set using an internal field
`searchLocation`. `searchLocation` is what gets saved to Memento as
`Uri`. when we read it back it looks like this:

![image](https://user-images.githubusercontent.com/3840081/198420406-fb4c9b87-1276-4717-8043-69d95dcdba48.png)

Interim Solution:
* Reading (broken case): Since there are already existing cases where
this is broken. The surgical fix is to read bad value, extract the
`scheme` and `path`, use that to re-create the URI.
* Reading/Writing (new case): Make sure that we convert Uri to string
before writing and parse back the Uri when reading.

Long term solution:
Object written to memento needs to be serialized using a custom
serializer that validates all values before writing and after reading.
--------------------
Commit message for microsoft/vscode-python@83fff4f:

Fix for env creation errors (microsoft/vscode-python#20075)

1. We ensure that non-zero error codes are handled
2. We show error message, with got to logs, and select interpreter.
3. Uses conda base environment to find base python.

Fixes: microsoft/vscode-python#20072
Fixes: microsoft/vscode-python#20062
--------------------
Commit message for microsoft/vscode-python@654fd19:

Add to release notes (microsoft/vscode-python#19943)

Adding clarity to release notes which I found helpful after going
through the process myself. Currently a draft PR as I will make more
changes Wednesday after next steps in process
--------------------
Commit message for microsoft/vscode-python@2d53622:

Bump actions/checkout from 2 to 3 (microsoft/vscode-python#20059)

Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to
3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/checkout/releases">actions/checkout's
releases</a>.</em></p>
<blockquote>
<h2>v3.0.0</h2>
<ul>
<li>Updated to the node16 runtime by default
<ul>
<li>This requires a minimum <a
href="https://github.com/actions/runner/releases/tag/v2.285.0">Actions
Runner</a> version of v2.285.0 to run, which is by default available in
GHES 3.4 or later.</li>
</ul>
</li>
</ul>
<h2>v2.5.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Update <code>@​actions/core</code> to 1.10.0 by <a
href="https://github.com/rentziass"><code>@​rentziass</code></a> in <a
href="https://github-redirect.dependabot.com/actions/checkout/pull/962">actions/checkout#962</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/checkout/compare/v2...v2.5.0">https://github.com/actions/checkout/compare/v2...v2.5.0</a></p>
<h2>v2.4.2</h2>
<h2>What's Changed</h2>
<ul>
<li>Add set-safe-directory input to allow customers to take control. (<a
href="https://github-redirect.dependabot.com/actions/checkout/issues/770">#770</a>)
by <a
href="https://github.com/TingluoHuang"><code>@​TingluoHuang</code></a>
in <a
href="https://github-redirect.dependabot.com/actions/checkout/pull/776">actions/checkout#776</a></li>
<li>Prepare changelog for v2.4.2. by <a
href="https://github.com/TingluoHuang"><code>@​TingluoHuang</code></a>
in <a
href="https://github-redirect.dependabot.com/actions/checkout/pull/778">actions/checkout#778</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/checkout/compare/v2...v2.4.2">https://github.com/actions/checkout/compare/v2...v2.4.2</a></p>
<h2>v2.4.1</h2>
<ul>
<li>Fixed an issue where checkout failed to run in container jobs due to
the new git setting <code>safe.directory</code></li>
</ul>
<h2>v2.4.0</h2>
<ul>
<li>Convert SSH URLs like <code>org-&lt;ORG_ID&gt;@github.com:</code> to
<code>https://github.com/</code> - <a
href="https://github-redirect.dependabot.com/actions/checkout/pull/621">pr</a></li>
</ul>
<h2>v2.3.5</h2>
<p>Update dependencies</p>
<h2>v2.3.4</h2>
<ul>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/379">Add
missing <code>await</code>s</a></li>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/360">Swap
to Environment Files</a></li>
</ul>
<h2>v2.3.3</h2>
<ul>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/345">Remove
Unneeded commit information from build logs</a></li>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/326">Add
Licensed to verify third party dependencies</a></li>
</ul>
<h2>v2.3.2</h2>
<p><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/320">Add
Third Party License Information to Dist Files</a></p>
<h2>v2.3.1</h2>
<p><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/284">Fix
default branch resolution for .wiki and when using SSH</a></p>
<h2>v2.3.0</h2>
<p><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/278">Fallback
to the default branch</a></p>
<h2>v2.2.0</h2>
<p><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/258">Fetch
all history for all tags and branches when fetch-depth=0</a></p>
<h2>v2.1.1</h2>
<p>Changes to support GHES (<a
href="https://github-redirect.dependabot.com/actions/checkout/pull/236">here</a>
and <a
href="https://github-redirect.dependabot.com/actions/checkout/pull/248">here</a>)</p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/actions/checkout/blob/main/CHANGELOG.md">actions/checkout's
changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<h2>v3.1.0</h2>
<ul>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/939">Use
<code>@​actions/core</code> <code>saveState</code> and
<code>getState</code></a></li>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/922">Add
<code>github-server-url</code> input</a></li>
</ul>
<h2>v3.0.2</h2>
<ul>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/770">Add
input <code>set-safe-directory</code></a></li>
</ul>
<h2>v3.0.1</h2>
<ul>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/762">Fixed
an issue where checkout failed to run in container jobs due to the new
git setting <code>safe.directory</code></a></li>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/744">Bumped
various npm package versions</a></li>
</ul>
<h2>v3.0.0</h2>
<ul>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/689">Update
to node 16</a></li>
</ul>
<h2>v2.3.1</h2>
<ul>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/284">Fix
default branch resolution for .wiki and when using SSH</a></li>
</ul>
<h2>v2.3.0</h2>
<ul>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/278">Fallback
to the default branch</a></li>
</ul>
<h2>v2.2.0</h2>
<ul>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/258">Fetch
all history for all tags and branches when fetch-depth=0</a></li>
</ul>
<h2>v2.1.1</h2>
<ul>
<li>Changes to support GHES (<a
href="https://github-redirect.dependabot.com/actions/checkout/pull/236">here</a>
and <a
href="https://github-redirect.dependabot.com/actions/checkout/pull/248">here</a>)</li>
</ul>
<h2>v2.1.0</h2>
<ul>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/191">Group
output</a></li>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/199">Changes
to support GHES alpha release</a></li>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/184">Persist
core.sshCommand for submodules</a></li>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/163">Add
support ssh</a></li>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/179">Convert
submodule SSH URL to HTTPS, when not using SSH</a></li>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/157">Add
submodule support</a></li>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/144">Follow
proxy settings</a></li>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/141">Fix
ref for pr closed event when a pr is merged</a></li>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/128">Fix
issue checking detached when git less than 2.22</a></li>
</ul>
<h2>v2.0.0</h2>
<ul>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/108">Do
not pass cred on command line</a></li>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/107">Add
input persist-credentials</a></li>
<li><a
href="https://github-redirect.dependabot.com/actions/checkout/pull/104">Fallback
to REST API to download repo</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/actions/checkout/commit/93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8"><code>93ea575</code></a>
Prepare release v3.1.0 (<a
href="https://github-redirect.dependabot.com/actions/checkout/issues/940">#940</a>)</li>
<li><a
href="https://github.com/actions/checkout/commit/6a84743051be17cee477b0a26bd866b5dba996e4"><code>6a84743</code></a>
Bump <code>@​actions/core</code> to 1.10.0 (<a
href="https://github-redirect.dependabot.com/actions/checkout/issues/939">#939</a>)</li>
<li><a
href="https://github.com/actions/checkout/commit/e6d535c99c374d0c3f6d8cd8086a57b43c6c700a"><code>e6d535c</code></a>
Inject GitHub host to be able to clone from another GitHub instance (<a
href="https://github-redirect.dependabot.com/actions/checkout/issues/922">#922</a>)</li>
<li><a
href="https://github.com/actions/checkout/commit/2541b1294d2704b0964813337f33b291d3f8596b"><code>2541b12</code></a>
Prepare changelog for v3.0.2. (<a
href="https://github-redirect.dependabot.com/actions/checkout/issues/777">#777</a>)</li>
<li><a
href="https://github.com/actions/checkout/commit/0ffe6f9c5599e73776da5b7f113e994bc0a76ede"><code>0ffe6f9</code></a>
Add set-safe-directory input to allow customers to take control. (<a
href="https://github-redirect.dependabot.com/actions/checkout/issues/770">#770</a>)</li>
<li><a
href="https://github.com/actions/checkout/commit/dcd71f646680f2efd8db4afa5ad64fdcba30e748"><code>dcd71f6</code></a>
Enforce safe directory (<a
href="https://github-redirect.dependabot.com/actions/checkout/issues/762">#762</a>)</li>
<li><a
href="https://github.com/actions/checkout/commit/add3486cc3b55d4a5e11c8045058cef96538edc7"><code>add3486</code></a>
Patch to fix the dependbot alert. (<a
href="https://github-redirect.dependabot.com/actions/checkout/issues/744">#744</a>)</li>
<li><a
href="https://github.com/actions/checkout/commit/5126516654c75f76bca1de45dd82a3006d8890f9"><code>5126516</code></a>
Bump minimist from 1.2.5 to 1.2.6 (<a
href="https://github-redirect.dependabot.com/actions/checkout/issues/741">#741</a>)</li>
<li><a
href="https://github.com/actions/checkout/commit/d50f8ea76748df49594d9b109b614f3b4db63c71"><code>d50f8ea</code></a>
Add v3.0 release information to changelog (<a
href="https://github-redirect.dependabot.com/actions/checkout/issues/740">#740</a>)</li>
<li><a
href="https://github.com/actions/checkout/commit/2d1c1198e79c30cca5c3957b1e3b65ce95b5356e"><code>2d1c119</code></a>
update test workflows to checkout v3 (<a
href="https://github-redirect.dependabot.com/actions/checkout/issues/709">#709</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/actions/checkout/compare/v2...v3">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=2&new-version=3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
--------------------
Commit message for microsoft/vscode-python@a074e8b:

Updating package.json for Create Env tile  (microsoft/vscode-python#20066)

Updated package.json to include a Create Environment tile in the Python
Getting Started walkthrough if there is a workspace open. If there is no
workspace open, it will default to the normal Getting Started
walkthrough with the Select Interpreter tile.

This also incorporates the new walkthrough artwork.

Co-authored-by: Kartik Raj <karraj@microsoft.com>
Co-authored-by: Luciana Abud <45497113+luabud@users.noreply.github.com>

Lead-authored-by: Kartik Raj <karraj@microsoft.com>
Co-authored-by: Heejae Chang <1333179+heejaechang@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Eleanor Boyd <eleanorboyd@microsoft.com>
Co-authored-by: Jonathan McPherson <jonathan@rstudio.com>
Co-authored-by: Karthik Nadig <kanadig@microsoft.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-environments Features relating to handling interpreter environments author-verification-requested Issues potentially verifiable by issue author bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster needs PR Ready to be worked on verification-steps-needed Steps to verify are needed for verification verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants