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

pipeline: remove redundant Paths from Settings and Supporter#49841

Open
orestisfl wants to merge 2 commits intoelastic:mainfrom
orestisfl:pipeline-use-info-paths
Open

pipeline: remove redundant Paths from Settings and Supporter#49841
orestisfl wants to merge 2 commits intoelastic:mainfrom
orestisfl:pipeline-use-info-paths

Conversation

@orestisfl
Copy link
Copy Markdown
Contributor

@orestisfl orestisfl commented Apr 1, 2026

Proposed commit message

pipeline: remove redundant Paths from Settings and Supporter

Pipeline stored both beatInfo and a separate *paths.Path, and
threaded it through the processing.Supporter.Create interface just
to call SetPaths on processors. Now that Info carries Paths, remove
the field from Pipeline and Settings, drop the parameter from
Supporter.Create, and let the builder read paths from info.Paths.

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

@orestisfl orestisfl added refactoring Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team backport-active-all Automated backport with mergify to all the active branches skip-changelog labels Apr 1, 2026
@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Apr 1, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

🤖 GitHub comments

Just comment with:

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

The Pipeline already has beatInfo which contains Paths. Remove the
separate paths field from Pipeline and Settings, and remove the paths
parameter from the processing.Supporter.Create interface. The builder
now uses info.Paths directly when calling SetPaths on processors.
@orestisfl orestisfl force-pushed the pipeline-use-info-paths branch from cc35ae1 to b662742 Compare April 17, 2026 10:48
@orestisfl orestisfl marked this pull request as ready for review April 17, 2026 10:48
@orestisfl orestisfl requested a review from a team as a code owner April 17, 2026 10:48
@elasticmachine
Copy link
Copy Markdown
Contributor

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

@github-actions

This comment has been minimized.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 17, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ab8a5551-4a92-444f-b2b9-cb0f076acd1e

📥 Commits

Reviewing files that changed from the base of the PR and between 184a91b and b662742.

📒 Files selected for processing (9)
  • libbeat/cmd/instance/beat.go
  • libbeat/publisher/pipeline/client_test.go
  • libbeat/publisher/pipeline/pipeline.go
  • libbeat/publisher/pipeline/stress/run.go
  • libbeat/publisher/processing/default.go
  • libbeat/publisher/processing/default_test.go
  • libbeat/publisher/processing/processing.go
  • x-pack/dockerlogbeat/pipelinemanager/libbeattools.go
  • x-pack/libbeat/cmd/instance/beat.go
💤 Files with no reviewable changes (4)
  • x-pack/dockerlogbeat/pipelinemanager/libbeattools.go
  • x-pack/libbeat/cmd/instance/beat.go
  • libbeat/publisher/pipeline/stress/run.go
  • libbeat/cmd/instance/beat.go

📝 Walkthrough

Walkthrough

This change removes the Paths field from the pipeline.Settings struct and the paths *paths.Path parameter from the Supporter.Create() method signature across the publishing pipeline and processor creation layers. Path configuration now flows through beat.Info.Paths directly rather than being passed explicitly through these settings structures. The refactoring affects beat instance creation, pipeline initialization, processor setup, and test support code in both libbeat and x-pack directories.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • 🛠️ Update Documentation: Commit on current branch
  • 🛠️ Update Documentation: Create PR

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Copy Markdown
Contributor

TL;DR

All 5 failed Buildkite jobs are caused by the same compile error: b.Paths is referenced in filebeat/beater/filebeat.go, but *beat.Beat has no Paths field. Replace it with b.Info.Paths (consistent with the rest of the file), then re-run the failed pipelines.

Remediation

  • In filebeat/beater/filebeat.go:498, change b.Paths to b.Info.Paths.
  • Re-run make -C filebeat check update (and x-pack check/update), then re-run x-pack metricbeat integration jobs.
Investigation details

Root Cause

autodiscover.NewAutodiscover(...) in filebeat/beater/filebeat.go:498 passes b.Paths, but *beat.Beat does not define a Paths field.

  • Offending call site: filebeat/beater/filebeat.go:498b.Paths,
  • Beat struct definition: libbeat/beat/beat.go:59-91 (fields include Info, Publisher, etc.; no Paths field)

Nearby code in the same file consistently uses b.Info.Paths (for example filebeat/beater/filebeat.go:116, :200, :210, :273, :309, :322, :388, :430, :431).

Evidence

Key log excerpts:

beater/filebeat.go:498:6: b.Paths undefined (type *beat.Beat has no field or method Paths)
../../filebeat/beater/filebeat.go:498:6: b.Paths undefined (type *beat.Beat has no field or method Paths)
FAIL github.com/elastic/beats/v7/x-pack/metricbeat/tests/integration [build failed]

Verification

  • Not run in this detective workflow (read-only analysis); remediation is directly derived from compiler/vet errors and source inspection.

Follow-up

After the one-line fix, all five failures should clear together since they are the same compile break surfacing in multiple pipelines.

Note

🔒 Integrity filter blocked 2 items

The following items were blocked because they don't meet the GitHub integrity level.

To allow these resources, lower min-integrity in your GitHub frontmatter:

tools:
  github:
    min-integrity: approved  # merged | approved | unapproved | none

What is this? | From workflow: PR Buildkite Detective

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

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

Labels

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

[beatreceiver] move paths object into Beat.Info

2 participants