-
Notifications
You must be signed in to change notification settings - Fork 39.9k
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
Remove --interactive flag from kubectl logs #65420
Conversation
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
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. I understand the commands that are listed here. |
I've signed the cla. Is there some magic I need to perform to convince the bot that I've done so? -- Does my email address on the cla have to match the one github used for the commit? |
@jsoref Thanks for your work. AFAIK you are good to contribute now. But I'm still not sure if we need this PR. /sig cli |
/cc @juanvallejo |
pkg/kubectl/cmd/logs.go
Outdated
@@ -126,7 +126,7 @@ func NewCmdLogs(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.C | |||
cmd.Flags().String("since-time", "", i18n.T("Only return logs after a specific date (RFC3339). Defaults to all logs. Only one of since-time / since may be used.")) | |||
cmd.Flags().Duration("since", 0, "Only return logs newer than a relative duration like 5s, 2m, or 3h. Defaults to all logs. Only one of since-time / since may be used.") | |||
cmd.Flags().StringP("container", "c", "", "Print the logs of this container") | |||
cmd.Flags().Bool("interactive", false, "If true, prompt the user for input when required.") | |||
cmd.Flags().Bool("interactive", false, "[Ignored. It used to prompt the user for input when required.]") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This flag is marked deprecated, which means it will be removed within the next release or two.
I don't think it is necessary to point this out in the flag's description, as the deprecation message below already warns about this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @juanvallejo this was deprecated long enough. We can now safely remove the flag rather than updating the description like this.
/ok-to-test |
/hold I don't think updating the flag's description is something that is needed considering that the deprecation notice takes care of that. I'd rather remove the flag altogether, especially given that it has been deprecated for multiple releases now. cc @soltysh |
pkg/kubectl/cmd/logs.go
Outdated
@@ -126,7 +126,7 @@ func NewCmdLogs(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.C | |||
cmd.Flags().String("since-time", "", i18n.T("Only return logs after a specific date (RFC3339). Defaults to all logs. Only one of since-time / since may be used.")) | |||
cmd.Flags().Duration("since", 0, "Only return logs newer than a relative duration like 5s, 2m, or 3h. Defaults to all logs. Only one of since-time / since may be used.") | |||
cmd.Flags().StringP("container", "c", "", "Print the logs of this container") | |||
cmd.Flags().Bool("interactive", false, "If true, prompt the user for input when required.") | |||
cmd.Flags().Bool("interactive", false, "[Ignored. It used to prompt the user for input when required.]") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @juanvallejo this was deprecated long enough. We can now safely remove the flag rather than updating the description like this.
/retest |
pkg/kubectl/cmd/logs.go
Outdated
@@ -146,7 +146,6 @@ func NewCmdLogs(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.C | |||
cmd.Flags().DurationVar(&o.SinceSeconds, "since", o.SinceSeconds, "Only return logs newer than a relative duration like 5s, 2m, or 3h. Defaults to all logs. Only one of since-time / since may be used.") | |||
cmd.Flags().StringVarP(&o.Container, "container", "c", o.Container, "Print the logs of this container") | |||
cmd.Flags().BoolVar(&o.Interactive, "interactive", o.Interactive, "If true, prompt the user for input when required.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should delete the actual flag itself as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, I had removed it, but apparently failed to update my commit before pushing again...
/lgtm @jsoref Can you please change the release note to
Or
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jsoref, juanvallejo, mengqiy 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 |
@juanvallejo Can you /unhold this? |
/hold cancel |
/test all [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here. |
fixes #61739