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

Increase plug-in manager functionalities #387

Closed
5 tasks
SlnPons opened this issue Jan 5, 2023 · 6 comments · Fixed by #413
Closed
5 tasks

Increase plug-in manager functionalities #387

SlnPons opened this issue Jan 5, 2023 · 6 comments · Fixed by #413
Assignees
Labels

Comments

@SlnPons
Copy link
Contributor

SlnPons commented Jan 5, 2023

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
  • Delete a plug-in that is already installed
    a. user clicks on the "delete" button
    b. user sees a pop-up from Thyra saying: are you sure you want to delete it? Yes / NO
    c. user clicks on "yes", plugin is removed from the page AND from his computer.

  • Install a plug-in that exist
    a. user clicks on install
    b. user sees the plugin listed on the page
    c. user can clicks on "access" button and a new page to the plugin opened
    d. user can use the plugin

  • see if a plug-in is
    ** Active: installed + in-use
    ** Inactive: installed + not in-use
    NB: not certain of the definition here but the idea behind active / inactive is for the user to be able to have some plugins installed but to not use them. For instance, they want to try 2 diff. wallet plugin they installed them both and decide to only use one after the other. - can be discussed!

How to

  • Create separate logs for each plug-in accessible for the user interface and remove them from thyra-server. It's a plugin thing not a thyra-server to get these logs...
  • Create script that automatically installed a plug-in on user's machine by clicking on a button
  • Create script that delete installed plug-in from user's machine by clicking on a button
  • Create a "plug-in status" in thyra plug-in manager that detects if a plug-in is in-use
  • Create sequence diagram to explain and show how thyra interacts with plugins ⚠️

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

@SlnPons SlnPons added this to the Plug-in Manager V1 milestone Jan 5, 2023
@SlnPons SlnPons added the P2 label Jan 6, 2023
@gregLibert
Copy link
Contributor

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

  • /plugin/manager
    • POST: Install a new plugin
    • GET: List all installed plugins
  • /plugin/manager/register
    • POST: Register a new plugin
  • /plugin/manager/{name}
    • GET: Retreive plugin status and logs
    • DELETE: unistall plugin
  • /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

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

  • register to thyra
  • exposing status
  • stop and restart mecanism

@gregLibert gregLibert self-assigned this Jan 12, 2023
@0xMazout
Copy link
Contributor

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
Copy link
Contributor Author

SlnPons commented Jan 13, 2023

See here exhaustive list of what the plugins will have to share with Thyra: #384

@gregLibert gregLibert linked a pull request Jan 15, 2023 that will close this issue
@SlnPons
Copy link
Contributor Author

SlnPons commented Jan 20, 2023

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
Copy link
Contributor

  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
Copy link
Contributor

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.

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

Successfully merging a pull request may close this issue.

3 participants