massalabs / station

A gateway to the Massa blockchain
https://station.massa.net
27 stars 107 forks source link

Increase plug-in manager functionalities #387

Closed SlnPons closed 1 year ago

SlnPons commented 1 year ago

Context Today, our plug-in manager has very limited functionalities. It can run a manually installed plug-in on a certain port and read some info. The objective of this ticket is to extend its capabilities by allowing it to install, detect the status and uninstall plugins automatically.

User flow

  1. User installs and runs Thyra
  2. User accesses the plug-in manager page
  3. From the plug-in manager page, user can

How to

Technical details Give the technical insights so anyone in the team can tackle the tasks - Dev

QA testing Does this task require some QA tests ? If yes, explain how to validate it

gregLibert commented 1 year ago

My suggestion is to construct the following API on Thyra side:

To work end-to-end implies to add some new functionalities on the plugin side:

0xMazout commented 1 year ago

What i would need from my side atm is when i call get plugin/manager to have per plugin :

Name : string : name of the plugin Description : string : describe the plugin with a sentence to display it has a tooltip Status : bool : is it ready to launch or not Logo : string :Url to load the image of the plugin

SlnPons commented 1 year ago

See here exhaustive list of what the plugins will have to share with Thyra: https://github.com/massalabs/thyra/issues/384

SlnPons commented 1 year ago

Hey @gregLibert

  1. what's the difference between: GET /mgnt/plugins => retrieve the list of plugins and GET /plugin-manager => retrieve the list of plugins

  2. I don't see the following endpoints created? /plugin/manager/{name}/restart POST: Restart a remote plugin /plugin/manager/{name}/stop POST: Stop a remote plugin /plugin/manager/{name}/start POST: Start a remote plugin

Why? Should we address them separetly? If we talked about it, sorry :/, I don't remember the rational behind not doing it now.

gregLibert commented 1 year ago
  1. what's the difference between: GET /mgnt/plugins => retrieve the list of plugins and GET /plugin-manager => retrieve the list of plugins

/plugin-manager is the new plugin manager. I guess that /mgnt/plugins is the old version

gregLibert commented 1 year ago

2. I don't see the following endpoints created? /plugin/manager/{name}/restart POST: Restart a remote plugin /plugin/manager/{name}/stop POST: Stop a remote plugin /plugin/manager/{name}/start POST: Start a remote plugin

Why? Should we address them separetly? If we talked about it, sorry :/, I don't remember the rational behind not doing it now.

Yeah, no time to takle that. Sorry. To be done in another issue.