Repository navigation
Rename endpoint_slice_controller_changes to add _total suffix - #140447
kubernetes-prow[bot] merged 8 commits into
Conversation
|
|
|
Welcome @cipheraxat! |
|
Hi @cipheraxat. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. 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. |
|
This PR may require API review. If so, when the changes are ready, complete the pre-review checklist and request an API review. Status of requested reviews is tracked in the API Review project. |
|
/cc @bhope |
|
This PR may require stable metrics review. Stable metrics are guaranteed to not change. Please review the documentation for the requirements and lifecycle of stable metrics and ensure that your metrics meet these guidelines. |
e862d5c to
a5b0f07
Compare
| } | ||
| } | ||
|
|
||
| func TestReconcileEndpointSlicesMetrics_ChangesTotal_CollectAndCompare(t *testing.T) { |
There was a problem hiding this comment.
Instead of this test which just invokes CollectAndCompare() on the new metric, prefer updating existing assertions for the deprecated EndpointSliceChanges metric and add similar ones for EndpointSliceChangesTotal metric in those existing tests?
There was a problem hiding this comment.
Thanks @richabanker , its done. Removed the standalone CollectAndCompare test and extended the existing assertions for the deprecated EndpointSliceChanges metric to also assert EndpointSliceChangesTotal (in the delete test and in expectMetrics for create/update/delete).
|
/lgtm Can approve once the only outstanding comment is addressed. Thanks for the contribution! |
|
LGTM label has been added. DetailsGit tree hash: 88999a95d7c5df51d49ad609e35f1e0d8fb53219 |
Drop the standalone CollectAndCompare test for the new metric and instead extend the existing assertions for the deprecated EndpointSliceChanges metric to also check EndpointSliceChangesTotal, per review feedback.
The delete test intentionally asserts the deprecated EndpointSliceChanges metric during the deprecation period, so add a nolint exemption for the SA1019 deprecation warning.
|
/lgtm from metrics POV. Thanks for the PR! |
|
LGTM label has been added. DetailsGit tree hash: 899be872e4338c7bfac7351f2dbb4611f93633fe |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aojea, cipheraxat, danwinship, richabanker The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest-required |
|
This was my first contribution to Kubernetes , thank you all for the thoughtful reviews and patience throughout. @tico88612 @rexagod @Mujib-Ahasan appreciate the suggestions that shaped this (deprecation path, stability level, and test coverage). @richabanker @aojea @danwinship thanks for the lgtm and approvals. Learned a lot. Looking forward to the next one! |
…etes#140447) * Rename endpoint_slice_controller_changes to add _total suffix The endpoint_slice_controller_changes counter lacks the conventional _total suffix required for counters. Introduce endpoint_slice_controller_changes_total at ALPHA and deprecate the old name in 1.37. Metrics cannot be introduced at BETA, so graduation of the new name is deferred to a follow-up after the required soak period. Both metrics are incremented during the transition. * Bump endpoint_slice_controller_changes deprecation to 1.38 1.37 is under code freeze, so deprecate the old metric name in 1.38 instead. * Address review feedback for endpoint_slice_controller_changes rename Update the deprecated metric Help text to point at the replacement name and add a CollectAndCompare test for endpoint_slice_controller_changes_total. * Update metrics documentation list for deprecated changes metric Sync documentation-list.yaml after updating the deprecated metric Help text to reference endpoint_slice_controller_changes_total. * Drop redundant StabilityLevel note on EndpointSliceChangesTotal The ALPHA StabilityLevel is already set on the metric opts; the extra comment restating that policy was unnecessary. * Assert changes_total alongside deprecated changes in existing tests Drop the standalone CollectAndCompare test for the new metric and instead extend the existing assertions for the deprecated EndpointSliceChanges metric to also check EndpointSliceChangesTotal, per review feedback. * Exempt deprecated metric assertion from staticcheck in test The delete test intentionally asserts the deprecated EndpointSliceChanges metric during the deprecation period, so add a nolint exemption for the SA1019 deprecation warning. * Fix gofmt indentation in reconciler metric assertions --------- Co-authored-by: cipheraxat <[email protected]>
…etes#140447) * Rename endpoint_slice_controller_changes to add _total suffix The endpoint_slice_controller_changes counter lacks the conventional _total suffix required for counters. Introduce endpoint_slice_controller_changes_total at ALPHA and deprecate the old name in 1.37. Metrics cannot be introduced at BETA, so graduation of the new name is deferred to a follow-up after the required soak period. Both metrics are incremented during the transition. * Bump endpoint_slice_controller_changes deprecation to 1.38 1.37 is under code freeze, so deprecate the old metric name in 1.38 instead. * Address review feedback for endpoint_slice_controller_changes rename Update the deprecated metric Help text to point at the replacement name and add a CollectAndCompare test for endpoint_slice_controller_changes_total. * Update metrics documentation list for deprecated changes metric Sync documentation-list.yaml after updating the deprecated metric Help text to reference endpoint_slice_controller_changes_total. * Drop redundant StabilityLevel note on EndpointSliceChangesTotal The ALPHA StabilityLevel is already set on the metric opts; the extra comment restating that policy was unnecessary. * Assert changes_total alongside deprecated changes in existing tests Drop the standalone CollectAndCompare test for the new metric and instead extend the existing assertions for the deprecated EndpointSliceChanges metric to also check EndpointSliceChangesTotal, per review feedback. * Exempt deprecated metric assertion from staticcheck in test The delete test intentionally asserts the deprecated EndpointSliceChanges metric during the deprecation period, so add a nolint exemption for the SA1019 deprecation warning. * Fix gofmt indentation in reconciler metric assertions --------- Co-authored-by: cipheraxat <[email protected]>
…etes#140447) * Rename endpoint_slice_controller_changes to add _total suffix The endpoint_slice_controller_changes counter lacks the conventional _total suffix required for counters. Introduce endpoint_slice_controller_changes_total at ALPHA and deprecate the old name in 1.37. Metrics cannot be introduced at BETA, so graduation of the new name is deferred to a follow-up after the required soak period. Both metrics are incremented during the transition. * Bump endpoint_slice_controller_changes deprecation to 1.38 1.37 is under code freeze, so deprecate the old metric name in 1.38 instead. * Address review feedback for endpoint_slice_controller_changes rename Update the deprecated metric Help text to point at the replacement name and add a CollectAndCompare test for endpoint_slice_controller_changes_total. * Update metrics documentation list for deprecated changes metric Sync documentation-list.yaml after updating the deprecated metric Help text to reference endpoint_slice_controller_changes_total. * Drop redundant StabilityLevel note on EndpointSliceChangesTotal The ALPHA StabilityLevel is already set on the metric opts; the extra comment restating that policy was unnecessary. * Assert changes_total alongside deprecated changes in existing tests Drop the standalone CollectAndCompare test for the new metric and instead extend the existing assertions for the deprecated EndpointSliceChanges metric to also check EndpointSliceChangesTotal, per review feedback. * Exempt deprecated metric assertion from staticcheck in test The delete test intentionally asserts the deprecated EndpointSliceChanges metric during the deprecation period, so add a nolint exemption for the SA1019 deprecation warning. * Fix gofmt indentation in reconciler metric assertions --------- Co-authored-by: cipheraxat <[email protected]>
What type of PR is this?
/kind cleanup
/sig instrumentation
/sig network
What this PR does / why we need it:
endpoint_slice_controller_changesis a counter that lacks the conventional_totalsuffix, which blocks any future graduation past Alpha (see #136306 / #136368).This PR:
endpoint_slice_controller_changes_totalat ALPHA (metrics cannot be introduced at BETA).endpoint_slice_controller_changesname in 1.37 (DeprecatedVersion), keeping it at ALPHA for the deprecation grace period.A follow-up can graduate
endpoint_slice_controller_changes_totalto BETA after the required soak period.Which issue(s) this PR fixes:
Related to #136306
Special notes for your reviewer:
Addresses review feedback from @tico88612 (rename + deprecation instead of graduating the misnamed metric) and @rexagod (do not introduce the replacement metric at BETA).
Does this PR introduce a user-facing change?