Skip to content

Don't show warnings that are not bad conditions#339

Closed
duglin wants to merge 1 commit intoknative:masterfrom
duglin:removeWarnings
Closed

Don't show warnings that are not bad conditions#339
duglin wants to merge 1 commit intoknative:masterfrom
duglin:removeWarnings

Conversation

@duglin
Copy link
Copy Markdown
Contributor

@duglin duglin commented Aug 6, 2019

Don't show warnings while running kn plugin list when:

  • a dir in your plug-in path doesn't exist - e.g. right now it shows it for a missing ~/.kn/plugins - which is a valid state for someone who just downloaded kn but doesn't have, or need, a .kn dir
  • there are no plugins at all - that's a valid state and doesn't deserve a warning

To me warning are things people need to be aware of (or things they need to
take action to fix). Neither of those case apply here. Instead they user
will just be annoyed by this:

$ kn plugin list
Unable read directory '/root/.kn/plugins' from your plugins path: open /root/.kn/plugins: no such file or directory. Skipping...
warning: unable to find any kn plugins in your plugin path: '[/root/.kn/plugins]'

When they should see no output at all. Or, if someone wants to add it we could output no plugins found but not call it a "warning" since it's not.

Signed-off-by: Doug Davis dug@us.ibm.com

/lint

Don't show warnings when running `kn plugin list`:
- a dir in your plug-in path doesn't exist - e.g. right now it shows it for a missing ~/.kn/plugins - which is a valid state for someone who just downloaded `kn` but doesn't have, or need, a .kn dir
- there are no plugins at all - that's a valid state and doesn't deserve a warning

To me warning are things people need to be aware of (or things they need to
take action to fix).  Neither of those case apply here. Instead they user
will just be annoyed by this:

```
$ kn plugin list
Unable read directory '/root/.kn/plugins' from your plugins path: open /root/.kn/plugins: no such file or directory. Skipping...
warning: unable to find any kn plugins in your plugin path: '[/root/.kn/plugins]'
```

When they should see no output at all. Or, if someone wants to add it we coudl output `no plugins found` but not call it a "warning" since it's not.

Signed-off-by: Doug Davis <dug@us.ibm.com>
@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Aug 6, 2019
Copy link
Copy Markdown
Contributor

@knative-prow-robot knative-prow-robot left a comment

Choose a reason for hiding this comment

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

@duglin: 0 warnings.

Details

In response to this:

Don't show warnings while running kn plugin list when:

  • a dir in your plug-in path doesn't exist - e.g. right now it shows it for a missing ~/.kn/plugins - which is a valid state for someone who just downloaded kn but doesn't have, or need, a .kn dir
  • there are no plugins at all - that's a valid state and doesn't deserve a warning

To me warning are things people need to be aware of (or things they need to
take action to fix). Neither of those case apply here. Instead they user
will just be annoyed by this:

$ kn plugin list
Unable read directory '/root/.kn/plugins' from your plugins path: open /root/.kn/plugins: no such file or directory. Skipping...
warning: unable to find any kn plugins in your plugin path: '[/root/.kn/plugins]'

When they should see no output at all. Or, if someone wants to add it we could output no plugins found but not call it a "warning" since it's not.

Signed-off-by: Doug Davis dug@us.ibm.com

/lint

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.

@knative-prow-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: duglin
To complete the pull request process, please assign rhuss
You can assign the PR to them by writing /assign @rhuss in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details 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

@knative-prow-robot knative-prow-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Aug 6, 2019
@knative-metrics-robot
Copy link
Copy Markdown

The following is the coverage report on pkg/.
Say /test pull-knative-client-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/kn/commands/plugin/plugin_list.go 78.0% 74.2% -3.9

@rhuss
Copy link
Copy Markdown
Contributor

rhuss commented Aug 6, 2019

Fixed with #313

@rhuss
Copy link
Copy Markdown
Contributor

rhuss commented Aug 6, 2019

@duglin would it be ok to close this and focus on #313 ? Happy to adapt this over there, but as #313 has a wider scope and also include a fix for this issue, I would love to continue over there to avoid fixing conflicts.

@duglin
Copy link
Copy Markdown
Contributor Author

duglin commented Aug 6, 2019

@rhuss as long as the conditions I listed don't result in warning then yes! :-)

@knative-prow-robot
Copy link
Copy Markdown
Contributor

@duglin: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-knative-client-integration-tests-latest-release 89aec1a link /test pull-knative-client-integration-tests-latest-release
pull-knative-client-integration-tests 89aec1a link /test pull-knative-client-integration-tests

Full PR test history. Your PR dashboard.

Details

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.

@maximilien
Copy link
Copy Markdown
Contributor

PR #313 changes how you would do this. I also think using the verbose feature #333 is also how more or less output should be controlled.

@rhuss
Copy link
Copy Markdown
Contributor

rhuss commented Aug 8, 2019

ok, let's close this and continue on #333

@rhuss rhuss closed this Aug 8, 2019
@duglin duglin deleted the removeWarnings branch August 9, 2019 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes Indicates the PR's author has signed the CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants