-
Notifications
You must be signed in to change notification settings - Fork 467
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
Cut v1.6.0 #554
Cut v1.6.0 #554
Conversation
Signed-off-by: beorn7 <beorn@grafana.com>
Signed-off-by: beorn7 <beorn@grafana.com>
Signed-off-by: beorn7 <beorn@grafana.com>
@SuperQ Note the new |
// MetricFamily and unmarshals it into a proto message object first. Then it | ||
// marshals both the expected and the got proto message into a binary protobuf, | ||
// which it then compares. | ||
func verifyMetricFamily(t *testing.T, expText string, got *dto.MetricFamily) { |
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 wonder if we should add this helper somewhere in common.
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.
Yes, we should consider moving it up when it gets used there, too. However, I'm not quite sure yet if this is really the right way to do it… maybe some deep comparison without the final marshaling would be better?
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.
The recommended way I saw was to use https://pkg.go.dev/github.com/google/go-cmp/cmp to compare with https://pkg.go.dev/google.golang.org/protobuf/testing/protocmp.
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.
Oooof… two more dependencies instead of zero… I'd say we leave it as is in this PR and take some more time to consider our options for prometheus/common.
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.
Yea, I'm not a fan of what this change requires.
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 would also recommend copying .github/workflows/golangci-lint.yml
from node_exporter. We stopped syncing this from prometheus/prometheus
.
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 would also recommend copying .github/workflows/golangci-lint.yml
from node_exporter. We stopped syncing this from prometheus/prometheus
.
Signed-off-by: beorn7 <beorn@grafana.com>
Signed-off-by: beorn7 <beorn@grafana.com>
Signed-off-by: beorn7 <beorn@grafana.com>
Thanks for all the hints. All done. |
@SuperQ I assume your comments are all addressed. I'll merge now and publish the release. You have 30 seconds to object. :-> |
No description provided.