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

Wrong environment selected in language status bar item after selecting Recreate Venv #21888

Open
joyceerhl opened this issue Aug 29, 2023 · 5 comments
Labels
area-environments Features relating to handling interpreter environments bug Issue identified by VS Code Team member as probable bug needs proposal Need to make some design decisions

Comments

@joyceerhl
Copy link

joyceerhl commented Aug 29, 2023

Testing #21878

  1. Have a venv with Python 3.10
  2. Recreate it through Create Environment command, choose to create it with Python 3.11
  3. While creating, status bar says Python 3.11 🆒
  4. 🐛 after showing confirmation toast saying that the current environment is selected, the status bar item reverts to Python 3.10
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Aug 29, 2023
@karthiknadig
Copy link
Member

@joyceerhl Can you share the logs when this occurs. I just want to make sure that the selection is correct.

@github-actions github-actions bot added the info-needed Issue requires more information from poster label Aug 29, 2023
@karthiknadig karthiknadig added bug Issue identified by VS Code Team member as probable bug area-environments Features relating to handling interpreter environments info-needed Issue requires more information from poster triage-needed Needs assignment to the proper sub-team and removed info-needed Issue requires more information from poster triage-needed Needs assignment to the proper sub-team labels Aug 29, 2023
@joyceerhl
Copy link
Author

It seems to be some kind of caching issue, because if I load into the window, initially the status bar item says 3.10, then when I click on the status bar item, the picker displays some progress and then correctly updates to say 3.11

During environment recreation:
image

After environment recreation:
image

logs.zip

@karrtikr
Copy link

karrtikr commented Sep 5, 2023

I can intermittently reproduce this issue on Windows, whether the Python version updates depends on whether VS Code sends us the creation and deletion events. It seems like the deletion & re-creation is so fast VS Code fires no event regarding the change, hence version isn't updated, can be confirmed from the logs.

Some options:

  • Close it as limitation of VS Code watchers
  • Have creation environment wait before re-creating
  • Have create environment component signal to discovery component to reset env info

@karthiknadig I'll leave it up to you on what options we would like to go with here.

@karrtikr karrtikr added needs proposal Need to make some design decisions and removed triage-needed Needs assignment to the proper sub-team labels Sep 5, 2023
@karrtikr karrtikr assigned karthiknadig and unassigned karrtikr Sep 5, 2023
@github-actions github-actions bot added the info-needed Issue requires more information from poster label Sep 5, 2023
@karthiknadig
Copy link
Member

I would go with this option:

  • Have create environment component signal to discovery component to reset env info

Basically an internal api that we cause use to trigger forced update of environment info.

@github-actions
Copy link

github-actions bot commented Oct 6, 2023

Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on, then we will be happy to re-open this issue to pick up where we left off.

Happy Coding!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 6, 2023
@karrtikr karrtikr reopened this Oct 6, 2023
@karrtikr karrtikr removed the info-needed Issue requires more information from poster label Oct 6, 2023
@karrtikr karrtikr removed their assignment Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-environments Features relating to handling interpreter environments bug Issue identified by VS Code Team member as probable bug needs proposal Need to make some design decisions
Projects
None yet
Development

No branches or pull requests

3 participants