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

Track all extension hosts in runtime startup service (#5939) #5960

Merged
merged 1 commit into from
Jan 11, 2025

Conversation

dhruvisompura
Copy link
Contributor

Description

Addresses #5718

The web build of Positron was showing the "No interpreters found" dialog to users even if an interpreter was found. This bug is only present on the web build because there are two extension hosts for the web build. VS Code has a 'web extension host' that runs installed extensions in the browser. Thus the Positron web build has this additional 'web extension host'.

For our case, the 'web extension host' will never find any interpreters during the runtime startup process. When the 'web extension host' completes discovery before the extension host does, our list of registered runtimes will be empty which causes the "No interpreters found" dialog to be shown.

The runtime startup service needs to know about the existence of all extension hosts and wait for all of the extension hosts to complete their own language runtime discovery.

Release Notes

New Features

  • N/A

Bug Fixes

  • The web build of Positron no longer shows the "No interpreters found" dialog when interpreters are found. The runtime startup process now waits for all extension hosts to complete runtime discovery.

QA Notes

  • Verify the "No interpreters found" dialog is not shown when there are interpreters.
  • Verify the "No interpreters found" dialog is shown only ONCE when there aren't any interpreters.
    • The following scenarios cover when the dialog can be shown:
    • There are no Python/R installations at all
  • There are only outdated versions of Python/R installed which we do not support, e.g. only having R 4.1 installed on the machine (we currently support 4.2+)
  • The Python/R installations are in hidden locations that Positron does not check

Screenshots

Web Build - No Interpreters

Screen.Recording.2025-01-09.at.11.29.45.AM.mov

Web Build - Interpreters Found

Screen.Recording.2025-01-09.at.11.30.33.AM.mov

### Description

Addresses #5718 

The web build of Positron was showing the "No interpreters found" dialog
to users even if an interpreter was found. This bug is only present on
the web build because there are two extension hosts for the web build.
VS Code has a 'web extension host' that runs installed extensions in the
browser. Thus the Positron web build has this additional 'web extension
host'.

For our case, the 'web extension host' will never find any interpreters
during the runtime startup process. When the 'web extension host'
completes discovery before the extension host does, our list of
registered runtimes will be empty which causes the "No interpreters
found" dialog to be shown.

The runtime startup service needs to know about the existence of all
extension hosts and wait for all of the extension hosts to complete
their own language runtime discovery.

### Release Notes


#### New Features

- N/A

#### Bug Fixes

- The web build of Positron no longer shows the "No interpreters found"
dialog when interpreters are found. The runtime startup process now
waits for all extension hosts to complete runtime discovery.


### QA Notes
- [ ] Verify the "No interpreters found" dialog is not shown when there
are interpreters.
- [ ] Verify the "No interpreters found" dialog is shown only ONCE when
there aren't any interpreters.
  -  The following scenarios cover when the dialog can be shown:
    - There are no Python/R installations at all
- There are only outdated versions of Python/R installed which we do not
support, e.g. only having R 4.1 installed on the machine (we currently
support 4.2+)
- The Python/R installations are in hidden locations that Positron does
not check

### Screenshots

**Web Build - No Interpreters**


https://github.com/user-attachments/assets/5247d580-5eb7-44d5-8b75-1ff7b1f29565


**Web Build - Interpreters Found**


https://github.com/user-attachments/assets/adaa925b-5b0b-4f2e-bd7b-2690853138af
Copy link

E2E Tests 🚀  ?
This PR will run tests tagged with: @critical

@dhruvisompura
Copy link
Contributor Author

Backporting 11d5ddf for our prerelease for workbench. This bugfix only effected web builds and should resolve #5718 that we were seeing.

Note, that this hasn't been verified on main yet should we should wait to merge this until we get the final 👍🏻 from QA.

@petetronic petetronic merged commit dd2ce4b into prerelease/2025.01 Jan 11, 2025
6 checks passed
@petetronic petetronic deleted the 2025.01/no-interpreters-found-bugfix branch January 11, 2025 19:40
@github-actions github-actions bot locked and limited conversation to collaborators Jan 11, 2025
@posit-dev posit-dev unlocked this conversation Jan 11, 2025
@petetronic
Copy link
Collaborator

petetronic commented Jan 11, 2025

Apologies, I saw #5939 was merged and closed, but missed that you commented you wanted QA to test a main release first to close #5718. I was expecting we'd first fix this on this branch, then forward port to main.

@petetronic
Copy link
Collaborator

petetronic commented Jan 11, 2025

I was able to open qa-example-content in Web on both prerelease/2025.01 and main branches and saw interpreters discovered and start just fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants