-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 refactoring #14494
Comments
cc: @ibuziuk @davidfestal @l0rd @nickboldt your thoughts? |
That seems a very good and clear explanation and I fully agree with proposed changes. |
Is metadata broker an interim solution until we have a plugin broker REST service that we can add this functionality into? |
It is planned to be a library, also available for the Che Worskpace CRD operator (which already uses the broker as a library). However it would be a Go library, and the Che server is a Java application... |
The metadata broker is basically just a copy-paste of the current broker code, with some light re-writing. I think it's a necessary step regardless of what we do -- as for where it ends up, that's up to PMs. I think keeping it as a Go library is important for the Che operator, so I don't know how we would integrate it into the Che server, but it could be reworked into a standalone service, run as a sidecar on the registry, or be a part of the registry itself. |
The incremental change in merging the refactor would require updating Che and the operator to
Once the two steps are separated, it would be possible to move each broker separately with less effort. |
@amisevsk nice work! I thought that metadata broker should become part of the che-server too (as a library reused by the quarkus app in the workspace CRD) but if it need be written in Go it makes sense to integrate it in the plugin registry. And for the artifact broker I was thinking about it as part of the plugin registry (that's where the caching of the vsix should naturally happen). The init container would only run a 3 lines bash script that downloads the list of vsix. But honestly these are implementation details. The important thing is to satisfy the requirements you mention in the issue description. And your solution seems to do it. |
@l0rd I agree that the init container situation could be simplified (basically we only need a list of extensions); my reason for maintaining the current broker approach for now is
In my ideal case, the plugin registry (once it is reworked into an actual REST API) would
|
The data flow with the refactor would be something like We could fairly easily close the green loop by incorporating the metadata step into the registry (since it's pretty much static computation) -- this is the |
The relevant PRs are finally open:
Changes can be tested by starting a Che server using the CI image
|
The refactor changes have been merged into Che master. |
Moved to milestone 7.8 as that's where it was delivered. "Backlog" makes it seem like it wasn't done. :) |
This issue is to collect the various open design-level issues for the plugin broker and discuss the path forward.
Current Issues
REST backend/merge plugin and devfile registries:Merge devfile and plugin registries #14268Current broker functionality
The current version of the plugin broker (
v0.20
), broadly, does two things:This is done in one image (ignoring the init broker for now); the broker takes plugin FQNs, downloads
meta.yaml
s, converts thosemeta.yaml
s to Che Plugins, and downloads their artifacts.Proposed changes
The plugin broker should be refactored into two images with separate concerns;
/plugins
or/plugins/sidecars
)A proof-of-concept implementation is available in my fork: https://github.com/eclipse/che-plugin-broker/compare/master...amisevsk:refactor-brokers?ts=4
These changes would address the issues listed above
/plugins
to download artifacts. The metadata broker could easily be adapted into a library or service that runs separate from workspace starts/stopsAdditionally, one improvement with this approach is that it removes the clumsy way we run the broker in ephemeral workspaces (run the entire broker and download everything twice). The metadata broker can run separately to get the workspace configuration information, and then the artifact broker can run as an init container on the workspace pod.
Alternatives
One goal would be to get rid of the plugin broker altogether. This would likely involve reworking Theia to do this fetching at startup. Even in this case, the refactor above would be useful, as it would easily allow separate deprecation of broker functions (i.e. we could deprecate/move the metadata broker to the registry and deprecate the artifact broker when Theia has this functionality).
Summary
Workspace startup with and without changes (ephemeral workspace to show worst-case process):
The text was updated successfully, but these errors were encountered: