-
Notifications
You must be signed in to change notification settings - Fork 243
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
Do not call LogErrorAndExit but return err in GenericRun #6352
Do not call LogErrorAndExit but return err in GenericRun #6352
Conversation
✅ Deploy Preview for odo-docusaurus-preview canceled.
|
9ad2e6d
to
57a471b
Compare
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 think there might be some other places to change.
Didn't check if that was also happening on main, but if I run odo
with an unknown flag (say odo --xyz
), Usage is displayed twice.
odo --xyz
$ odo --xyz
flag provided but not defined: -xyz
__
/ \__ odo is a CLI tool for fast iterative application development
\__/ \ deployed immediately to your kubernetes cluster.
/ \__/ Find more information at https://odo.dev
\__/
Usage:
odo [flags]
odo [command]
Examples:
Initializing your component by taking your pick from multiple languages or frameworks:
odo init
After creating your initial component, start development with:
odo dev
Want to deploy after development? See it live with:
odo deploy
Main Commands:
build-images Build images
deploy Deploy components
dev Deploy component to development cluster
init Init bootstraps a new project
logs Show logs of all containers of the component
registry List all components from the Devfile registry
Management Commands:
add Add resources to devfile (binding)
create Perform create operation (namespace)
delete Delete resources (component, namespace)
describe Describe resource (binding, component)
list List all components in the current namespace (binding, component, namespace, services)
remove Remove resources from devfile (binding)
set Perform set operation (namespace)
OpenShift Commands:
login Login to cluster
logout Logout of the cluster
Utility Commands:
analyze Detect devfile to use based on files present in current directory
completion Add odo completion support to your development environment
preference Modifies preference settings (add, remove, set, unset, view)
version Print the client version information
Flags:
--complete Install completion for odo command
--kubeconfig string Paths to a kubeconfig. Only required if out-of-cluster.
-o, --o string Specify output format, supported format: json
--uncomplete Uninstall completion for odo command
-v, --v Level Number for the log level verbosity. Level varies from 0 to 9 (default 0).
--var stringArray Variable to override Devfile variable and variables in var-file
--var-file string File containing variables to override Devfile variables
--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: unknown flag: --xyz
Usage:
odo [flags]
odo [command]
Examples:
Initializing your component by taking your pick from multiple languages or frameworks:
odo init
After creating your initial component, start development with:
odo dev
Want to deploy after development? See it live with:
odo deploy
Main Commands:
build-images Build images
deploy Deploy components
dev Deploy component to development cluster
init Init bootstraps a new project
logs Show logs of all containers of the component
registry List all components from the Devfile registry
Management Commands:
add Add resources to devfile (binding)
create Perform create operation (namespace)
delete Delete resources (component, namespace)
describe Describe resource (binding, component)
list List all components in the current namespace (binding, component, namespace, services)
remove Remove resources from devfile (binding)
set Perform set operation (namespace)
OpenShift Commands:
login Login to cluster
logout Logout of the cluster
Utility Commands:
analyze Detect devfile to use based on files present in current directory
completion Add odo completion support to your development environment
preference Modifies preference settings (add, remove, set, unset, view)
version Print the client version information
Flags:
--complete Install completion for odo command
-h, --help Help for odo
--kubeconfig string Paths to a kubeconfig. Only required if out-of-cluster.
-o, --o string Specify output format, supported format: json
--uncomplete Uninstall completion for odo command
-v, --v Level Number for the log level verbosity. Level varies from 0 to 9 (default 0).
--var stringArray Variable to override Devfile variable and variables in var-file
--var-file string File containing variables to override Devfile variables
--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.
✗ unknown flag: --xyz
I just tested and noticed the same behavior on |
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.
One slight thing I noticed on the behavior: when checking if ODO_DISABLE_TELEMETRY
and ODO_TRACKING_CONSENT
conflict, it looks like Usage is also being displayed:
$ ODO_DISABLE_TELEMETRY=true ODO_TRACKING_CONSENT=yes odo version
Error: ODO_DISABLE_TELEMETRY and ODO_TRACKING_CONSENT values are in conflict. ODO_DISABLE_TELEMETRY is deprecated, please use only ODO_TRACKING_CONSENT
Usage:
odo version [flags]
Examples:
# Print the client version of odo
odo version
Flags:
--client Client version only (no server required).
-h, --help Help for version
Additional Flags:
--kubeconfig string Paths to a kubeconfig. Only required if out-of-cluster.
-o, --o string Specify output format, supported format: json
-v, --v Level Number for the log level verbosity. Level varies from 0 to 9 (default 0).
--var stringArray Variable to override Devfile variable and variables in var-file
--var-file string File containing variables to override Devfile variables
--vmodule moduleSpec Comma-separated list of pattern=N settings for file-filtered logging
✗ ODO_DISABLE_TELEMETRY and ODO_TRACKING_CONSENT values are in conflict. ODO_DISABLE_TELEMETRY is deprecated, please use only ODO_TRACKING_CONSENT
And on main
, I only get this, which makes more sense to me:
$ ODO_DISABLE_TELEMETRY=true ODO_TRACKING_CONSENT=yes odo version
✗ ODO_DISABLE_TELEMETRY and ODO_TRACKING_CONSENT values are in conflict. ODO_DISABLE_TELEMETRY is deprecated, please use only ODO_TRACKING_CONSENT
57a471b
to
7a1a30c
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rm3l 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 |
/override ci/prow/v4.11-integration-e2e |
@feloy: Overrode contexts on behalf of feloy: ci/prow/v4.11-integration-e2e In response to this:
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. |
What type of PR is this:
/kind code-refactoring
What does this PR do / why we need it:
Which issue(s) this PR fixes:
Fixes #
PR acceptance criteria:
Unit test
Integration test
Documentation
How to test changes / Special notes to the reviewer: