豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

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

Open
github-actions[bot] wants to merge 2 commits intomainfrom
fix-50158-xpack-metricbeat-buildsystemtestbinary-guidance-3c178dbddb2050f8
Open

x-pack/metricbeat: add BuildSystemTestBinary deprecation guidance#50196
github-actions[bot] wants to merge 2 commits intomainfrom
fix-50158-xpack-metricbeat-buildsystemtestbinary-guidance-3c178dbddb2050f8

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

Summary

  • adds the same BuildSystemTestBinary deprecation UX used in other magefiles to x-pack/metricbeat/magefile.go
  • updates the function doc comment to Deprecated: and prints the existing warning text before running the current x-pack metricbeat-specific build logic
  • keeps the existing Windows 32-bit -ldflags=-w behavior intact
  • adds a changelog fragment for the fix

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
@botelastic
Copy link
Copy Markdown

botelastic bot commented Apr 17, 2026

This pull request doesn't have a Team:<team> label.

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Apr 17, 2026

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
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
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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.

}

// BuildSystemTestBinary build a system test binary depending on the runner.
// Deprecated: BuildSystemTestBinary builds a binary instrumented for use with Python system tests.
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.

Why do we still need this target at all then? This is only used internally AFAIK if we don't need it remove it.

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 the Python tests still need it to function it isn't deprecated it's necessary

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 needs_team Indicates that the issue/PR needs a Team:* label skip-changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

3 participants