odo: Specifying a name does not matter when using odo delete
/kind bug
What versions of software are you using?
Operating System: Linux
Output of odo version
: master 👍
How did you run odo exactly?
~/openshift/foobar ⍉
▶ odo list
Experimental mode is enabled, use at your own risk
Devfile Components:
APP NAME PROJECT TYPE STATE
app java-springboot foo java-springboot Pushed
app nodejs foo nodejs Pushed
~/openshift/foobar
▶ odo delete kalsdjalksdjlakdjlasljkd -f
Gathering information for component nodejs
✓ Checking status for component [47ms]
Deleting component nodejs
✓ Deleting Kubernetes resources for component [46ms]
✓ Successfully deleted component
~/openshift/foobar
Actual behavior
It does not matter what you specify to odo delete
it will delete whatever is in your current folder…
Expected behavior
To fail when passing in something random such as odo delete alksjdalksjdklasd -f
Any logs, error output, etc?
See above
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 24 (15 by maintainers)
Sorry, for #1 let me clarify - I meant scenarios where we may have multiple components on your machine (and even more if there’s multiple components in multiple apps), and each component has its own folder. So being able to delete the component without having to find the component folder would save time / avoid a nuisance for the user.
But I agree, the better use case is actually #2 where the folder is lost or not accessible. I’m surprised actually that
--app
is required, since I believe the past functionality with odo was to use the default app if one isn’t specified, so yup,--app
should be optional.Yes and no. But if you’ve got multiple components deployed on a cluster, across multiple apps (once https://github.com/openshift/odo/issues/3402 is in), having to find the context folder for the app you want to delete can be a real nuisance.
odo delete
’s help text does allow you to specify a name for a component:--app
on odo delete if not inside a component directory:It may not make much sense without support for
odo app
with devfiles in, but being able to doodo delete <comp> --app <app>
is a whole lot nicer than having to find the context folder for each component.