Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Emit YAML for events cachemgr report #1792
base: master
Are you sure you want to change the base?
Emit YAML for events cachemgr report #1792
Changes from 5 commits
8558e73
68b1eb1
b369c03
553a97b
3375bbe
cacc9df
4fa6429
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Please avoid unnecessary abbreviations, especially non-standard ones.
Many of these events wait for hours. I recommend removing "seconds" from the item key so that we can easily change it later, when we improve support for time units:
... or something like that.
Finally, many of these events do not repeat so "next" is quite misleading here. I would rephrase further to avoid the (often wrong) implication (e.g., "runs in ... seconds" or "scheduled to run in ... seconds").
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.
... seconds
, from the YAML schema perspective, turns the field from a number into a string, requiring additional work for automations.In fact, in an ideal world I would specify the unit in a comment for the benefit of humans only: specifying it in the key means that if we change time unit the key changes
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.
we can use an inline comment:
next execution in: ... # seconds
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 strongly disagree with the implication that consuming unitless numbers (or dealing with field key changes) is overall better "for automations" than consuming numbers with units (because the latter requires "additional work"). And since lots of Squid report fields do use units of various kinds, and using units often makes reports more readable for humans, that "additional work" will most likely be required anyway and will be amortized across various consumed reports.
Our ideals differ: Ideally, as a consumer application developer, I would want units to be correctly processed by my code rather than hidden from it in a YAML comment, especially if units change based on the reported value (to assist human readers).
Agreed. The unit should not go into the field key, especially when the unit should change based on the reported value (for human benefit). That is why I explicitly recommended removing PR-added seconds from the field key.