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

"odo delete --app" should throw error for invalid app in devfile #3493

Closed
prietyc123 opened this issue Jul 6, 2020 · 2 comments
Closed

"odo delete --app" should throw error for invalid app in devfile #3493

prietyc123 opened this issue Jul 6, 2020 · 2 comments
Labels
area/devfile-spec Issues or PRs related to the Devfile specification and how odo handles and interprets it. kind/bug Categorizes issue or PR as related to a bug. priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)).

Comments

@prietyc123
Copy link
Contributor

/kind bug

What versions of software are you using?

Operating System:
Supported

Output of odo version:
master

How did you run odo exactly?

$ odo create nodejs
Experimental mode is enabled, use at your own risk

Validation
 ✓  Checking devfile existence [45743ns]
 ✓  Checking devfile compatibility [107796ns]
 ✓  Creating a devfile component from registry: RegistryName [128026ns]
 ✓  Validating devfile component [452199ns]

Please use `odo push` command to create the component with source deployed

$ odo delete --app -h
? Are you sure you want to delete the devfile component: nodejs? No
 ✗  Aborting deletion of component

$ odo delete --app -h
? Are you sure you want to delete the devfile component: nodejs? Yes
 ✓  Deleting devfile component nodejs [904ms]
 ✓  Successfully deleted component

$ odo delete --all
? Are you sure you want to delete the devfile component: nodejs? Yes
 ✗  Deleting devfile component nodejs [314ms]
 ✗  error occurred while deleting component, cause: the component nodejs doesn't exist on the cluster
? Are you sure you want to delete env folder? No
 ✗  Aborting deletion of env folder

Tried with some more incorrect app name :

$ odo create nodejs
Experimental mode is enabled, use at your own risk

Validation
 ✓  Checking devfile existence [52347ns]
 ✓  Checking devfile compatibility [173289ns]
 ✓  Creating a devfile component from registry: RegistryName [177960ns]
 ✓  Validating devfile component [445600ns]

Please use `odo push` command to create the component with source deployed

$ odo delete --app incorrect-app
? Are you sure you want to delete the devfile component: nodejs? Yes
 ✗  Deleting devfile component nodejs [285ms]
 ✗  error occurred while deleting component, cause: the component nodejs doesn't exist on the cluster

Actual behavior

$ odo delete --app incorrect-app asking to delete devfile component though the app is incorrect.

Expected behavior

$ odo delete --app incorrect-app it should directly throw error saying Component nodejs does not exists on the cluster

Any logs, error output, etc?

Manually trying odo delete --app with experimental mode.

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Jul 6, 2020
@prietyc123 prietyc123 added area/devfile-spec Issues or PRs related to the Devfile specification and how odo handles and interprets it. priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)). labels Jul 6, 2020
@mik-dass
Copy link
Contributor

mik-dass commented Jul 6, 2020

App is not yet implemented for devfiles #3402

@prietyc123
Copy link
Contributor Author

App is not yet implemented for devfiles #3402

Great I was not aware of 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devfile-spec Issues or PRs related to the Devfile specification and how odo handles and interprets it. kind/bug Categorizes issue or PR as related to a bug. priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)).
Projects
None yet
Development

No branches or pull requests

3 participants