Skip to content

[9.4](backport #49838) idxmgmt: remove redundant beatPaths parameter#50250

Merged
orestisfl merged 4 commits into
9.4from
mergify/bp/9.4/pr-49838
Apr 28, 2026
Merged

[9.4](backport #49838) idxmgmt: remove redundant beatPaths parameter#50250
orestisfl merged 4 commits into
9.4from
mergify/bp/9.4/pr-49838

Conversation

@mergify

@mergify mergify Bot commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

Proposed commit message

idxmgmt: remove redundant beatPaths parameter

NewESClientHandler and NewFileClientHandler accepted both beat.Info
and *paths.Path. Now that Info carries Paths, drop the separate
argument and pass info.Paths to the downstream template loaders.

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/fragments using the changelog tool.

Disruptive User Impact

None. Internal API change only.

How to test this PR locally

Related issues

NewESClientHandler and NewFileClientHandler accepted both beat.Info
and *paths.Path. Now that Info carries Paths, drop the separate
argument and pass info.Paths to the downstream template loaders.

(cherry picked from commit 8b7236f)
@mergify mergify Bot added the backport label Apr 22, 2026
@mergify mergify Bot requested a review from a team as a code owner April 22, 2026 08:42
@mergify mergify Bot removed the request for review from a team April 22, 2026 08:42
@mergify mergify Bot added the backport label Apr 22, 2026
@botelastic botelastic Bot added the needs_team Indicates that the issue/PR needs a Team:* label label Apr 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🤖 GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)
  • /test : Run the Buildkite pipeline.

@github-actions github-actions Bot added Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team skip-changelog labels Apr 22, 2026
@botelastic botelastic Bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Apr 22, 2026
@elasticmachine

Copy link
Copy Markdown
Contributor

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

@mergify

mergify Bot commented Apr 27, 2026

Copy link
Copy Markdown
Contributor Author

This pull request has not been merged yet. Could you please review and merge it @orestisfl? 🙏

@github-actions

Copy link
Copy Markdown
Contributor

TL;DR

golangci-lint failed on all three runners because this backport branch includes code that violates current forbidigo rules in libbeat/cmd/instance/beat.go (logp.NewLogger, paths.Paths, and paths.InitPaths). Immediate action: backport the follow-up fix commit(s) that removed those forbidden usages (or apply the equivalent changes directly in this PR).

Remediation

  • Update libbeat/cmd/instance/beat.go on this branch to remove the three forbidden calls:
    • logp.NewLogger at libbeat/cmd/instance/beat.go:188
    • paths.Paths at libbeat/cmd/instance/beat.go:769
    • paths.InitPaths at libbeat/cmd/instance/beat.go:1509
  • Re-run the golangci-lint workflow after backporting those changes.
Investigation details

Root Cause

The workflow itself is healthy; lint fails due to code-level policy violations from forbidigo. The same three violations are reported consistently on ubuntu-latest, windows-latest, and macos-latest, so this is not runner-specific.

Evidence

  • Workflow: https://github.com/elastic/beats/actions/runs/24982726999
  • Job/step: lint (ubuntu-latest)golangci-lint (also reproduced in lint (windows-latest) and lint (macos-latest))
  • Key log excerpt:
    • libbeat/cmd/instance/beat.go:188:5: use of \logp.NewLogger` forbidden because "accept a *logp.Logger as a parameter instead of creating one with logp.NewLogger" (forbidigo)`
    • libbeat/cmd/instance/beat.go:769:17: use of \paths.Paths` forbidden because "use a per-beat *paths.Path instance instead of the global paths.Paths" (forbidigo)`
    • libbeat/cmd/instance/beat.go:1509:12: use of \paths.InitPaths` forbidden because "use a per-beat *paths.Path instance instead of the global paths.InitPaths" (forbidigo)`

Validation

  • Local lint/tests not run in this environment; diagnosis is based on the failing workflow job logs.

Follow-up

If this PR is a clean backport of #49838, check whether the source branch got an additional post-merge lint-fix commit and backport that commit as well.


What is this? | From workflow: PR Actions Detective

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

@orestisfl orestisfl enabled auto-merge (squash) April 27, 2026 09:01

@orestisfl orestisfl 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.

Backport of #49838

@orestisfl orestisfl merged commit f2b3e48 into 9.4 Apr 28, 2026
197 of 200 checks passed
@orestisfl orestisfl deleted the mergify/bp/9.4/pr-49838 branch April 28, 2026 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants