-
Notifications
You must be signed in to change notification settings - Fork 528
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
Import Thanos protobuf definitions #3222
Conversation
762b146
to
70cfc41
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.
Very good overall. Few nits and one thought for further code elimination.
@@ -20,6 +20,7 @@ import ( | |||
"github.com/grafana/dskit/kv" | |||
"github.com/grafana/dskit/ring" | |||
"github.com/grafana/dskit/services" | |||
"github.com/grafana/dskit/tenant" |
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.
nit: moving this line is not relevant to this commit
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're used to group imports, and we typically fix it lazy the imports are not grouped. It's a practice we adopt regularly. I will not address this.
@@ -21,21 +21,20 @@ import ( | |||
"github.com/prometheus/prometheus/model/timestamp" | |||
"github.com/prometheus/prometheus/tsdb/hashcache" | |||
"github.com/stretchr/testify/assert" | |||
"github.com/thanos-io/objstore" |
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.
nit again, changes not relevant to this commit
func (m *Label) Reset() { *m = Label{} } | ||
func (*Label) ProtoMessage() {} |
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.
This Label
type is identical to LabelPair
here:
Lines 239 to 242 in c0a7b23
type LabelPair struct { | |
Name []byte `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` | |
Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` | |
} |
Mimir has LabelAdapter
to do the zero-copy thing where Thanos has ZLabel
.
(I would be ok with doing that change later, after this PR)
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 will look at it separately.
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 replaced ZLabel with LabelAdapter in #3345.
Signed-off-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Marco Pracucci <marco@pracucci.com>
70cfc41
to
c4dad0d
Compare
What this PR does
Mimir and Thanos store-gateways have diverged (e.g. query sharding) and, to move forward, we need to import Thanos protobuf definitions into Mimir. In this PR I'm doing it.
As separate commits:
Note to reviewers:
storepb
,labelpb
, ...) in order to keep the diff minimal and make it easier to review. At first I did merged all of them into ourstoregatewaypb
but diff was too difficult to review. We can consider merging them as a follow up work.Which issue(s) this PR fixes or relates to
N/A
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]