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

remove showing help twice for incorrect commands #3805

Merged

Conversation

girishramnani
Copy link
Contributor

@girishramnani girishramnani commented Aug 21, 2020

What type of PR is this?

Uncomment only one /kind line, and delete the rest.
For example, > /kind bug would simply become: /kind bug

/kind api-change

/kind bug

/kind cleanup
/kind deprecation
/kind design
/kind failing-test
/kind feature
/kind flake
/kind code-refactoring

Documentation changes: Please include [skip ci] in your commit message as well
/kind documentation
[skip ci]

What does does this PR do / why we need it:
see $SUBJECT

Which issue(s) this PR fixes:

Fixes #3750

PR acceptance criteria:

How to test changes / Special notes to the reviewer:

odo hello 

should only print help once

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Aug 21, 2020
@amitkrout
Copy link
Contributor

@girishramnani Can you please attach the screenshot or text output of before and after change. I am asking because it's a UX change, so output before and after would really be helpful.

@girishramnani
Copy link
Contributor Author

/retest

@girishramnani
Copy link
Contributor Author

Before

(base) girish@MacBook-Pro odo % odo hello
odo is a CLI tool for running OpenShift applications in a fast and automated manner.
Reducing the complexity of deployment, odo adds iterative development without the worry of deploying your source code.

Find more information at https://github.com/openshift/odo

Usage:
  odo [flags]
  odo [command]

Examples:
  # Creating and deploying a Node.js project
  git clone https://github.com/openshift/nodejs-ex && cd nodejs-ex
  odo create nodejs
  odo push
  
  # Accessing your Node.js component
  odo url create

Commands:
  app         Perform application operations (delete, describe, list)
  catalog     Catalog related operations (describe, list, search)
  component   Manage components (create, delete, describe, exec, link, list, log, push, unlink, update, watch)
  config      Change or view configuration (set, unset, view)
  debug       Debug commands (info, port-forward)
  preference  Modifies preference settings (set, unset, view)
  project     Perform project operations (create, delete, get, list, set)
  service     Perform service catalog operations (create, delete, list)
  storage     Perform storage operations (create, delete, list)
  url         Expose component to the outside world (create, delete, describe, list)

Utility Commands:
  help        Help about any command
  login       Login to cluster
  logout      Log out of the current OpenShift session
  utils       Utilities for terminal commands and modifying odo configurations (convert-to-devfile, terminal)
  version     Print the client version information

Component Shortcuts:
  create      Create a new component 
  delete      Delete component 
  describe    Describe component 
  exec        Executes a command inside the component 
  link        Link component to a service or component 
  list        List all components in the current application 
  log         Retrieve the log for the given component 
  push        Push source code to a component 
  unlink      Unlink component to a service or component 
  update      Update the source code path of a component 
  watch       Watch for changes, update component on change. Watch doesn't support git components. 

Flags:
      --complete             Install completion for odo command
  -h, --help                 Help for odo
      --uncomplete           Uninstall completion for odo command
  -v, --v Level              Number for the log level verbosity. Level varies from 0 to 9 (default 0).
      --vmodule moduleSpec   Comma-separated list of pattern=N settings for file-filtered logging
  -y, --y                    Don't prompt user for typing 'yes' when installing completion

Use "odo [command] --help" for more information about a command.
Error: Invalid command - see available commands/subcommands above
Usage:
  odo [flags]
  odo [command]

Examples:
  # Creating and deploying a Node.js project
  git clone https://github.com/openshift/nodejs-ex && cd nodejs-ex
  odo create nodejs
  odo push
  
  # Accessing your Node.js component
  odo url create

Commands:
  app         Perform application operations (delete, describe, list)
  catalog     Catalog related operations (describe, list, search)
  component   Manage components (create, delete, describe, exec, link, list, log, push, unlink, update, watch)
  config      Change or view configuration (set, unset, view)
  debug       Debug commands (info, port-forward)
  preference  Modifies preference settings (set, unset, view)
  project     Perform project operations (create, delete, get, list, set)
  service     Perform service catalog operations (create, delete, list)
  storage     Perform storage operations (create, delete, list)
  url         Expose component to the outside world (create, delete, describe, list)

Utility Commands:
  help        Help about any command
  login       Login to cluster
  logout      Log out of the current OpenShift session
  utils       Utilities for terminal commands and modifying odo configurations (convert-to-devfile, terminal)
  version     Print the client version information

Component Shortcuts:
  create      Create a new component 
  delete      Delete component 
  describe    Describe component 
  exec        Executes a command inside the component 
  link        Link component to a service or component 
  list        List all components in the current application 
  log         Retrieve the log for the given component 
  push        Push source code to a component 
  unlink      Unlink component to a service or component 
  update      Update the source code path of a component 
  watch       Watch for changes, update component on change. Watch doesn't support git components. 

Flags:
      --complete             Install completion for odo command
  -h, --help                 Help for odo
      --uncomplete           Uninstall completion for odo command
  -v, --v Level              Number for the log level verbosity. Level varies from 0 to 9 (default 0).
      --vmodule moduleSpec   Comma-separated list of pattern=N settings for file-filtered logging
  -y, --y                    Don't prompt user for typing 'yes' when installing completion

Use "odo [command] --help" for more information about a command.

 ✗  Invalid command - see available commands/subcommands above

After
Screenshot 2020-08-21 at 3 33 35 PM

Copy link
Contributor

@mik-dass mik-dass left a comment

Choose a reason for hiding this comment

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

/approve

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mik-dass

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

@openshift-ci-robot openshift-ci-robot added lgtm Indicates that a PR is ready to be merged. Required by Prow. approved Indicates a PR has been approved by an approver from all required OWNERS files. Required by Prow. labels Aug 24, 2020
@codecov
Copy link

codecov bot commented Aug 24, 2020

Codecov Report

Merging #3805 into master will increase coverage by 0.07%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3805      +/-   ##
==========================================
+ Coverage   44.19%   44.27%   +0.07%     
==========================================
  Files         139      139              
  Lines       13388    13405      +17     
==========================================
+ Hits         5917     5935      +18     
  Misses       6888     6888              
+ Partials      583      582       -1     
Impacted Files Coverage Δ
pkg/devfile/parser/data/common/command_helper.go 57.14% <0.00%> (-42.86%) ⬇️
pkg/devfile/adapters/common/utils.go 87.67% <0.00%> (-0.80%) ⬇️
pkg/testingutil/devfile.go 0.00% <0.00%> (ø)
pkg/component/component_full_description.go 0.00% <0.00%> (ø)
...g/devfile/adapters/kubernetes/component/adapter.go 34.72% <0.00%> (+0.76%) ⬆️
pkg/devfile/parser/data/2.0.0/components.go 39.89% <0.00%> (+0.85%) ⬆️
pkg/devfile/parser/parse.go 56.52% <0.00%> (+2.67%) ⬆️
pkg/devfile/adapters/common/exec.go 72.91% <0.00%> (+6.25%) ⬆️
pkg/sync/adapter.go 78.29% <0.00%> (+6.86%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1e80be6...0ffe39f. Read the comment docs.

@openshift-merge-robot openshift-merge-robot merged commit eaf7dde into redhat-developer:master Aug 24, 2020
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. Required by Prow. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. Required by Prow.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Help text gets printed twice for invalid odo commands
5 participants