Skip to content

x-pack/metricbeat: add BuildSystemTestBinary deprecation guidance#50196

Merged
andrzej-stencel merged 6 commits into
mainfrom
fix-50158-xpack-metricbeat-buildsystemtestbinary-guidance-3c178dbddb2050f8
May 14, 2026
Merged

x-pack/metricbeat: add BuildSystemTestBinary deprecation guidance#50196
andrzej-stencel merged 6 commits into
mainfrom
fix-50158-xpack-metricbeat-buildsystemtestbinary-guidance-3c178dbddb2050f8

Conversation

@github-actions

@github-actions github-actions Bot commented Apr 17, 2026

Copy link
Copy Markdown
Contributor

Summary

add/adjusts BuildSystemTestBinary deprecation guidance

Why

Developers invoking mage BuildSystemTestBinary in x-pack/metricbeat were missing the migration guidance shown in other beats, creating inconsistent command UX.

Validation

  • attempted mage -l from x-pack/metricbeat but mage is not installed in this runner
  • compiled the package path with: go test -tags mage ./x-pack/metricbeat (the run was interrupted by environment module download constraints before completion)

Refs #50158


What is this? | From workflow: Mention in Issue

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

Align x-pack/metricbeat BuildSystemTestBinary with the deprecation UX used in other magefiles so developers get consistent guidance when invoking the target.\n\nKeep the existing x-pack/metricbeat Windows-specific test binary build behavior and only add the deprecation doc comment plus warning output.\n\nAssisted-By: GitHub Copilot CLI\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added the ai label Apr 17, 2026
@botelastic botelastic Bot added the needs_team Indicates that the issue/PR needs a Team:* label label Apr 17, 2026
@mergify

mergify Bot commented Apr 17, 2026

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 @github-actions[bot]? 🙏.
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.

Comment thread x-pack/metricbeat/magefile.go Outdated
This PR only adjusts deprecation guidance text and does not change user-facing behavior, so the changelog fragment is removed to align with skip-changelog policy.

Assisted-By: GitHub Copilot CLI

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor Author

Done: I removed the changelog fragment and pushed the change to this PR branch.

I can’t set PR labels from the tools available in this run, so I wasn’t able to add skip-changelog directly. Please add that label on the PR, and it should satisfy the changelog requirement for this non-user-facing change.


What is this? | From workflow: Mention in PR

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

@AndersonQ AndersonQ self-assigned this Apr 20, 2026
@AndersonQ AndersonQ added backport-active-all Automated backport with mergify to all the active branches skip-changelog labels Apr 20, 2026
@AndersonQ AndersonQ marked this pull request as ready for review April 20, 2026 10:25
@AndersonQ AndersonQ requested a review from a team as a code owner April 20, 2026 10:25

Copilot AI 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.

Pull request overview

This PR aligns x-pack/metricbeat’s mage UX with other beats by adding the standard BuildSystemTestBinary deprecation guidance (GoDoc Deprecated: comment + runtime warning) while preserving the existing x-pack metricbeat-specific build behavior.

Changes:

  • Mark BuildSystemTestBinary as deprecated via GoDoc Deprecated: guidance describing the TestMain behavior.
  • Print the standard deprecation warning message when BuildSystemTestBinary runs (consistent with other magefiles).
  • Keep the existing Windows 32-bit -ldflags=-w handling in the x-pack metricbeat-specific test binary build.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread x-pack/metricbeat/magefile.go Outdated
Comment thread x-pack/metricbeat/magefile.go Outdated
Comment thread x-pack/metricbeat/magefile.go Outdated
Make BuildSystemTestBinary documentation and warning output consistent across all magefiles that define the target. Clarify that deprecation applies only to Go integration tests, while keeping the target positioned as required for Python system tests.

Assisted-By: GPT-5.3-Codex

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor Author

Updated and pushed.

I made the BuildSystemTestBinary deprecation docs and warning message consistent across all magefiles that define this target:

  • filebeat/magefile.go
  • libbeat/magefile.go
  • metricbeat/magefile.go
  • x-pack/filebeat/magefile.go
  • x-pack/libbeat/magefile.go
  • x-pack/metricbeat/magefile.go

The wording now explicitly states deprecation is for Go integration tests only, and that the target remains required for Python system tests.

I also resolved the two open review threads this addressed.


What is this? | From workflow: Mention in PR

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

@AndersonQ

Copy link
Copy Markdown
Member

@cmacknz, @leehinman, @andrzej-stencel, when you have some time, could you review/re-review it?

Copilot AI 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.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Comment thread x-pack/metricbeat/magefile.go
Comment thread filebeat/magefile.go
@AndersonQ

Copy link
Copy Markdown
Member

/ai adjust the PR description. the code has diverged from the original discretion.

@github-actions

github-actions Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor Author

Updated PR description draft (aligned with the current diff):

Summary

  • normalizes BuildSystemTestBinary deprecation docs and warning text across all magefiles that define this target:
    • filebeat/magefile.go:59-65
    • libbeat/magefile.go:50-57
    • metricbeat/magefile.go:66-73
    • x-pack/filebeat/magefile.go:46-53
    • x-pack/libbeat/magefile.go:38-45
    • x-pack/metricbeat/magefile.go:112-124
  • standardizes wording to clarify this is deprecated for Go integration tests only, and that the target remains required for Python system tests
  • keeps x-pack/metricbeat’s existing Windows 32-bit -ldflags=-w build behavior unchanged (x-pack/metricbeat/magefile.go:119-122)

Why

The PR started as an x-pack/metricbeat UX consistency fix, but the branch now includes the same doc/warning normalization in five additional magefiles. This description reflects the full, current scope of the code changes.

Validation

  • reviewed the current PR diff and verified all six modified magefiles implement the same deprecation guidance pattern

Refs #50158


What is this? | From workflow: Mention in PR

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

@AndersonQ

Copy link
Copy Markdown
Member

@cmacknz, @andrzej-stencel, @leehinman when you have some time, could you review it?

@pierrehilbert pierrehilbert added the Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team label May 7, 2026
@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

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

@botelastic botelastic Bot removed the needs_team Indicates that the issue/PR needs a Team:* label label May 7, 2026
@andrzej-stencel andrzej-stencel merged commit 05a0a59 into main May 14, 2026
208 checks passed
@andrzej-stencel andrzej-stencel deleted the fix-50158-xpack-metricbeat-buildsystemtestbinary-guidance-3c178dbddb2050f8 branch May 14, 2026 11:40
@github-actions

Copy link
Copy Markdown
Contributor Author

@Mergifyio backport 9.4 9.3 8.19

@mergify

mergify Bot commented May 14, 2026

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai backport-active-all Automated backport with mergify to all the active branches skip-changelog 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.

[ux-design-patrol] Inconsistent BuildSystemTestBinary deprecation guidance across magefiles

6 participants