chore: use HumanizeDuration from prometheus/common#14202
chore: use HumanizeDuration from prometheus/common#14202machine424 merged 3 commits intoprometheus:mainfrom
Conversation
Signed-off-by: Sergey <freak12techno@gmail.com>
Signed-off-by: Sergey <freak12techno@gmail.com>
|
@machine424 can you review or ask somebody to do so? not sure who to ping here |
machine424
left a comment
There was a problem hiding this comment.
Thanks.
Now that we have convertToFloat in commons as well, maybe we could expose it and use it here as well.
|
@machine424 unfortunately convertToFloat isn't exported: https://github.com/prometheus/common/pull/627/files#diff-c8c3e840ed35e815552e86f6ef5b464d17ed5b61fe947b9c634a454c886db9a3R23 On your other comment, fixed it as well, can you review it once more? |
machine424
left a comment
There was a problem hiding this comment.
Yes, after exposing/exporting it of course. It was just an idea.
Thanks again.
|
Just to clarify, the idea seems nice. Maybe even better approach would be to remove the need of having to use convertToFloat internally in prometheus by moving all the functions that use it to common as well (given that convertToFloat isn't used outside of template funcs as far I as can see)? What do you think? @machine424 |
I'd only move to commons, the utils that are to be used in other repos and that we are willing to share. |
|
@machine424 also agree, but given that |
|
@machine424 can we get this merged or is there something else to do here? |
|
If @gotjosh, as he reviewed the commons PR, has no remarks, I'll merge. |
Fixes #14198.
Removed the implementation of HumanizeDuration, which I moved to prometheus/common in another PR to reuse it in Alertmanager as well.