Skip to content

[8.19](backport #45886) Match prometheus version with upstream prometheusreceivers'#45924

Merged
khushijain21 merged 4 commits into8.19from
mergify/bp/8.19/pr-45886
Aug 13, 2025
Merged

[8.19](backport #45886) Match prometheus version with upstream prometheusreceivers'#45924
khushijain21 merged 4 commits into8.19from
mergify/bp/8.19/pr-45886

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Aug 12, 2025

Proposed commit message

Match the prometheus/prometheus version used by upstream prometheusreceiver to avoid dependency conflict in elastic-agent

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.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Why is it required

Description

Currently, prometheusreceiver uses an unreleased version of prometheus/prometheus

	github.com/prometheus/prometheus v0.304.3-0.20250703114031-419d436a447a
	github.com/stretchr/testify v1.10.0

which uses the latest version of oteltranslator ( reverted in the v0.305.0 release prometheus/prometheus@3253ba6 )

This mismatch is causing dependency conflict when updating otel collector dependencies in elastic-agent

Compilation error as follows

> build: Building elastic-agent
# github.com/prometheus/prometheus/storage/remote/otlptranslator/prometheusremotewrite
../pkg/mod/github.com/prometheus/prometheus@v0.305.0/storage/remote/otlptranslator/prometheusremotewrite/helper.go:155:30: undefined: otlptranslator.NormalizeLabel
../pkg/mod/github.com/prometheus/prometheus@v0.305.0/storage/remote/otlptranslator/prometheusremotewrite/helper.go:167:32: undefined: otlptranslator.NormalizeLabel
../pkg/mod/github.com/prometheus/prometheus@v0.305.0/storage/remote/otlptranslator/prometheusremotewrite/helper.go:207:26: undefined: otlptranslator.NormalizeLabel
Error: running "go build -o build/elastic-agent -buildmode pie -trimpath -ldflags -s -X github.com/elastic/elastic-agent/version.buildTime=2025-08-08T15:33:17Z -X github.com/elastic/elastic-agent/version.commit=7e374e8177f915f9c2a9bd806ab43fe0c9f121f7 -X github.com/elastic/elastic-agent/internal/pkg/release.snapshot=" failed with exit code 1

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

(cherry picked from commit 2e0b894)

# Conflicts:
#	NOTICE.txt
#	go.mod
#	go.sum
@mergify mergify bot requested a review from a team as a code owner August 12, 2025 09:44
@mergify mergify bot added backport conflicts There is a conflict in the backported pull request labels Aug 12, 2025
@mergify
Copy link
Contributor Author

mergify bot commented Aug 12, 2025

Cherry-pick of 2e0b894 has failed:

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

You are currently cherry-picking commit 2e0b89426.
  (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)

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

no changes added to commit (use "git add" and/or "git commit -a")

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

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Aug 12, 2025
@github-actions github-actions bot added the Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team label Aug 12, 2025
@elasticmachine
Copy link
Contributor

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 Aug 12, 2025
@mergify
Copy link
Contributor Author

mergify bot commented Aug 13, 2025

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b mergify/bp/8.19/pr-45886 upstream/mergify/bp/8.19/pr-45886
git merge upstream/8.19
git push upstream mergify/bp/8.19/pr-45886

@khushijain21 khushijain21 enabled auto-merge (squash) August 13, 2025 07:36
@khushijain21 khushijain21 merged commit 777157e into 8.19 Aug 13, 2025
201 of 202 checks passed
@khushijain21 khushijain21 deleted the mergify/bp/8.19/pr-45886 branch August 13, 2025 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport conflicts There is a conflict in the backported pull request 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.

2 participants