-
Notifications
You must be signed in to change notification settings - Fork 573
[Bug][Plugins] I try to add a new plugin but it always show "plugin already loaded" during devlake startup #8404
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
Comments
Hello @andyli86! I'm here to help you with bugs, answer your questions, and assist you in becoming a contributor. While you wait for a human maintainer, feel free to share more details or ask about anything specific! The "plugin already loaded" error occurs because the To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other |
I also tried latest v1.0.2-beta7 image still same issue. |
Hi dosubot, I have checked there is only one .so file in the container, the directory is correct because it will load all the plugins under /app/bin/plugins/ from the log devlake try to load other plugins then it fails on mine plugin only. |
The "plugin already loaded" error might be related to the logic in the Additionally, ensure that the Since you mentioned using the main branch for To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other |
the plugin name is unique, there would not any other so name register as minimal_plugin |
Search before asking
What happened
I am writing a plugin for devlake to do some customized metrics calculation, I begin by writing a minimal plugin, I write PluginEntry in plugin.go and PluginMeta etc in impl/impl.go, and the plugin can success compile and generate .so file, after I make a image with official devlake and copy .so under /app/bin/plugins, devlake will try to load it during the startup, but it always show "plugin already loaded" error message like:
I check my container there is only one minimal_plugin.so in the container, but I don't know why the devlake plugin framework say it already loaded, from the github.com/apache/incubator-devlake/core/runner.LoadGoPlugins code it is pretty straight forward just look all the folder and find each .so file then load each one... so I really confused.
What do you expect to happen
the plugin can be loaded successfully
How to reproduce
Here is what I did: I put my plugin code in a separate repo, build it to a .so file, then use a Dockerfile to copy this .so file to /app/bin/plugins and build a new image, then use the default docker-compose-dev.yaml in devlake repo to launch this image
build this docker image as devlake-minimal-test and update the docker compose yml code like below:
Anything else
No response
Version
v1.0.1
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: