-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Add per-badge metrics for BaseService #3093
Merged
Merged
Changes from 12 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
728ad84
Add per-badge metrics for BaseService
paulmelnikow 6077a8d
Rework using labels
paulmelnikow 6a3dc15
Fixes
paulmelnikow 4d8547a
Fix crash in tests
paulmelnikow 9bbbbae
Fix comment, rm validateMetricName
paulmelnikow ed0d5ed
Merge branch 'master' into metrics-per-badge
paulmelnikow 2653440
Fix imports after merge
paulmelnikow acc4fef
Fix nonmemorycaching
paulmelnikow 0eccefd
Merge branch 'master' into metrics-per-badge
paulmelnikow 664c0e9
DeprecatedService: Add test of name, and fix
paulmelnikow 11ad6ab
Fix and test name for redirects
paulmelnikow e77a3ed
Comment on camelcase in discourse
paulmelnikow 80cc602
so we get
paulmelnikow 1fc4862
Merge branch 'master' into metrics-per-badge
paulmelnikow File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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 kinda liked the old function signature with the named fields on the param object. Any reason we can't (or shouldn't) keep that? I guess that'd require a different argument on line 23 below (although I assume something like
arguments[0]
or something else could still make that work)Not a blocking issue for me but wanted to ask
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 tend to think of
arguments
as being magical and leading to unexpected things. Though here I guess the reason would be to allow using a more readable function signature with a concise call toJoi.validate
. I'll do that if you think it improves things.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.
Yeah and that's a fair tradeoff. I just like it when my editor gives me good intellisense 😄 I don't feel particularly strongly either way and so defer to your preference. In fairness, this isn't something that will be used all that commonly (at least I hope there won't be a ton of deprecated services)
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.
Hrm, I just went to update this, but ran into an issue where the variables also have to be re-assigned inside if we want to let Joi set default values. I feel like that makes it not worth it.
Related aside: I'm not sure there is an issue open for it yet, but autocomplete-friendly docs for core + helpers is on the roadmap. Maybe we should get that started! Do you know of any tooling for checking that, or what format should be used?
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.
SGTM! Doing one final glance over this and then will approve
Do you mean tooling to check for autocomplete friendliness? I suppose the answer is no either way 😆 but can start digging into it 👍
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.
Yea, I guess it's to validate that the documentation is complete, formatted correctly, and matches the function.
Ooh, there's an eslint plugin!
https://github.com/gajus/eslint-plugin-jsdoc
We could turn it some of those on as warnings, and maybe some as errors, and start working our way through…
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! We'd able to leverage the eslint overrides feature from the root config to set the rule for certain files/directories progressively to do just that