-
Notifications
You must be signed in to change notification settings - Fork 386
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
✨ cli: write diagnostics in kubectl-workspace
to stderr
#3133
Conversation
Signed-off-by: Marvin Beckers <marvin@kubermatic.com>
Signed-off-by: Marvin Beckers <marvin@kubermatic.com>
…tderr Signed-off-by: Marvin Beckers <marvin@kubermatic.com>
/cc @mjudeikis @sttts |
kubectl-workspace
to stderrkubectl-workspace
to stderr
Where I dont quite like abusing stderr but I dont see better way without having bunch of |
LGTM label has been added. Git tree hash: 8cc6a3bd49750ad6bf093e2440f06617f9a45927
|
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mjudeikis, sttts 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 |
/hold cancel |
/kind cleanup |
Summary
While working on https://github.com/embik/kubectl-switch-ws I noticed that
kubectl-workspace use
will always print diagnostic information (deprecation notices and warnings about unfinished API bindings), even when using--short
for inclusion in scripts / terminal prompts. There is no good way to avoid these warnings for scripts that only expect the workspace name returned as output.I would like to propose that we start writing this supplementary information to stderr, which is specifically for diagnostic information and errors. This way, scripts can avoid the warnings by using something like
kubectl workspace use --short <workspace> 2>/dev/null
to make sure you only get back the workspace name (or an exit code that isn't zero, which signals that something bad happened).There's also an old
OWNERS
file left here which I'd propose to remove.Related issue(s)
Fixes #
Release Notes