-
Notifications
You must be signed in to change notification settings - Fork 424
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
Unable to use function plugin with 1.2.0 #841
Comments
@salmanazmat666 Did you run in your local environement or Docker? I assume you have built kuiper with makefile in your local system. Then Where did you put your plugin source file? The error 'plugin was built with a different version of package github.com/emqx/kuiper/xstream/api.' indicates the path to kuiper project is different from the main kuiper project and your plugin module. If possible, can you put your plugin into kuiper's project and build from kuiper root path? If you do need a separate module, please also try to build from kuiper root path by adding your plugin module to kuiper's go.mod as below. Assume your plugin module name is github.com/sample/samplePlugin. And the project location is ../samplePlugin.
Build in the kuiper root path
|
so putting plugin file into kuiper project and compiling from kuiper root path solved the issue. |
@ngjaying I am facing exactly same issue. I am following the plugin development tutorial. It doesn't mention that plugins source code should be in the Kuiper project. Instead it recommends using "replace" in the go.mod file of plugin module.This seems to work with v1.1.1 but not for v1.2.0. Can you please shed some light on this? Also what is the recommended method for writing plugins for production environment? For us Kuiper will be running in docker container & we would want to add more plugins without modifying the Kuiper docker image. |
@zeeshanshabbir93 I think you can either putting your plugin into Kuiper module or have a separate module.
The recommended way is to build in the dev docker container with tag like "emqx/kuiper:1.2.0", export the plugin zip and use REST/CLI to install in the production docker container with tag like "emqx/kuiper:1.2.0-slim". In eKuiper's CI, we do build those shipped plugins by this way, and upload them to a central location like |
Thanks |
Hi,
I'm trying to use a custom function plugin with kuiper v1.2.0. The plugin is built successfully, but when I use it in a rule, I get following error.
The function is just a copy of echo example that comes with the source code, the actual code can be found attached here. zee.txt
I get two different errors depending upon whether I compile the plugin using
-trimpath
flag or not.Without
-trimpath
I get following error.With
-trimpath
, I get following errorThis issue does not appear with kuiper 1.1.1 (I compiled without
-trimpath
), and the rule works correctly.I'm using
go1.15.7
.The text was updated successfully, but these errors were encountered: