-
Notifications
You must be signed in to change notification settings - Fork 320
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 Go modules #479
Update Go modules #479
Conversation
It's going to take a couple rounds of updates to eliminate the |
Nothing works… :-/ |
Not sure what to do about this issue:
|
Now that we can see the required changes here: Isn't that exactly the problem that has kept us from doing this kind of upgrade? This will trickle down to prometheus/client_golang, and then users of client_golang that have been importing Not everyone is actually touching any proto types when using client_golang, but there will still be a lot of users affected. @bwplotka @kakkoyun WDYT? |
I don't think it's actually an issue, we just need to do the update and the circular dependency will resolve. This moves the old library to an indirect dependency, which means it will vanish from client_golang in the next release. |
I think I'm referring to something else. Look at https://github.com/beorn7/histogram_experiments/blob/master/cmd/float_gauge/main.go as a somewhat weird example (but there are less invasive usages out there that will run into the same problem). It is manipulating the metrics during gathering on the level of the proto types. This program will need to be changed (at least the import line, possibly more) with the first release of client_golang that includes these updates. That's technically a breaking change that is not signaled by a major version bump. |
Ok, so the breaking change is that Is there a way to maintain old behaviour? How this will get bubbled to the user who use our proto code? Compilation error, right? I would need to check details, but if there is not much we can do it's fine to announce breaking change in release change log and go for it. Any follow ups on #479 (comment)? I'm busy at the moment, but can take a look on Friday. |
About the copylocks warning: That's to be taken seriously, I think. It's in expfmt/decode.go:135 . Maybe we can explicitly copy just the exported fields? I'll try to propose something. |
Yes, but maybe also change code, in the same style as in this PR. |
Most users of client_golang don't directly manipulate the proto. So for most users it's just going to be a Go modules change and will happen automatically. |
I have added a commit that should fix the lint warning. |
I did a quick search, the only prometheus code I could find that directly manipulates the proto is the pushgateway. |
Yeah, that's a good data point. |
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.
* Replace deprecated `github.com/golang/protobuf` dependency. * Update various Go modules. Signed-off-by: SuperQ <superq@gmail.com>
Signed-off-by: beorn7 <beorn@grafana.com>
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!
github.com/golang/protobuf
dependency.