-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Store: fix returned labels on external label conflict when skipping chunks #6874
Store: fix returned labels on external label conflict when skipping chunks #6874
Conversation
8fbfcec
to
3002646
Compare
…hunks Signed-off-by: Michael Hoffmann <mhoffm@posteo.de>
3002646
to
ce2e61e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the buf fix!
…hunks (thanos-io#6874) Signed-off-by: Michael Hoffmann <mhoffm@posteo.de> Signed-off-by: Sebastian Rabenhorst <sebastian.rabenhorst@shopify.com>
…hunks (thanos-io#6874) Signed-off-by: Michael Hoffmann <mhoffm@posteo.de>
…hunks (thanos-io#6874) Signed-off-by: Michael Hoffmann <mhoffm@posteo.de>
…hunks (thanos-io#6874) Signed-off-by: Michael Hoffmann <mhoffm@posteo.de>
…hunks (thanos-io#6874) Signed-off-by: Michael Hoffmann <mhoffm@posteo.de>
lset = append(lset, labelpb.ZLabelsFromPromLabels(finalExtLset)...) | ||
sort.Slice(lset, func(i, j int) bool { | ||
return lset[i].Name < lset[j].Name | ||
// external labels should take precedence |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be good to include the fixed behavior in the changelog. Otherwise it's unclear what the "fix" does in the case of conflicts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On conflict external labes take precedence over internal ones ( in thanos )
Changes
When skipping chunks we would send invalid labelsets in prometheus store if external and inner labels conflicted
Verification
Added a acceptance testcase
Fixes #6844