Remove experimental loadable Go plugin support#51320
Conversation
The loadable Go plugin support was experimental: it was opt-in via the `--plugin` flag, which loaded Go plugin bundles at startup and logged an "experimental" warning when used. It was never promoted to a stable feature and no plugins were ever shipped. This removes the libbeat/plugin package, the `--plugin` flag, and the related plugin registration helpers (Plugin, RegisterLoader, MustRegisterLoader) across libbeat, filebeat, heartbeat, metricbeat and packetbeat, along with the global plugin registry, which was a package-level global variable. Relates: elastic#44903 Co-authored-by: Lee E. Hinman <lee.e.hinman@elastic.co>
🤖 GitHub commentsJust comment with:
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (23)
💤 Files with no reviewable changes (21)
📝 WalkthroughWalkthroughThe PR removes the experimental Go plugin system from libbeat and all dependent beats. The entire 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Pinging @elastic/obs-ds-hosted-services (Team:obs-ds-hosted-services) |
|
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
|
Pinging @elastic/sec-linux-platform (Team:Security-Linux Platform) |
This comment has been minimized.
This comment has been minimized.
|
Building x-pack/filebeat on MacOS, it looks like just this PR shrinks it from 178M to 158M when compared to main. |
On linux it goes from 246M to 195M for me. |
rdner
left a comment
There was a problem hiding this comment.
The change looks good to me.
The packaging step on ARM is failing, I tried to restart but looks like the failure is legit.
Also the linter issues need to be resolved.
Yes this is blocked until quark backports elastic/go-quark@12841a4 in 0.3.0 that beats is using or we upgrade to CC @haesbaert |
Heya, I think the linker likely changed, since that symbol never really existed in arm64, that's pretty much the issue the wolfi people stumbled and hence we did the fix. I'll update quark, the API changed a bit so more things are likely needed, but it's time to do it anyway. |
leehinman
left a comment
There was a problem hiding this comment.
Thanks for picking this up. LGTM.
|
Putting in draft mode as it's blocked on #51320 (comment) |
TL;DRThe Remediation
Investigation detailsRoot CauseThe failure occurs during Evidence
Verification
What is this? | From workflow: PR Buildkite Detective Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. |
|
This pull request is now in conflicts. Could you fix it? 🙏 |
# Conflicts: # filebeat/input/plugin.go # libbeat/autodiscover/appenders/registry.go # libbeat/autodiscover/builder/plugin.go # libbeat/autodiscover/providers/plugin.go # libbeat/outputs/codec/plugin.go # libbeat/outputs/plugin.go # libbeat/plugin/load.go # libbeat/plugin/plugin.go # libbeat/processors/add_kubernetes_metadata/registry.go # libbeat/processors/registry.go # metricbeat/module/plugin.go # x-pack/libbeat/processors/add_nomad_metadata/registry.go
Proposed commit message
Checklist
I have made corresponding change to the default configuration filesI have added tests that prove my fix is effective or that my feature works. Where relevant, I have used thestresstest.shscript to run them under stress conditions and race detector to verify their stability../changelog/fragmentsusing the changelog tool.Disruptive User Impact
The plugin support was experimental and no plugins were ever shipped, so no stable functionality is affected. The
--pluginflag is no longer recognized and anyone who compiled their own Go plugins against these experimental APIs will no longer be able to load them.How to test this PR locally
Confirm the
--pluginflag is gone, e.g.filebeat --helpno longer lists it.Related issues