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

Plugin broker should only make necessary changes to plugins #13452

Closed
amisevsk opened this issue May 30, 2019 · 6 comments
Closed

Plugin broker should only make necessary changes to plugins #13452

amisevsk opened this issue May 30, 2019 · 6 comments
Labels
area/plugin-broker kind/enhancement A feature request - must adhere to the feature request template.
Milestone

Comments

@amisevsk
Copy link
Contributor

Description

Currently, the plugin broker functions as follows:

  1. Delete all plugins (clear the /plugins directory) -- che-plugin-init-broker
  2. Download plugins specified in workspace attributes.

This means that every time a workspace is started without being modified, we do a lot of unnecessary work. This is especially a problem when preparing some plugins can take significant time. For a non-ephemeral workspace, if it hasn't been modified, the broker only needs to process the relevant configuration and return it to the server.

This issue will get worse as more plugins are added to workspaces.

Reproduction Steps

Start any Che 7 workspace with plugins installed:

Starting Init Plugin Broker
Cleaning /plugins dir
Unified Che Plugin Broker
List of plugins and editors to install
- eclipse/che-machine-exec-plugin/0.0.1 - Che Plug-in with che-machine-exec service to provide creation terminal or tasks for Eclipse CHE workspace machines.
- redhat/java/0.38.0 - Java Linting, Intellisense, formatting, refactoring, Maven/Gradle support and more...
- eclipse/che-theia/next - Eclipse Theia, get the latest release each day.
@nickboldt
Copy link
Contributor

If the gist here is "don't delete every time, only delete if we have new stuff" then +1.

Question. There's a "my lang server has died" workaround which is to simply refresh the browser (cough: #13427 /cough) ... how would changing this behaviour impact the ability to force a workspace refresh via F5 ? Would we need a mechanism to force delete, if we're no longer deleting everything every time?

@amisevsk
Copy link
Contributor Author

@nickboldt The deletion happens only once, before workspace startup. My goal with this issue is to have the plugin broker resolve workspace state at startup, by e.g.

  1. Check which plugins are installed in the workspace currently (in /plugins)
  2. Check which plugins are included in the devfile
  3. Reconcile the two (delete installed plugins not in the devfile, install plugins in devfile but not /plugins)

The only roadblock currently is that the plugin broker doesn't know or care which plugins are already installed, it just wipes the directory blindly. Implementing this could be as simple as just storing some json in /plugins but I haven't looked into it too much.

As for a running workspace, nothing changes (refreshing the workspace behaves identically)

@nickboldt
Copy link
Contributor

+1 for this solution as it'd be one less container I have to migrate to UBI8 and productize. ;) and then one less to support (CVE fixes, CEE questions, docs, etc.)

@nickboldt nickboldt added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Aug 14, 2019
@nickboldt nickboldt added this to the 7.1.0 milestone Aug 14, 2019
@nickboldt
Copy link
Contributor

Setting need-triage and milestone 7.1 so we can discuss when/if this can be done.

@ibuziuk ibuziuk added status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Aug 19, 2019
@ibuziuk ibuziuk removed the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Aug 26, 2019
@ibuziuk ibuziuk modified the milestones: 7.1.0, 7.2.0 Aug 26, 2019
@ibuziuk
Copy link
Member

ibuziuk commented Aug 26, 2019

Moving to 7.2.0 for now, this issue is going to be discussed during the pre-planning for the next sprint

@ibuziuk
Copy link
Member

ibuziuk commented Sep 23, 2019

Closing. in favour of plugin broker refactoring - #14494

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/plugin-broker kind/enhancement A feature request - must adhere to the feature request template.
Projects
None yet
Development

No branches or pull requests

3 participants