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

Make it easy to test plugins, and Implement test suite for them. #481

Open
Miro-Andrin opened this issue Sep 24, 2021 · 1 comment
Open

Comments

@Miro-Andrin
Copy link
Contributor

Context

Currently there is no automated/easy way to test quill plugins. Making it hard to detect regressions.
We need a way of easily compile multiple plugins and run them on a server. We also need a way
for plugins to signal if something bad has happened.

I believe there are many layers to this issue, and that a good approach would be to split it up into
some smaller improvements, that in them selves probably are a good idea, but that as a whole
gives us the desired result.

Here is what i suggest. If you believe this is wrong, and a better approach exists, then do tell.
Is there a different route to a similar solution, or maybe some of this is already partly implemented?

Improve cargo-quill

I suggest adding a command to cargo quill that given a feather server (binary or source code directory) , and one or more plugins (either as a .plugin file or source code). Does the necessary compiling, moves the plugins into the correct spot, and starts the server. The command should support a flag for specifying if a native or wasm plugin should be generated.

Add sport for plugins to stop.

Add an api to plugins for them to signal that they are done . Basically a way for plugins to unload themselves,
with a success or error code. Maybe even a short plugin message could be printed to the console.

Add a test mode

Finally we add a flag like --test-plugins to the server binary. If this flag is set, then the server starts every plugin,
and runs them until all plugins have unloaded themselves. Finally printing what plugins ended in an error state.

With all of these steps combined it should be straight forward to create a script to automatically test plugins before
merges.

@ambeeeeee
Copy link
Contributor

ambeeeeee commented Sep 25, 2021

(the main reason I wanted to revert was to fix code quality issues that just pushed me to actually do it instead of doing literally anything else like I had been)

I still agree with the idea!

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

No branches or pull requests

2 participants