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

Pre package extensions and install them on startup for users #6403

Merged
merged 12 commits into from
Feb 26, 2025

Conversation

melissa-barca
Copy link
Contributor

@melissa-barca melissa-barca commented Feb 19, 2025

Addresses #6302, #6301, #6305, #5315

Introduces the concept of "bootstrapped extensions". Bundles the following extensions as VSIX files with Positron:

  • Black
  • Posit Publisher
  • Shiny(Workbench only)
  • Quarto
  • ms-toolsai.jupyter-keymap
  • ms-toolsai.vscode-jupyter-cell-tags
  • ms-toolsai.vscode-jupyter-slideshow
  • ms-toolsai.jupyter
  • ms-pyright.pyright
  • ms-python.debugpy

When a user starts up Positron after first installing it or a version change (upgrade or downgrade), Positron will install the bootstrapped extensions for the users. Users will then be able to manage the extensions (upgrade, downgrade, uninstall, disable) themselves. Positron will always prefer whichever version of the extension in newer (bundled or user). When a user downgrades the extension, Positron will attempt to upgrade to the latest packaged version on the next upgrade, but not next Positron launch.

I changed the approach slightly from my initial spec. The initial spec built on top of the existing defaultExtensionInitializer. This approach is heavily inspired by that class but provides the server and desktop logic in src/vs/platform/extensionManagement/node/positronBootstrapExtensionsInitializer.ts.

Release Notes

New Features

  • Packages several extensions that were previously shipped a built-in extensions as user managed extensions that are installed on first launch.

Bug Fixes

  • N/A

QA Notes

@:web

Copy link

github-actions bot commented Feb 19, 2025

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

readme  valid tags

@melissa-barca melissa-barca force-pushed the bootstrap-extensions branch 2 times, most recently from d092f62 to 2b30e74 Compare February 24, 2025 16:21
@jonvanausdeln
Copy link
Contributor

The matplot lib test is failing due to missing positron-ipywidgets .. could that be something missed ?

@jonvanausdeln
Copy link
Contributor

@melissa-barca I updated so the web based tests will run on the PR as well

timtmok
timtmok previously approved these changes Feb 25, 2025
Copy link
Contributor

@timtmok timtmok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@juliasilge juliasilge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made a release build and a dev build and the extension experience is looking great!

For the failing test, I suspect what is happening is that our positron-ipywidgets extension, which is truly builtin, must somehow need one of the jupyter extensions to work and something is going wrong there. Here is our builtin extension:

https://github.com/posit-dev/positron/tree/main/extensions/positron-ipywidgets

@seeM I know you worked on this; do you have any thoughts on how our extension here uses other extensions, that we're trying not have builtin? I see there are no official dependencies for it.

@melissa-barca
Copy link
Contributor Author

Thanks @juliasilge! I suspected something like that with the test, because it started failing when I moved the Jupyter tests over but like you mentioned, I didn't see a declared dependency. I'm wondering if I should move them (or isolate the problematic one and just move that one) back to built-in and file a separate issue for that.

@juliasilge
Copy link
Contributor

If it is the main Jupyter extension, I would say that is one of the driving examples of us wanting this bundling type of experience; it would be great to resolve the failing test without moving it back to builtin.

@melissa-barca
Copy link
Contributor Author

@juliasilge I did some local testing and the tests pass when I move jupyter-renderers back to built-in. How do you feel about keeping that one?

@juliasilge
Copy link
Contributor

In the immediate short term, let's go for it! 🚀

For the slightly longer term, can you open an issue outlining why we couldn't bootstrap this one and move it to triage? We'll get it prioritized for a quick followup, to find out how to address the problem.

@melissa-barca melissa-barca merged commit ef7ceff into main Feb 26, 2025
9 checks passed
@melissa-barca melissa-barca deleted the bootstrap-extensions branch February 26, 2025 22:36
@github-actions github-actions bot locked and limited conversation to collaborators Feb 26, 2025
@melissa-barca
Copy link
Contributor Author

Follow up issue for the Jupyter Notebook Renderers extension is here: #6507

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

Successfully merging this pull request may close these issues.

5 participants