-
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
Update prometheus and cortex #3804
Conversation
Signed-off-by: Mauro Stettler <mauro.stettler@gmail.com>
Signed-off-by: Mauro Stettler <mauro.stettler@gmail.com>
Signed-off-by: Mauro Stettler <mauro.stettler@gmail.com>
Signed-off-by: Mauro Stettler <mauro.stettler@gmail.com>
44057f0
to
7a5126c
Compare
a5c056e
to
1f1f54d
Compare
1f1f54d
to
6c3a35e
Compare
pkg/query/querier.go
Outdated
span, ctx := tracing.StartSpan(q.ctx, "querier_label_values") | ||
defer span.Finish() | ||
|
||
// TODO(bwplotka): Pass it using the SeriesRequest instead of relying on context. | ||
ctx = context.WithValue(ctx, store.StoreMatcherKey, q.storeDebugMatchers) | ||
|
||
pbMatchers, err := storepb.PromMatchersToMatchers(matchers...) | ||
if err != nil { | ||
return nil, nil, errors.Wrap(err, "proxy LabelValues()") |
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.
Let's update the msg to convert matchers
to be consistent.
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.
👍🏽
pkg/store/storepb/rpc.proto
Outdated
@@ -178,6 +178,8 @@ message LabelValuesRequest { | |||
// The content of this field and whether it's supported depends on the | |||
// implementation of a specific store. | |||
google.protobuf.Any hints = 6; | |||
|
|||
repeated LabelMatcher label_matchers = 7 [(gogoproto.nullable) = false]; |
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.
We can just call it matchers
to be consistent.
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.
👍🏽
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.
Thank you! Some consistency fixes to address and we can merge! 💪🏽
LGTM when fixed. Would you have time to address those comments? I can then release Thanos 0.19 with this 💪🏽
pkg/query/querier.go
Outdated
span, ctx := tracing.StartSpan(q.ctx, "querier_label_values") | ||
defer span.Finish() | ||
|
||
// TODO(bwplotka): Pass it using the SeriesRequest instead of relying on context. | ||
ctx = context.WithValue(ctx, store.StoreMatcherKey, q.storeDebugMatchers) | ||
|
||
pbMatchers, err := storepb.PromMatchersToMatchers(matchers...) | ||
if err != nil { | ||
return nil, nil, errors.Wrap(err, "proxy LabelValues()") |
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.
👍🏽
pkg/store/storepb/rpc.proto
Outdated
@@ -178,6 +178,8 @@ message LabelValuesRequest { | |||
// The content of this field and whether it's supported depends on the | |||
// implementation of a specific store. | |||
google.protobuf.Any hints = 6; | |||
|
|||
repeated LabelMatcher label_matchers = 7 [(gogoproto.nullable) = false]; |
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.
👍🏽
Great! yes I'll make the requested changes, thanks to both of you for the quick feedback. |
db5407b
to
7f9c323
Compare
Signed-off-by: Mauro Stettler <mauro.stettler@gmail.com>
7f9c323
to
bd10173
Compare
I have addressed the comments, please take another look |
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.
LGTM! Thanks!
Changes
This updates the vendored Prometheus and Cortex versions. In the latest version of Prometheus the Querier's
.LabelValues()
call now takes a matchers parameter, so this also adds that parameter to thestorepb.LabelValuesRequest
type.