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

add deprecation policy for k8s metrics #27202

Merged
merged 3 commits into from
Mar 31, 2021

Conversation

logicalhan
Copy link
Member

Metric stability is now GA, updating deprecation policy accordingly.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 24, 2021
@logicalhan
Copy link
Member Author

/assign @lavalamp

@logicalhan
Copy link
Member Author

/sig instrumentation

@k8s-ci-robot k8s-ci-robot added the sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. label Mar 24, 2021
@k8s-ci-robot k8s-ci-robot added the language/en Issues or PRs related to English language label Mar 24, 2021
@k8s-ci-robot k8s-ci-robot added the sig/docs Categorizes an issue or PR as relevant to SIG Docs. label Mar 24, 2021
@netlify
Copy link

netlify bot commented Mar 24, 2021

Deploy preview for kubernetes-io-master-staging ready!

Built with commit b95b750

https://deploy-preview-27202--kubernetes-io-master-staging.netlify.app


* **STABLE metric: 3 releases**
* **STABLE (but deprecated): 2 releases**
* **STABLE (but deprecated and now hidden by default): 1 release**
Copy link
Member

Choose a reason for hiding this comment

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

This list isn't super clear, are these separate steps? Or do they overlap?

Copy link
Member Author

Choose a reason for hiding this comment

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

ah, they overlap. I'll rephrase.

* **STABLE (but deprecated and now hidden by default): 1 release**

Deprecated metrics have the same stability guarantees of their counterparts. If a stable
metric is deprecated, then a deprecated stable metric is guaranteed to not change. When
Copy link
Member

Choose a reason for hiding this comment

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

this sentence is super confusing but I don't know how to help it. Maybe don't make "alpha and deprecated" to be a possible thing. Alpha metrics just get removed, not deprecated. So all "deprecated" metrics must have once been stable, and therefore can't be changed, just like other stable metrics.

Copy link
Member Author

Choose a reason for hiding this comment

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

sgtm

which the metric will be considered deprecated.

Deprecated metrics will have their description text prefixed with a deprecation notice
string '(Deprecated from x.y)' and a warning log will be emitted during metric
Copy link
Member

Choose a reason for hiding this comment

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

What is the point to this warning log? consumers of the metrics aren't going to be looking at the logs at that time.

Copy link
Member Author

Choose a reason for hiding this comment

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

I disagree actually. Cluster admins also tend to also be consumers of metrics, so they may end up looking at the logs.

Copy link
Member

Choose a reason for hiding this comment

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

Sure, I don't object to logging them, but I can't believe it's going to happen very often that the person in charge of metrics ingestion is going to happen to be reading the logs and learn about the deprecation there for the first time, in advance of their metrics ingestion breaking.

@lavalamp
Copy link
Member

2 releases is pretty short for this. 4 would align more with api deprecation.

I think you should get someone other than me from sig arch to sign off too. Maybe @liggitt.

@logicalhan
Copy link
Member Author

2 releases is pretty short for this. 4 would align more with api deprecation.

I think you should get someone other than me from sig arch to sign off too. Maybe @liggitt.

It's actually 3 releases. But yeah we can modify it to be 4.

@logicalhan
Copy link
Member Author

I guess it depends where you are counting from though.

@logicalhan
Copy link
Member Author

/assign @liggitt

@lavalamp
Copy link
Member

Yeah I was counting until they disappear by default.

@sftim
Copy link
Contributor

sftim commented Mar 24, 2021

Is this a change for v1.21 or for v1.20 @logicalhan ?

(If it's for v1.21, the PR should target dev-1.21 - master represents the live website).

@logicalhan logicalhan changed the base branch from master to dev-1.21 March 24, 2021 22:43
@logicalhan
Copy link
Member Author

Is this a change for v1.21 or for v1.20 @logicalhan ?

(If it's for v1.21, the PR should target dev-1.21 - master represents the live website).

Updated :)

@sftim
Copy link
Contributor

sftim commented Mar 24, 2021

/milestone 1.21

@k8s-ci-robot k8s-ci-robot added this to the 1.21 milestone Mar 24, 2021
@reylejano
Copy link
Member

/assign
Hi @logicalhan, is this related to kubernetes/enhancements#1209

@reylejano reylejano removed their assignment Mar 24, 2021
@reylejano
Copy link
Member

/assign @PI-Victor

@logicalhan
Copy link
Member Author

/assign
Hi @logicalhan, is this related to kubernetes/enhancements#1209

It is indeed.


**Rule #10: STABLE metrics must undergo a deprecation lifecycle prior to removal.**

* **STABLE metric: 3 releases**
Copy link
Member

Choose a reason for hiding this comment

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

Suggest a X releases or X months, whichever is longer approach (matching GA API lifetimes would make sense to me)

Also, the 12 month guaranteed lifetime for GA APIs looks increasingly insufficient. We have enormous difficulty getting people to move from beta APIs to GA APIs in a year, let alone moving from one GA API to another. I think the promise of GA APIs (or "stable" metrics in this case) is effectively forever

Copy link
Member Author

Choose a reason for hiding this comment

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

We have a built-in forcing function for migration. We break people but allow them to unbreak themselves for a release to migrate.

Copy link
Member

Choose a reason for hiding this comment

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

We break people but allow them to unbreak themselves for a release to migrate.

That doesn't match my understanding of "stable" or "GA".

@reylejano
Copy link
Member

@kubernetes/sig-instrumentation-approvers , please provide a technical review for this PR by March 31 to get this into the release. Thank you!

@PI-Victor
Copy link
Member

Hi @brancz @x13n @DirectXMan12 @lavalamp @dashpole @ehashman @mml @sttts @bsalamat @andrewsykim you are listed as reviewers for KEP-1209: Metrics Stability Framework i would like to ask you to please provide a tech review of this PR by March 31st in order for it to make it into the release.
Thank you!

@reylejano
Copy link
Member

Hi @logicalhan, please address liggit's comment and sftim's comment

Co-authored-by: Tim Bannister <tim@scalefactory.com>
@k8sio-netlify-preview-bot
Copy link
Collaborator

k8sio-netlify-preview-bot commented Mar 30, 2021

Deploy preview for kubernetes-io-vnext-staging processing.

Building with commit 2f8d0da

https://app.netlify.com/sites/kubernetes-io-vnext-staging/deploys/60636302d46bf30007023ee9

@logicalhan
Copy link
Member Author

Hi @logicalhan, please address liggit's comment and sftim's comment

Amended to address comments.

@dashpole
Copy link
Contributor

/lgtm

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

LGTM label has been added.

Git tree hash: f3f4dd9dcf02b924bc1fde9c51fc7123b97a4b91

@brancz
Copy link
Member

brancz commented Mar 31, 2021

/lgtm

@reylejano
Copy link
Member

/label tide/merge-method-squash
/approve

@k8s-ci-robot k8s-ci-robot added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Mar 31, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: reylejano

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 31, 2021
@k8s-ci-robot k8s-ci-robot merged commit f9bacb2 into kubernetes:dev-1.21 Mar 31, 2021
Copy link
Contributor

@sftim sftim left a comment

Choose a reason for hiding this comment

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

Just for the record

registration. Like their stable undeprecated counterparts, deprecated metrics will
be automatically registered to the metrics endpoint and therefore visible.

On a subsequent release (when the metric's deprecatedVersion is equal to
Copy link
Contributor

Choose a reason for hiding this comment

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

nit:

Suggested change
On a subsequent release (when the metric's deprecatedVersion is equal to
On a subsequent release (when the metric's `deprecatedVersion` is equal to

**_Unlike_** their deprecated counterparts, hidden metrics will _no longer_ be
automatically registered to the metrics endpoint (hence hidden). However, they
can be explicitly enabled through a command line flag on the binary
(i.e. `--show-hidden-metrics-for-version=`). This provides cluster admins an
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: we avoid Latin abbreviations

Suggested change
(i.e. `--show-hidden-metrics-for-version=`). This provides cluster admins an
( `--show-hidden-metrics-for-version=`). This provides cluster admins an

@sftim
Copy link
Contributor

sftim commented Mar 31, 2021

Thanks @logicalhan

@reylejano
Copy link
Member

PR #27358 is a follow-up PR to address #27202 (review)

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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. language/en Issues or PRs related to English language lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/docs Categorizes an issue or PR as relevant to SIG Docs. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants