Skip to content
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

Fix, deprecate apiserver_flowcontrol_request_concurrency_limit #118959

Merged
merged 1 commit into from Jul 17, 2023

Conversation

MikeSpreitzer
Copy link
Member

@MikeSpreitzer MikeSpreitzer commented Jun 29, 2023

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

This PR deprecates the apiserver_flowcontrol_request_concurrency_limit metric, which rotted as we generalized request width and introduced borrowing. It is a duplicate of another metric with a better name and HELP string, apiserver_flowcontrol_nominal_limit_seats. This PR also copies that better HELP string into the apiserver_flowcontrol_request_concurrency_limit metric.

Which issue(s) this PR fixes:

Fixes #118957

Special notes for your reviewer:

Does this PR introduce a user-facing change?

The metric `apiserver_flowcontrol_request_concurrency_limit` has been deprecated and will be removed in a future release.  It is a duplicate of `apiserver_flowcontrol_nominal_limit_seats` (introduced in release 1.26) but has an outdated name and had an outdated HELP string.

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Jun 29, 2023
@MikeSpreitzer
Copy link
Member Author

@kubernetes/sig-api-machinery-bugs
/cc @JohnRusk
/cc @deads2k
/cc @wojtek-t
@tkashem

@k8s-ci-robot k8s-ci-robot added the sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. label Jun 29, 2023
@k8s-ci-robot
Copy link
Contributor

@MikeSpreitzer: GitHub didn't allow me to request PR reviews from the following users: JohnRusk.

Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

@kubernetes/sig-api-machinery-bugs
/cc @JohnRusk
/cc @deads2k
/cc @wojtek-t
@tkashem

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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. area/apiserver approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jun 29, 2023
@MikeSpreitzer
Copy link
Member Author

/uncc @yue9944882

@k8s-ci-robot k8s-ci-robot removed the request for review from yue9944882 June 29, 2023 05:33
Copy link

@JohnRusk JohnRusk left a comment

Choose a reason for hiding this comment

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

Nice

@wojtek-t
Copy link
Member

+1 for removing this metric, but I'm not sure if we don't officially deprecate metrics first.

/assign @dgrisonnet
Can you please double check that we're doing the right thing here?

@jiahuif
Copy link
Member

jiahuif commented Jun 29, 2023

/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jun 29, 2023
@MikeSpreitzer
Copy link
Member Author

I do not see a formal stability level for deprecation.

Copy link
Member

@andrewsykim andrewsykim left a comment

Choose a reason for hiding this comment

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

/hold

(on-going discussion in #118882)

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 5, 2023
@MikeSpreitzer
Copy link
Member Author

@andrewsykim : is there a reason to hold this one? The equivalent metric apiserver_flowcontrol_nominal_limit_seats is already available.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 10, 2023
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 10, 2023
@MikeSpreitzer
Copy link
Member Author

The force-push to 5205cba18b4 is a rebase plus the changes suggested in review above.

@MikeSpreitzer
Copy link
Member Author

/retest

Copy link
Member

@andrewsykim andrewsykim left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 11, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 9180ff9cc8b081aa827422e24cea92510c2428d2

@k8s-triage-robot
Copy link

The Kubernetes project has merge-blocking tests that are currently too flaky to consistently pass.

This bot retests PRs for certain kubernetes repos according to the following rules:

  • The PR does have any do-not-merge/* labels
  • The PR does not have the needs-ok-to-test label
  • The PR is mergeable (does not have a needs-rebase label)
  • The PR is approved (has cncf-cla: yes, lgtm, approved labels)
  • The PR is failing tests required for merge

You can:

/retest

Subsystem: subsystem,
Name: "request_concurrency_in_use",
Help: "Concurrency (number of seats) occupied by the currently executing (initial stage for a WATCH, any stage otherwise) requests in the API Priority and Fairness subsystem",
// Remove this metric once all suppported releases have the equal current_executing_seats metric
Copy link
Member

Choose a reason for hiding this comment

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

Similarly here

Copy link
Member Author

Choose a reason for hiding this comment

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

The equal metric current_executing_seats is being introduced in release 1.28, and that will be the oldest supported release when 1.31 is the latest release, so I am setting the deprecated version to 1.31 here.

Copy link
Member

Choose a reason for hiding this comment

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

If we're following what we did for nominal_seats_limit, this should actually be 1.32 (4 releases from 1.28) since nominal_seats_limit was introduced in 1.26.

Copy link
Member

Choose a reason for hiding this comment

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

We can fix in a follow-up though since this is a deprecation in a future version. I would be in favor of doing the deprecation on the same versions too, so maybe move both of them up to 1.32 or backport current_executing_seats to older versions and keep them both at 1.30?

@pacoxu
Copy link
Member

pacoxu commented Jul 11, 2023

/hold
as there are some comments to be addressed. #118959 (comment)

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 11, 2023
Because it is redundant and has a bad name and its HELP string was
outdated.

Also note intended retention period for request_concurrency_in_use.

Signed-off-by: Mike Spreitzer <mspreitz@us.ibm.com>
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 13, 2023
Name: "request_concurrency_limit",
Help: "Nominal number of execution seats configured for each priority level",
// Remove this metric once all suppported releases have the equal nominal_limit_seats metric
DeprecatedVersion: "1.30.0",
Copy link
Member

Choose a reason for hiding this comment

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

Why do you have 1.30 here (with 1.31 for the metric below)?

Copy link
Member Author

Choose a reason for hiding this comment

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

That is explained in my other comments in this PR.

@dgrisonnet
Copy link
Member

Since both metrics have replacements that just graduated to Beta with #119110, I would actually be fine with just straight up removing them without requiring a deprecation period as per https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/3498-extending-stability#alpha-metrics.

I used to ask for a deprecation period on Alpha metrics because we didn't have a Beta stability class in place which could have broken the expectations of the users, but now that we have finer grained classes starting from 1.28, renaming an Alpha metric to be eligible for Beta criterias is normal and expected so it shouldn't require deprecation.

@MikeSpreitzer
Copy link
Member Author

@dgrisonnet: the alpha metrics have established usage, despite being formally alpha. So we decided that for the sake of users of the old alpha metrics we will keep them available by default until the replacements are available in all supported releases.

@dgrisonnet
Copy link
Member

That approach is fine by me, I just wanted to mention that if you wanted you could also skip the deprecation period.

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 17, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 69171ef756123295d5c4349bf6e2bd88370c2e7b

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dgrisonnet, JohnRusk, MikeSpreitzer

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@andrewsykim
Copy link
Member

/hold cancel

(#118959 (comment) now addressed)

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 17, 2023
@k8s-ci-robot k8s-ci-robot merged commit af33d7a into kubernetes:master Jul 17, 2023
12 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.28 milestone Jul 17, 2023
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/apiserver cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. 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. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

APF metric request_concurrency_limit is redundant and badly described
9 participants