Skip to content

[plugins] Remove support for go plugins#45840

Closed
leehinman wants to merge 2 commits into
elastic:mainfrom
leehinman:44903c_remove_libbeat_plugin
Closed

[plugins] Remove support for go plugins#45840
leehinman wants to merge 2 commits into
elastic:mainfrom
leehinman:44903c_remove_libbeat_plugin

Conversation

@leehinman

@leehinman leehinman commented Aug 7, 2025

Copy link
Copy Markdown
Contributor

Proposed commit message

Remove support for go plugins. No plugins were ever shipped and this removes the plugin registry which was a package level global variable. The package level global variable needs to be removed for beatreceivers where multiple instance of beat receivers will exist in one process.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Disruptive User Impact

Should be none since we didn't ship any plugins. However, if someone compiled their own plugins this would be a breaking change.

Author's Checklist

  • [ ]

How to test this PR locally

Run integration tests

Related issues

Use cases

Screenshots

Logs

@botelastic botelastic Bot added the needs_team Indicates that the issue/PR needs a Team:* label label Aug 7, 2025
@github-actions

github-actions Bot commented Aug 7, 2025

Copy link
Copy Markdown
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@leehinman leehinman added the Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team label Aug 7, 2025
@botelastic botelastic Bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Aug 7, 2025
@leehinman leehinman added cleanup needs_team Indicates that the issue/PR needs a Team:* label labels Aug 7, 2025
@botelastic botelastic Bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Aug 7, 2025
@mergify

mergify Bot commented Aug 7, 2025

Copy link
Copy Markdown
Contributor

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @leehinman? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-8./d is the label to automatically backport to the 8./d branch. /d is the digit
  • backport-active-all is the label that automatically backports to all active branches.
  • backport-active-8 is the label that automatically backports to all active minor branches for the 8 major.
  • backport-active-9 is the label that automatically backports to all active minor branches for the 9 major.

@leehinman leehinman added the backport-skip Skip notification from the automated backport with mergify label Aug 7, 2025
@leehinman leehinman changed the title first pass [plugins] Remove support for go plugins Aug 7, 2025
@leehinman leehinman force-pushed the 44903c_remove_libbeat_plugin branch 6 times, most recently from 652d12c to 7de76a1 Compare August 8, 2025 18:13
@leehinman leehinman force-pushed the 44903c_remove_libbeat_plugin branch 5 times, most recently from bf2d2c9 to 404c3ca Compare August 11, 2025 19:54
@leehinman leehinman marked this pull request as ready for review August 11, 2025 21:50
@leehinman leehinman requested review from a team as code owners August 11, 2025 21:50
@leehinman leehinman requested review from mauri870 and rdner August 11, 2025 21:50
@elasticmachine

Copy link
Copy Markdown
Contributor

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

Comment thread go.mod
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/consumption/armconsumption => github.com/elastic/azure-sdk-for-go/sdk/resourcemanager/consumption/armconsumption v1.1.0-elastic
github.com/apoydence/eachers => github.com/poy/eachers v0.0.0-20181020210610-23942921fe77 //indirect, see https://github.com/elastic/beats/pull/29780 for details.
github.com/dop251/goja => github.com/elastic/goja v0.0.0-20190128172624-dd2ac4456e20
github.com/elastic/go-quark => github.com/leehinman/go-quark v0.3.1

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will have to be switched back to official elastic go-quark repo. The only change between this and official v0.3.0 is a backport of elastic/go-quark@12841a4 which allows linking to the correct GLIBC version depending on OS arch.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we can just require the particular commit instead of a fork here, since we plan to go back to the elastic package anyway.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My approval is pending the removal of this replace statement :)

@mauri870 mauri870 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I did a quick search and could not find any more references to plugins in the codebase.

@rdner rdner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought the whole idea behind plugins was to let users to extend Beats functionality.

How can we be so sure that by deleting the plugin support we would not disrupt our users?

Some of the plugin support was added by external contributors (autodiscover). I personally don't have enough confidence to completely delete the plugin support.

@@ -1,48 +0,0 @@
// Licensed to Elasticsearch B.V. under one or more contributor

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The autodiscover plugin support was an external contribution #6457

This makes me believe someone somewhere might be using it. How can we be sure?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we can send an email to the contributors mailing list?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If so, I think it should not be limited to just autodiscover plugins.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plugins originally came from #3217 and depend on https://pkg.go.dev/plugin#hdr-Warnings.

There are no tests or documentation, the chances of anyone successfully using this is very low but I can find references to people trying to use them in discuss:

https://discuss.elastic.co/search?q=plugin%20%23elastic-stack%3Abeats

That's someone trying and failing to write a plugin and another one that claims plugins aren't supported by a non-elastic user. A lot of the time "plugin" is used for someone else like "module" or writing a custom processor or output in a forked Beats repository.

I think I'm pro removal overall, if we were getting a lot of questions about this we probably would have deprecated it already.

@rdner rdner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed with @mauri870 and @cmacknz it's good to go.

@pierrehilbert

Copy link
Copy Markdown
Contributor

@nfritts / @bturquet could we have someone to review here please?

@pierrehilbert pierrehilbert added Team:obs-ds-hosted-services Label for the Observability Hosted Services team Team:Security-Linux Platform Linux Platform Team in Security Solution labels Aug 27, 2025
@elasticmachine

Copy link
Copy Markdown
Contributor

Pinging @elastic/obs-ds-hosted-services (Team:obs-ds-hosted-services)

@elasticmachine

Copy link
Copy Markdown
Contributor

Pinging @elastic/sec-linux-platform (Team:Security-Linux Platform)

@cmacknz

cmacknz commented Oct 23, 2025

Copy link
Copy Markdown
Member

@leehinman what's the status of this one? Does it need to get tracked in the global paths follow up work issue?

@leehinman

Copy link
Copy Markdown
Contributor Author

@leehinman what's the status of this one? Does it need to get tracked in the global paths follow up work issue?

Not strickly required, but it does reduce the amount of work in global paths follow up issue. I added a link there. I should be able to get back this next week.

@leehinman leehinman force-pushed the 44903c_remove_libbeat_plugin branch from 97e81ca to 6912a87 Compare November 3, 2025 17:29
@leehinman

Copy link
Copy Markdown
Contributor Author

go-quark v0.4.0 fixes the building on arm linux, but changes signature of quark.OpenQueue, which auditbeat uses. I'm closing this for now since it isn't absolutely required for global paths issue. We can revisit if it comes up again.

@leehinman leehinman closed this Nov 3, 2025
@blakerouse blakerouse reopened this Jun 16, 2026
@mergify

mergify Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b 44903c_remove_libbeat_plugin upstream/44903c_remove_libbeat_plugin
git merge upstream/main
git push upstream 44903c_remove_libbeat_plugin

@orestisfl

Copy link
Copy Markdown
Contributor

Given this PR is old, in conflict and uses the old release-note format, I've opened a new one here: #51320

@blakerouse blakerouse closed this Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-skip Skip notification from the automated backport with mergify cleanup Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team Team:obs-ds-hosted-services Label for the Observability Hosted Services team Team:Security-Linux Platform Linux Platform Team in Security Solution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants