Skip to content

Remove use of github.com/elastic/elastic-agent-client from OSS Beats#48353

Merged
cmacknz merged 10 commits into
elastic:mainfrom
cmacknz:cmacknz/remove-elastic-agent-client-oss
Jan 15, 2026
Merged

Remove use of github.com/elastic/elastic-agent-client from OSS Beats#48353
cmacknz merged 10 commits into
elastic:mainfrom
cmacknz:cmacknz/remove-elastic-agent-client-oss

Conversation

@cmacknz

@cmacknz cmacknz commented Jan 8, 2026

Copy link
Copy Markdown
Member

A user reported that the OSS Beats had linked in elastic-agent-client which is ELv2 licensed, which was accurate as we were using types from it in a few places. Cloning a few trivial types (and Apache licensing them which is of no consequence) and minor moves of code fixes this and removes the elastic-agent-client dependency from the OSS code.

To verify:

cd filebeat
mage build
go version -m ./filebeat | grep elastic-agent-client

When the Beat receivers project concludes, we should be able to completely remove or majorly reduce use of elastic-agent-client since it would be necessary anymore.

In the meantime, a new lint rule to flag use of this import outside of x-pack has been added.

@cmacknz cmacknz self-assigned this Jan 8, 2026
@cmacknz cmacknz added the Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team label Jan 8, 2026
@cmacknz cmacknz requested a review from a team as a code owner January 8, 2026 21:06
@cmacknz cmacknz added the Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team label Jan 8, 2026
@cmacknz cmacknz requested a review from a team as a code owner January 8, 2026 21:06
@cmacknz cmacknz added the backport-active-8 Automated backport with mergify to all the active 8.[0-9]+ branches label Jan 8, 2026
@cmacknz cmacknz requested a review from ycombinator January 8, 2026 21:06
@cmacknz cmacknz added the backport-active-9 Automated backport with mergify to all the active 9.[0-9]+ branches label Jan 8, 2026
@botelastic botelastic Bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jan 8, 2026
@elasticmachine

Copy link
Copy Markdown
Contributor

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

@elasticmachine

Copy link
Copy Markdown
Contributor

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

@botelastic botelastic Bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jan 8, 2026
@github-actions

github-actions Bot commented Jan 8, 2026

Copy link
Copy Markdown
Contributor

🤖 GitHub comments

Just comment with:

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

@cmacknz cmacknz changed the title Break dependency on ElasticV2 licensed code from OSS Beats Remove use of github.com/elastic/elastic-agent-client from OSS Beats Jan 8, 2026
@cmacknz cmacknz requested a review from a team as a code owner January 8, 2026 21:50
@cmacknz cmacknz force-pushed the cmacknz/remove-elastic-agent-client-oss branch from 1c64e1f to 0061bde Compare January 8, 2026 22:08

@michel-laterman michel-laterman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

@cmacknz cmacknz requested a review from andrewkroh January 14, 2026 15:50
@cmacknz cmacknz merged commit adc57ca into elastic:main Jan 15, 2026
202 of 205 checks passed
@cmacknz cmacknz deleted the cmacknz/remove-elastic-agent-client-oss branch January 15, 2026 16:01
@github-actions

Copy link
Copy Markdown
Contributor

@Mergifyio backport 8.19 9.1 9.2 9.3

@mergify

mergify Bot commented Jan 15, 2026

Copy link
Copy Markdown
Contributor

backport 8.19 9.1 9.2 9.3

✅ Backports have been created

Details

mergify Bot pushed a commit that referenced this pull request Jan 15, 2026
…48353)

* Remove elastic-agent-client import for useragent.

* Remove elastic-agent-client from manager interface.

* Remove use of elastic-agent-client in features.

* Move cloned types to separate file.

* Add changelog.

* Add depguard rule to forbid future use.

* Fix OtelManager

* Fix osquerybeat tests

* Run mage fmt

* Fix lint warning: remove unnecessary cast

(cherry picked from commit adc57ca)

# Conflicts:
#	libbeat/beat/beat.go
#	libbeat/beat/beat_test.go
#	x-pack/osquerybeat/beater/osquerybeat_status_test.go
mergify Bot pushed a commit that referenced this pull request Jan 15, 2026
…48353)

* Remove elastic-agent-client import for useragent.

* Remove elastic-agent-client from manager interface.

* Remove use of elastic-agent-client in features.

* Move cloned types to separate file.

* Add changelog.

* Add depguard rule to forbid future use.

* Fix OtelManager

* Fix osquerybeat tests

* Run mage fmt

* Fix lint warning: remove unnecessary cast

(cherry picked from commit adc57ca)

# Conflicts:
#	x-pack/osquerybeat/beater/osquerybeat_status_test.go
mergify Bot pushed a commit that referenced this pull request Jan 15, 2026
…48353)

* Remove elastic-agent-client import for useragent.

* Remove elastic-agent-client from manager interface.

* Remove use of elastic-agent-client in features.

* Move cloned types to separate file.

* Add changelog.

* Add depguard rule to forbid future use.

* Fix OtelManager

* Fix osquerybeat tests

* Run mage fmt

* Fix lint warning: remove unnecessary cast

(cherry picked from commit adc57ca)

# Conflicts:
#	x-pack/osquerybeat/beater/osquerybeat_status_test.go
mergify Bot pushed a commit that referenced this pull request Jan 15, 2026
…48353)

* Remove elastic-agent-client import for useragent.

* Remove elastic-agent-client from manager interface.

* Remove use of elastic-agent-client in features.

* Move cloned types to separate file.

* Add changelog.

* Add depguard rule to forbid future use.

* Fix OtelManager

* Fix osquerybeat tests

* Run mage fmt

* Fix lint warning: remove unnecessary cast

(cherry picked from commit adc57ca)
cmacknz added a commit that referenced this pull request Jan 15, 2026
…t-client from OSS Beats (#48433)

* Remove use of github.com/elastic/elastic-agent-client from OSS Beats (#48353)

* Remove elastic-agent-client import for useragent.

* Remove elastic-agent-client from manager interface.

* Remove use of elastic-agent-client in features.

* Move cloned types to separate file.

* Add changelog.

* Add depguard rule to forbid future use.

* Fix OtelManager

* Fix osquerybeat tests

* Run mage fmt

* Fix lint warning: remove unnecessary cast

(cherry picked from commit adc57ca)

# Conflicts:
#	libbeat/beat/beat.go
#	libbeat/beat/beat_test.go
#	x-pack/osquerybeat/beater/osquerybeat_status_test.go

* Resolve conflicts

* Remove file added by merge conflict

---------

Co-authored-by: Craig MacKenzie <craig.mackenzie@elastic.co>
cmacknz added a commit that referenced this pull request Jan 15, 2026
…-client from OSS Beats (#48434)

* Remove use of github.com/elastic/elastic-agent-client from OSS Beats (#48353)

* Remove elastic-agent-client import for useragent.

* Remove elastic-agent-client from manager interface.

* Remove use of elastic-agent-client in features.

* Move cloned types to separate file.

* Add changelog.

* Add depguard rule to forbid future use.

* Fix OtelManager

* Fix osquerybeat tests

* Run mage fmt

* Fix lint warning: remove unnecessary cast

(cherry picked from commit adc57ca)

# Conflicts:
#	x-pack/osquerybeat/beater/osquerybeat_status_test.go

* Resolve conflicts

---------

Co-authored-by: Craig MacKenzie <craig.mackenzie@elastic.co>
cmacknz added a commit that referenced this pull request Jan 15, 2026
…48353) (#48436)

* Remove elastic-agent-client import for useragent.

* Remove elastic-agent-client from manager interface.

* Remove use of elastic-agent-client in features.

* Move cloned types to separate file.

* Add changelog.

* Add depguard rule to forbid future use.

* Fix OtelManager

* Fix osquerybeat tests

* Run mage fmt

* Fix lint warning: remove unnecessary cast

(cherry picked from commit adc57ca)

Co-authored-by: Craig MacKenzie <craig.mackenzie@elastic.co>
cmacknz added a commit that referenced this pull request Jan 19, 2026
…-client from OSS Beats (#48435)

* Remove use of github.com/elastic/elastic-agent-client from OSS Beats (#48353)

* Remove elastic-agent-client import for useragent.

* Remove elastic-agent-client from manager interface.

* Remove use of elastic-agent-client in features.

* Move cloned types to separate file.

* Add changelog.

* Add depguard rule to forbid future use.

* Fix OtelManager

* Fix osquerybeat tests

* Run mage fmt

* Fix lint warning: remove unnecessary cast

(cherry picked from commit adc57ca)

# Conflicts:
#	x-pack/osquerybeat/beater/osquerybeat_status_test.go

* Fix conflict

---------

Co-authored-by: Craig MacKenzie <craig.mackenzie@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-active-8 Automated backport with mergify to all the active 8.[0-9]+ branches backport-active-9 Automated backport with mergify to all the active 9.[0-9]+ branches Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants