[BUGFIX] Scraping: return empty label set if sample is not to be kept#17806
Merged
bboreham merged 1 commit intoprometheus:mainfrom Jan 7, 2026
Merged
Conversation
Merged
Member
|
Thanks! Can we have a regression test for this? |
Member
|
I'll copy this and make a PR against the release-3.9 branch. |
bc6c1bc to
9313b3c
Compare
Contributor
Author
|
I have added a regression test, taking some inspiration from the other tests. If there's a better place to put it or a nicer way of going about this, let me know! |
Member
|
Thanks for the test; FWIW you don't need the whole server mechanism, you could follow the structure from a test like Also the test harness changed massively since 3.9.0 so I will have a bit of rewriting to do. |
Signed-off-by: Marvin Rösch <marvinroesch99@gmail.com>
9313b3c to
fff29d3
Compare
Contributor
Author
|
Thanks for the pointer! I have adjusted the test accordingly. |
Member
|
The release-3.9 backport is at #17807. I'm guessing it will be fine to merge both then prefer this one when 3.9 is merged into main. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue(s) does the PR fix:
The change introduced in #17530 caused metric relabeling configs that did not modify any labels but instead only kept a subset of series (via
action: keeporaction: drop) to not take effect, as the actual label set was never modified byrelabel.ProcessBuilder.This is a minimally invasive fix restoring the old behavior, mirroring what
relabel.Processdoes.Does this PR introduce a user-facing change?