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
[groups] Put child's name in the notification, also added count of additional children #4371
[groups] Put child's name in the notification, also added count of additional children #4371
Changes from 2 commits
78ef79f
4e9afcf
59d5148
a1fbc6f
63a41cf
d379157
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.
nit:
please don't hamming code variable names here.
I think
downChildrenName
anddownChildrenCount
are better namesThere 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'll go with downChildName and failureCount
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.
names are different despite close in meaning => don't think this is good for long-term maintence
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.
Your petulant complaints have made contributing to this project far more trouble than it is worth. Good day, sir.
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 we are not on the same page what the job as a maintainer is. I see it as making sure that the project can and will move in the right direction.
This does mean that the primary job is to make sure that the code stays maintainable and readable.
The job is not to blindly accept any contribution.
What might be a source of miscommunication is my usage of
nit:
comments. These comments can be addressed, but does not have to.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 it would be better to collect the
DOWN
-children in a list instead of doing this double accounting (last name + count).This would allow adding this to the logging output, and I think the code might look better.
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.
Even including the count was beyond the scope of the original request. It's simple, doesn't use any extra memory, and makes the message more informative. I'll stick with what I have.
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 am not convinced that the extra memory of a few child-names will matter for overall performance/memory consumption.
Yes, my approach does consume a bit more memory, but assuming reasonably long names and a reasonable ammount of monitors per group this likely won't be a problem.
I do think adding a separate mechanism for accounting for the failed number is sort of a footgun => I would prefer a list for tracking this ^^
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.
Re https://github.com/louislam/uptime-kuma/pull/4371/files#r1452660704
(I can't add the second line to the suggestion)
I did forget to add the second line to the code suggestion.
I don't think the comparison with
getPathName
is fair as said function does do a lot more.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.