Skip to content

Rename endpoint_slice_controller_changes to add _total suffix - #140447

Merged
kubernetes-prow[bot] merged 8 commits into
kubernetes:masterfrom
cipheraxat:graduate-endpoint-slice-changes-beta
Aug 31, 2026
Merged

kubernetes-prow[bot] merged 8 commits into
kubernetes:masterfrom
cipheraxat:graduate-endpoint-slice-changes-beta

Conversation

@cipheraxat

@cipheraxat cipheraxat commented Jul 11, 2026 •

Copy link
Copy Markdown
Contributor

What type of PR is this?

/kind cleanup
/sig instrumentation
/sig network

What this PR does / why we need it:

endpoint_slice_controller_changes is a counter that lacks the conventional _total suffix, which blocks any future graduation past Alpha (see #136306 / #136368).

This PR:

  • Introduces endpoint_slice_controller_changes_total at ALPHA (metrics cannot be introduced at BETA).
  • Deprecates the old endpoint_slice_controller_changes name in 1.37 (DeprecatedVersion), keeping it at ALPHA for the deprecation grace period.
  • Increments both metrics during the transition so there is no gap in telemetry.
  • Updates generated metric documentation accordingly.

A follow-up can graduate endpoint_slice_controller_changes_total to 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?

The `endpoint_slice_controller_changes` metric is deprecated in favor of `endpoint_slice_controller_changes_total`. Both metrics are emitted during the deprecation period.

@kubernetes-prow kubernetes-prow Bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API size/S Denotes a PR that changes 10-29 lines, ignoring generated files. sig/network Categorizes an issue or PR as relevant to SIG Network. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. labels Jul 11, 2026
@linux-foundation-easycla

linux-foundation-easycla Bot commented Jul 11, 2026 •

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: cipheraxat / name: Akshat Anand (14af122)

@kubernetes-prow kubernetes-prow Bot added needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Jul 11, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

Welcome @cipheraxat!

It looks like this is your first PR to kubernetes/kubernetes 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/kubernetes has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@kubernetes-prow

Copy link
Copy Markdown
Contributor

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions 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.

@kubernetes-prow kubernetes-prow Bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 11, 2026
@github-project-automation github-project-automation Bot moved this to Needs Triage in SIG Instrumentation Jul 11, 2026
@kubernetes-prow
kubernetes-prow Bot requested review from bowei and nmn3m July 11, 2026 15:21
@kubernetes-prow kubernetes-prow Bot added area/stable-metrics Issues or PRs involving stable metrics cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Jul 11, 2026
@k8s-triage-robot

Copy link
Copy Markdown

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.

@nmn3m

nmn3m commented Jul 11, 2026

Copy link
Copy Markdown
Member

/cc @bhope
I didn't find any PR opened from your side related to promoting these metrics. It looks good to me; feel free to give it another look.
/ok-to-test

@kubernetes-prow
kubernetes-prow Bot requested a review from bhope July 11, 2026 16:10
@kubernetes-prow kubernetes-prow Bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 11, 2026
@k8s-triage-robot

Copy link
Copy Markdown

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.

@kubernetes-prow kubernetes-prow Bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jul 11, 2026
@cipheraxat

cipheraxat commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor Author

Hi @bhope , @nmn3m already gave /ok-to-test and a quick look; happy to address any feedback. Thanks!

@kubernetes-prow kubernetes-prow Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 17, 2026
@cipheraxat
cipheraxat force-pushed the graduate-endpoint-slice-changes-beta branch from e862d5c to a5b0f07 Compare July 17, 2026 08:08
@kubernetes-prow kubernetes-prow Bot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 28, 2026
@kubernetes-prow
kubernetes-prow Bot requested review from rexagod and tico88612 August 28, 2026 04:46
@kubernetes-prow kubernetes-prow Bot removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Aug 28, 2026
}
}

func TestReconcileEndpointSlicesMetrics_ChangesTotal_CollectAndCompare(t *testing.T) {

@richabanker richabanker Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@cipheraxat cipheraxat Aug 29, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

@richabanker

Copy link
Copy Markdown
Contributor

/lgtm

Can approve once the only outstanding comment is addressed. Thanks for the contribution!

@kubernetes-prow kubernetes-prow Bot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 28, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

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.
@kubernetes-prow kubernetes-prow Bot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 29, 2026
@kubernetes-prow
kubernetes-prow Bot requested a review from richabanker August 29, 2026 05:27
The delete test intentionally asserts the deprecated EndpointSliceChanges
metric during the deprecation period, so add a nolint exemption for the
SA1019 deprecation warning.
@richabanker

Copy link
Copy Markdown
Contributor

/lgtm
/approve

from metrics POV. Thanks for the PR!

@kubernetes-prow kubernetes-prow Bot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 31, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

LGTM label has been added.

DetailsGit tree hash: 899be872e4338c7bfac7351f2dbb4611f93633fe

@kubernetes-prow

Copy link
Copy Markdown
Contributor

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubernetes-prow kubernetes-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 31, 2026
@cipheraxat

Copy link
Copy Markdown
Contributor Author

/retest-required

@kubernetes-prow
kubernetes-prow Bot merged commit 4327fee into kubernetes:master Aug 31, 2026
13 checks passed
@kubernetes-prow kubernetes-prow Bot added this to the v1.38 milestone Aug 31, 2026
@github-project-automation github-project-automation Bot moved this from Needs Approval to Done in SIG Instrumentation Aug 31, 2026
@cipheraxat

Copy link
Copy Markdown
Contributor Author

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!

adrianmoisey pushed a commit to adrianmoisey/kubernetes that referenced this pull request Sep 1, 2026
…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]>
darshansreenivas pushed a commit to darshansreenivas/kubernetes that referenced this pull request Sep 5, 2026
…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]>
darshansreenivas pushed a commit to darshansreenivas/kubernetes that referenced this pull request Sep 6, 2026
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/stable-metrics Issues or PRs involving stable metrics cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. sig/network Categorizes an issue or PR as relevant to SIG Network. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

9 participants