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

Creating a service doesn't require context, but odo service list does... #2095

Closed
cdrage opened this issue Sep 5, 2019 · 2 comments
Closed
Labels
kind/bug Categorizes issue or PR as related to a bug. v2 Issue or PR that applies to the v2 of odo

Comments

@cdrage
Copy link
Member

cdrage commented Sep 5, 2019

[kind/bug]

What versions of software are you using?

  • Operating System: Linux
  • Output of odo version: Master branch

How did you run odo exactly?

See below:

~/nodejs-ex  master ✔                                                                                                                                                                                                                                                                                                                                                 324d
▶ odo service create dh-postgresql-apb --plan dev -p postgresql_user=luke -p postgresql_password=secret -p postgresql_database=my_data -p postgresql_version=9.6 --context ~/nodejs-ex
 ✓  Creating service [12ms]
 ✓  Service 'dh-postgresql-apb' was created
Progress of the provisioning will not be reported and might take a long time.
You can see the current status by executing 'odo service list'

~/nodejs-ex  master ✔                                                                                                                                                                                                                                                                                                                                                 324d
▶ odo service list
 ✗  Please specify the application name and project name
Or use the command from inside a directory containing an odo component.

Actual behavior

No .odo in the directory of nodejs-ex and I'm able to create a service. When listing a service however, I require context / an .odo directory :(

Expected behavior

Being able to use odo service list without having to create a component.

Any logs, error output, etc?

@dharmit
Copy link
Member

dharmit commented Sep 6, 2019

odo service create works without --app or --project values because of https://github.com/openshift/odo/blob/bff81fcda46f7672c6d002b3e27f7789366677c1/pkg/odo/genericclioptions/context.go#L163-L166

It assumes the default values for --app and --project which are app and myproject respectively. However, that's not the case for odo service list and it requires the user to pass --app and --project values to list services when working from outside a context/component. #2001

We also have #2051 open to track related topic.

@girishramnani
Copy link
Contributor

as mentioned by @dharmit this issues looks like a duplicate of #2051. hence closing this issue.

@girishramnani girishramnani added area/service kind/bug Categorizes issue or PR as related to a bug. and removed area/debug labels Dec 18, 2019
@rm3l rm3l added the v2 Issue or PR that applies to the v2 of odo label Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. v2 Issue or PR that applies to the v2 of odo
Projects
Archived in project
Development

No branches or pull requests

4 participants