-
Notifications
You must be signed in to change notification settings - Fork 11
update golang.org/x/{crypto,net,sys} and github.com/prometheus/client_golang #9
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
Conversation
algorandskiy
left a comment
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 guess ubuntu 20.04 build image also needs to be upgraded
|
@onetechnical I think we should run this locally or in one of our build environments before updating packages in algod. |
| c.NFSTransportIdleTimeSeconds, | ||
| prometheus.GaugeValue, | ||
| s.Transport.IdleTime.Seconds(), | ||
| float64(s.Transport.IdleTimeSeconds%float64Mantissa), |
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.
What the heck is this doing?
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 was copied from prometheus#1364 which updated the upstream dependency, while fixing a rollover bug in the handling of some values collected. The function .Seconds() was removed from the upstream library, I think to force downstream consumers to do their own unit conversions (?). Because counters in Prometheus are meant to "roll over" to 0, usually when they hit some kind of max like MaxInt64, or otherwise, he is manually implementing a custom max here (Grafana and other systems handle metrics rollovers pretty well when deriving values like rates, etc). Since this is a float64 counter (I think for legacy reasons, this was a float before, so he is preserving its type?), I believe he wanted to pick a max value that would safely roll over. On his commit he left the comment Rollover counter automatically to avoid float64 accuracy issues. so I think he is trying to avoid some precision cliff?
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 think I get it. That value is probably the largest that can be represented precisely in a float64.
Steps to reproduce:
also changed calls to renamed functions in updated github.com/prometheus/procfs package and related dependencies.