-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
KEP-4008: CRDValidationRatcheting Metrics #121462
KEP-4008: CRDValidationRatcheting Metrics #121462
Conversation
abbe62e
to
5891b78
Compare
5891b78
to
b9bb88e
Compare
staging/src/k8s.io/apiextensions-apiserver/test/integration/ratcheting_test.go
Outdated
Show resolved
Hide resolved
Name: "ratcheting_seconds", | ||
Help: "Time for comparison of old to new for the purposes of CRDValidationRatcheting during an UPDATE in seconds.", | ||
StabilityLevel: metrics.ALPHA, | ||
// Start 0.01ms with the last bucket being [~2.5s, +Inf) |
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 2.5s enough?
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.
IMO, 2.5s is basically infinite time yeah. I have very little patience.
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 so. For the comparison to be on the order of seconds is already very concerning. IMO higher buckets wouldn't give much more information than 2.5s
/triage accepted |
b9bb88e
to
3d8b921
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.
/lgtm
/approve
(from a sig-instrumentation perspective)
LGTM label has been added. Git tree hash: 995b2c3892867966518a602adebe60f377519320
|
t.Run(tt.desc, func(t *testing.T) { | ||
defer func() { | ||
// No reset function for prometheus histogram metric | ||
// so recreate it (can't use newValidationMetrics() because it's private |
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.
/hold
cc @logicalhan had some difficulties here resetting the histogram metric since it is not a Vec
and does not expose a Reset()
. For now the tests are order dependent.
Do you have any advice to workaround?
EDIT: comment is inaccurate, since re-registering is not allowed
3d8b921
to
5293b0c
Compare
5293b0c
to
894a31b
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.
/approve
The metric def and the bucket distribution LGTM. Leaning on @logicalhan's review of the instrumentation specifics.
894a31b
to
c73ffe7
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.
/lgtm
for metrics
LGTM label has been added. Git tree hash: 787feb05ddbdbcf3635bc19a57d8abae415084da
|
c73ffe7
to
4bb7dc2
Compare
Added another check to the test that the real durations is > 0, and cleaned up naming a little. /hold cancel |
@logicalhan @jpbetz needs |
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.
/lgtm
(for metrics)
LGTM label has been added. Git tree hash: 00b15fa4a923801c8e1398db3ca2c6e1d4290dd9
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alexzielenski, jpbetz, logicalhan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Adds metrics to the comparison for CRDValidationRatcheting
Which issue(s) this PR fixes:
N/A
Special notes for your reviewer:
/sig api-machinery
/assign @apelisse
This was split off of #121343 and is based on top of it, so requires it to merge first.
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: