-
Notifications
You must be signed in to change notification settings - Fork 69
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
Clarify and clean up template contract for status #149
Conversation
Ring was passing a mix of time.Time and formatted string for the time: unified to pass always time.Time, and decide what to do when rendering. This will allow us some extra customisation if replacing the template with a non-default one. Also replaced the "Unhealthy" state by "UNHEALTHY" in the template, because the rest of states are uppercase. Not replacing the constant value because it's being used for metrics and we'd have to fix the recording rules in all the downstream projects. Changed how heartbeat time is rendered: rendering the duration since the heartbeat and the time in parenthesis: heartbeats are so common that showing a date doesn't make sense, and since they're usually few seconds away, the "duration ago" is what makes more sense IMO. Signed-off-by: Oleg Zaytsev <[email protected]>
Signed-off-by: Oleg Zaytsev <[email protected]>
de8e589
to
0b963d9
Compare
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.
Nice, thank you!
We don't need 4 Signed-off-by: Oleg Zaytsev <[email protected]>
Signed-off-by: Oleg Zaytsev <[email protected]>
@@ -22,6 +22,7 @@ | |||
* [CHANGE] ring/client: It's now possible to set different value than `consul` as default KV store. #120 | |||
* [CHANGE] Lifecycler: Default value of lifecycler's `final-sleep` is now `0s` (i.e. no sleep). #121 | |||
* [CHANGE] Lifecycler: It's now possible to change default value of lifecycler's `final-sleep`. #121 | |||
* [CHANGE] Minor cosmetic changes in ring and memberlist HTTP status templates. #149 |
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.
Is this really a breaking change? Looks like the output is for humans.
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.
It is definitely not breaking, but it's a change. Would you prefer this to be an [ENHANCEMENT]
?
What this PR does:
Ring was passing a mix of time.Time and formatted string for the time: unified to pass always time.Time, and decide what to do when rendering. This will allow us some extra customisation if replacing the template with a non-default one.
Also replaced the "Unhealthy" state by "UNHEALTHY" in the template, because the rest of states are uppercase. Not replacing the constant value because it's being used for metrics and we'd have to fix the recording rules in all the downstream projects.
Changed how heartbeat time is rendered: rendering the duration since the heartbeat and the time in parenthesis: heartbeats are so common that showing a date doesn't make sense, and since they're usually few seconds away, the "duration ago" is what makes more sense IMO.
Which issue(s) this PR fixes:
Relates to #148
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]