Update node_readiness_evaluation_duration_seconds + tests - #447
Update node_readiness_evaluation_duration_seconds + tests#447rawadhossain wants to merge 2 commits into
Conversation
Signed-off-by: Rawad Hossain <rawad.hossain00@gmail.com>
✅ Deploy Preview for node-readiness-controller ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: rawadhossain The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @rawadhossain. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/cc @AvineshTripathi |
|
/ok-to-test |
|
/retest |
AvineshTripathi
left a comment
There was a problem hiding this comment.
I feel we are adding redundancy here for every metric test. All the metrics-related test cases, unless they have a special case, will follow the same structure i.e.
- Check if they are getting registered and have correct help and format etc
- a case where we test the reflection(a change is done and we want that change to reflect it)
I feel we can give a generic test or maybe reuse for above cases
| prometheus.HistogramOpts{ | ||
| Name: "node_readiness_evaluation_duration_seconds", | ||
| Help: "Duration of rule evaluations per rule", | ||
| Help: "Duration of rule evaluations per rule, including taint operations", |
There was a problem hiding this comment.
| Help: "Duration of rule evaluations per rule, including taint operations", | |
| Help: "End-to-end duration of rule evaluation, including any taint add/remove operations", |
The current wording "Duration of rule evaluations per rule, including taint operations" reads as if the metric tracks two separate things. The suggested wording makes it clear that taint operations are part of what's being timed.
wdyt? Open to even better wording
There was a problem hiding this comment.
@AvineshTripathi I think that's a good point. Made the changes, now two reusable helpers used in tests and also updated the help text to Duration of evaluating a rule against a node, including any taint add/remove operations.
PTAL. Thanks!
|
/lgtm cc @ajaysundark for approval |
Description
node_readiness_evaluation_duration_secondsto include taint operations. No name, label, or bucket change.internal/metrics/metrics_test.go, also contributes to testing: Add Test Coverage for Prometheus Metrics #269.from the design doc:
Related to #446
Type of Change
/kind documentation
Testing
make test,make lint,go vet,gofmt -lall pass.Checklist
make testpassesmake lintpasses