-
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
wip: convert to vtproto #6407
wip: convert to vtproto #6407
Conversation
@@ -306,51 +296,10 @@ func testInjectExtLabels(tb testutil.TB) { | |||
} | |||
|
|||
var ( | |||
zdest ZLabel | |||
zdest *Label |
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.
U1000: var zdest is unused
ℹ️ Expand to see all @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
@@ -306,51 +296,10 @@ func testInjectExtLabels(tb testutil.TB) { | |||
} | |||
|
|||
var ( | |||
zdest ZLabel | |||
zdest *Label | |||
dest Label |
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.
U1000: var dest is unused
ℹ️ Expand to see all @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
if len(m.BlockMatchers) > 0 { | ||
for iNdEx := len(m.BlockMatchers) - 1; iNdEx >= 0; iNdEx-- { | ||
{ | ||
size, err := m.BlockMatchers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) |
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.
typecheck: m.BlockMatchers[iNdEx].MarshalToSizedBuffer undefined (type *storepb.LabelMatcher has no field or method MarshalToSizedBuffer)
❗❗ 8 similar findings have been found in this PR
🔎 Expand here to view all instances of this finding
File Path | Line Number |
---|---|
pkg/github.com/thanos-io/thanos/pkg/store/hintspb/hints.pb.go | 544 |
pkg/github.com/thanos-io/thanos/pkg/store/hintspb/hints.pb.go | 626 |
pkg/github.com/thanos-io/thanos/pkg/store/hintspb/hints.pb.go | 700 |
pkg/github.com/thanos-io/thanos/pkg/store/hintspb/hints.pb.go | 752 |
pkg/github.com/thanos-io/thanos/pkg/store/hintspb/hints.pb.go | 788 |
pkg/github.com/thanos-io/thanos/pkg/store/hintspb/hints.pb.go | 881 |
pkg/github.com/thanos-io/thanos/pkg/store/hintspb/hints.pb.go | 1134 |
pkg/github.com/thanos-io/thanos/pkg/store/hintspb/hints.pb.go | 1304 |
Visit the Lift Web Console to find more details in your report.
ℹ️ Expand to see all @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
@@ -306,51 +296,10 @@ func testInjectExtLabels(tb testutil.TB) { | |||
} | |||
|
|||
var ( | |||
zdest ZLabel | |||
zdest *Label |
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.
unused: var zdest
is unused
ℹ️ Expand to see all @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
@@ -306,51 +296,10 @@ func testInjectExtLabels(tb testutil.TB) { | |||
} | |||
|
|||
var ( | |||
zdest ZLabel | |||
zdest *Label | |||
dest Label |
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.
unused: var dest
is unused
ℹ️ Expand to see all @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
f8616b1
to
a4a9126
Compare
a4a9126
to
04782eb
Compare
func ZLabelsFromPromLabels(lset labels.Labels) []ZLabel { | ||
return *(*[]ZLabel)(unsafe.Pointer(&lset)) | ||
// ProtobufLabelsFromPromLabels converts Prometheus labels to a slice pointers to labelpb.Label. | ||
func ProtobufLabelsFromPromLabels(lset labels.Labels) []*Label { |
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 kinda defeats the purpose of ZLabels. Can we use the protobuf definitions from Prometheus directly?
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 don't think we can since Prometheus protobuf is generated with gogoprotobuf and that interferes with our code. Worth testing out but I think we might get a similar panic to this one.
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.
Isnt ZLabel going away with prometheus stringlabels anyway?
e7683b5
to
c5e0a2e
Compare
7eafa8f
to
c878456
Compare
@@ -14,7 +14,7 @@ import ( | |||
"sync" | |||
"time" | |||
|
|||
"github.com/gogo/protobuf/proto" | |||
"github.com/golang/protobuf/proto" |
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.
SA1019: "github.com/golang/protobuf/proto" is deprecated: Use the "google.golang.org/protobuf/proto" package instead.
ℹ️ Expand to see all @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
@@ -10,14 +10,15 @@ import ( | |||
"testing" | |||
"time" | |||
|
|||
"github.com/gogo/protobuf/proto" | |||
"github.com/golang/protobuf/proto" |
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.
SA1019: "github.com/golang/protobuf/proto" is deprecated: Use the "google.golang.org/protobuf/proto" package instead.
ℹ️ Expand to see all @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
@@ -14,7 +14,7 @@ import ( | |||
"sync" | |||
"time" | |||
|
|||
"github.com/gogo/protobuf/proto" | |||
"github.com/golang/protobuf/proto" |
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.
staticcheck: SA1019: "github.com/golang/protobuf/proto" is deprecated: Use the "google.golang.org/protobuf/proto" package instead.
ℹ️ Expand to see all @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
@@ -10,14 +10,15 @@ import ( | |||
"testing" | |||
"time" | |||
|
|||
"github.com/gogo/protobuf/proto" | |||
"github.com/golang/protobuf/proto" |
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.
staticcheck: SA1019: "github.com/golang/protobuf/proto" is deprecated: Use the "google.golang.org/protobuf/proto" package instead.
ℹ️ Expand to see all @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
c878456
to
466730d
Compare
*: remove and ban github.com/golang/protobuf/proto Signed-off-by: Michael Hoffmann <mhoffm@posteo.de>
466730d
to
e58eb48
Compare
WIP: get rid of gogoproto and introduce vtproto
state: