Skip to content

[8.19](backport #8447) refactor: update autodiscover dependency - #8512

Open
mergify[bot] wants to merge 13 commits into
8.19from
mergify/bp/8.19/pr-8447
Open

mergify[bot] wants to merge 13 commits into
8.19from
mergify/bp/8.19/pr-8447

Conversation

@mergify

@mergify mergify Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Summary of your changes

Replaces the Go module github.com/elastic/elastic-agent-autodiscover with packages from github.com/elastic/beats/v7/pkg/autodiscover. This is following the move of the elastic-agent-autodiscover code to Beats (elastic/beats#51804).

This is a dependency replacement without functional changes.

Checklist

  • [ ] I have added tests that prove my fix is effective or that my feature works
  • [ ] I have added the necessary README/documentation (if appropriate)

This is an automatic backport of pull request #8447 done by [Mergify](https://mergify.com).

### Summary of your changes

Replaces the Go module `github.com/elastic/elastic-agent-autodiscover`
with packages from `github.com/elastic/beats/v7/pkg/autodiscover`. This
is following the move of the elastic-agent-autodiscover code to Beats
(elastic/beats#51804).

This is a dependency replacement without functional changes.

### Checklist
- ~[ ] I have added tests that prove my fix is effective or that my
feature works~
- ~[ ] I have added the necessary README/documentation (if appropriate)~

(cherry picked from commit 4e57a07)

# Conflicts:
#	NOTICE.txt
#	go.mod
#	go.sum
@mergify
mergify Bot requested a review from a team as a code owner September 21, 2026 10:25
@mergify

mergify Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor Author

Cherry-pick of 4e57a07 has failed:

On branch mergify/bp/8.19/pr-8447
Your branch is up to date with 'origin/8.19'.

You are currently cherry-picking commit 4e57a07.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   internal/dataprovider/providers/k8s/client_provider.go
	modified:   internal/dataprovider/providers/k8s/client_provider_mock.go
	modified:   internal/dataprovider/providers/k8s/cluster_name_provider.go
	modified:   internal/flavors/benchmark/eks.go
	modified:   internal/flavors/benchmark/k8s.go
	modified:   internal/flavors/benchmark/k8s_helper.go
	modified:   internal/processor/add_cluster_id/add_cluster_id.go
	modified:   internal/resources/fetching/fetchers/aws/ecr_fetcher_test.go
	modified:   internal/resources/fetching/fetchers/k8s/kube_fetcher.go
	modified:   internal/resources/fetching/fetchers/k8s/kube_provider.go
	modified:   internal/uniqueness/leaderelection.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   NOTICE.txt
	both modified:   go.mod
	both modified:   go.sum

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

gurevichdmitry and others added 12 commits September 22, 2026 13:08
The cherry-pick of the autodiscover dependency refactor onto 8.19
left raw conflict markers committed in go.mod and go.sum, causing
all CI checks to fail. Resolves both files by keeping the cherry-pick
side (newer module versions that match the intended dependency update).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Incorporates three Renovate updates that landed on 8.19 after the
cherry-pick: go-runewidth v0.0.30, gohugoio/hashstructure v1, and
cyclonedx-go v0.12.0. Resolves the resulting go.sum conflict by
keeping entries from both sides.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The cherry-pick upgrades beats to v7.0.0-alpha2.0.20260722133641, which
moved otelconsumer from x-pack/libbeat/outputs/otelconsumer to
libbeat/otel/otelconsumer. Update the import in cmd/root.go accordingly
and run go mod tidy to realign transitive dependencies.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Incorporates two Renovate updates that landed on 8.19: ebitengine/purego
v0.11.1 and bmatcuk/doublestar/v4 v4.10.1.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…bility

logp.ToObserverOutput() and logp.ObserverLogs() were removed in
elastic-agent-libs v0.46.1. Migrate to logptest.NewTestingLoggerWithObserver
following the pattern already used in 9.x branches.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add newLoggerFromBase to create OPA loggers from an injected logger
instead of the global logp. Replace logp.ToObserverOutput/ObserverLogs
in tests with logptest.NewTestingLoggerWithObserver via testhelper.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
newLoggerFromBase replaced all usages; newLogger() would cause a lint failure.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Logger methods were writing to zap without checking l.lvl, so SetLevel
had no effect when used with an observer-based test logger. WithFields
also dropped lvl, breaking level inheritance for child loggers.

Mirrors the fix already present on main.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…er lifecycle management

Replace `time.Sleep(100ms)` with `runAndStop` helper that waits for one
fetch cycle to complete, calls `benchmark.Stop()`, then waits for
"Fetchers manager canceled" log. This eliminates the data race caused by
goroutines writing to `t.Log` after the test exits.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…6.1 / beats bump

Updated config file reflects template changes in the new beats version:
- Processor add_docker_metadata: updated labels.dedot default and new
  wait_for_metadata options
- Kafka output: fix typo in kerberos.service_name comment
- HTTP: new debug.state_inspector section

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- cmd/root.go: move otelconsumer blank import to alphabetical position
  within the beats/libbeat group (before x-pack imports)
- internal/flavors/publisher_test.go: remove spurious blank line
  splitting third-party import group
- internal/resources/providers/gcplib/inventory/provider_test.go:
  remove spurious blank line splitting third-party import group

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mergify

mergify Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants