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

KEP 1693: Warning mechanism for use of deprecated APIs #1694

Merged
merged 2 commits into from Apr 16, 2020

Conversation

liggitt
Copy link
Member

@liggitt liggitt commented Apr 16, 2020

This proposes a mechanism for surfacing use of deprecated APIs to users via Warning headers, and to administrators via metrics/audit events.

Proof-of-concept at kubernetes/kubernetes#73032

/sig api-machinery architecture cli instrumentation

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. sig/cli Categorizes an issue or PR as relevant to SIG CLI. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Apr 16, 2020
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Apr 16, 2020
@liggitt liggitt force-pushed the warnings branch 3 times, most recently from 93197c7 to 3d64a7b Compare April 16, 2020 16:21
@liggitt liggitt changed the title WIP - KEP 1693: warning mechanism KEP 1693: warning mechanism Apr 16, 2020
@k8s-ci-robot k8s-ci-robot added sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. and removed do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Apr 16, 2020
@liggitt
Copy link
Member Author

liggitt commented Apr 16, 2020

@liggitt liggitt force-pushed the warnings branch 3 times, most recently from 43a3e89 to af5bf39 Compare April 16, 2020 17:28
@liggitt liggitt changed the title KEP 1693: warning mechanism KEP 1693: Warning mechanism for use of deprecated APIs Apr 16, 2020
Copy link
Member

@logicalhan logicalhan left a comment

Choose a reason for hiding this comment

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

I think it sounds reasonable, I'm not clear on some of the details but the instrumentation stuff looks pretty sensible to me.

@logicalhan
Copy link
Member

/lgtm for the metrics stuff as discussed offline

@logicalhan
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 16, 2020
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 16, 2020
@logicalhan
Copy link
Member

/lgtm

(restamp) from sig-instrumentation

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 16, 2020
@apelisse
Copy link
Member

Looks good to me, thanks!

2. log to stderr with a `Warning:` prefix
3. color the `Warning:` prefix if stderr is a terminal and `$TERM != "dumb"` and `$NO_COLOR` is unset

In kube-apiserver and kube-controller-manager, configure the process-wide handler to ignore warnings
Copy link
Member

Choose a reason for hiding this comment

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

scheduler?

@lavalamp
Copy link
Member

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lavalamp, liggitt, 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 /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 Apr 16, 2020
@k8s-ci-robot k8s-ci-robot merged commit 39c65b4 into kubernetes:master Apr 16, 2020
@k8s-ci-robot k8s-ci-robot added this to the v1.19 milestone Apr 16, 2020
@liggitt
Copy link
Member Author

liggitt commented Apr 16, 2020

Will keep provisional until all reviewers get a shot at this, then get acks from approvers before flipping to implementable. I also added it to agendas for the upcoming SIG meetings to field any questions.

@liggitt
Copy link
Member Author

liggitt commented Apr 17, 2020

Review continued in #1697, fixed a couple typos and added whitespace bits to allow adding comments to any lines

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. kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. sig/cli Categorizes an issue or PR as relevant to SIG CLI. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants