redhat-developer / odo

odo - Developer-focused CLI for fast & iterative container-based application development on Podman and Kubernetes. Implementation of the open Devfile standard.
https://odo.dev
Apache License 2.0
792 stars 244 forks source link

"odo service list" ask for app and project name #3392

Closed prietyc123 closed 3 years ago

prietyc123 commented 4 years ago

/kind bug

What versions of software are you using?

Operating System: macOS

Output of odo version: master

How did you run odo exactly?

Tried running make test-operator-hub 2-3 times.

Actual behavior

$ make test-operator-hub
ginkgo  -randomizeAllSpecs -slowSpecThreshold=120 -timeout 7200s -nodes=1 -focus="odo service command tests" tests/integration/operatorhub/
Running Suite: Operatorhub Suite
================================
Random Seed: 1592548459 - Will randomize all specs
Will run 7 of 7 specs

•••Running odo with args [odo preference set Experimental true]
[odo] I0619 12:06:00.819864   13946 preference.go:188] The path for preference file is /Users/pkumari/.odo/preference.yaml
? Experimental is already set. Do you want to override it in the config (y/N)                                                                      I0619 12:06:00.820765   13946 common.go:17] Encountered an error processing prompt: EOF
[odo] Aborted by the user
Creating a new project: kofrgdxndl
Running odo with args [odo project create kofrgdxndl -w -v4]
[odo]  •  Waiting for project to come up  ...
[odo] I0619 12:06:03.478973   13947 occlient.go:539] Status of creation of project kofrgdxndl is Active
[odo] I0619 12:06:03.479127   13947 occlient.go:544] Project kofrgdxndl now exists
[odo] I0619 12:06:03.877337   13947 occlient.go:579] Status of creation of service account &ServiceAccount{ObjectMeta:{default  kofrgdxndl /api/v1/namespaces/kofrgdxndl/serviceaccounts/default 286c90e8-914d-41d2-9b00-44348be54830 86841 0 2020-06-19 12:06:02 +0530 IST <nil> <nil> map[] map[] [] []  []},Secrets:[]ObjectReference{ObjectReference{Kind:,Namespace:,Name:default-token-5fhbx,UID:,APIVersion:,ResourceVersion:,FieldPath:,},ObjectReference{Kind:,Namespace:,Name:default-dockercfg-6rjpc,UID:,APIVersion:,ResourceVersion:,FieldPath:,},},ImagePullSecrets:[]LocalObjectReference{LocalObjectReference{Name:default-dockercfg-6rjpc,},},AutomountServiceAccountToken:nil,} is ready
 ✓  Waiting for project to come up [2s]
[odo]  ✓  Project 'kofrgdxndl' is ready for use
[odo]  ✓  New project created and now using project: kofrgdxndl
Running odo with args [odo project set kofrgdxndl]
[odo] Already on project : kofrgdxndl
Running oc with args [oc get csv]
[oc] NAME                              DISPLAY   VERSION             REPLACES   PHASE
[oc] etcdoperator.v0.9.4-clusterwide   etcd      0.9.4-clusterwide              
Running oc with args [oc get csv]
[oc] NAME                              DISPLAY   VERSION             REPLACES   PHASE
[oc] etcdoperator.v0.9.4-clusterwide   etcd      0.9.4-clusterwide              
[oc] mongodb-enterprise.v1.5.3         MongoDB   1.5.3                          
Running odo with args [odo catalog list services]
[odo] I0619 12:06:11.206433   13953 preference.go:188] The path for preference file is /Users/pkumari/.odo/preference.yaml
[odo] I0619 12:06:12.624115   13953 operators.go:17] Fetching list of operators installed in cluster
[odo] I0619 12:06:13.991758   13953 preference.go:188] The path for preference file is /Users/pkumari/.odo/preference.yaml
[odo] I0619 12:06:13.991991   13953 preference.go:188] The path for preference file is /Users/pkumari/.odo/preference.yaml
[odo] Operators available in the cluster
[odo] NAME                                CRDs
[odo] etcdoperator.v0.9.4-clusterwide     EtcdCluster, EtcdBackup, EtcdRestore
[odo] mongodb-enterprise.v1.5.3           MongoDB, MongoDBUser, MongoDBOpsManager
Running odo with args [odo service create etcdoperator.v0.9.4-clusterwide --crd EtcdCluster]
[odo] I0619 12:06:15.011271   13954 preference.go:188] The path for preference file is /Users/pkumari/.odo/preference.yaml
[odo] I0619 12:06:15.011725   13954 preference.go:188] The path for preference file is /Users/pkumari/.odo/preference.yaml
[odo] I0619 12:06:15.012011   13954 operators.go:17] Fetching list of operators installed in cluster
[odo] I0619 12:06:16.035934   13954 preference.go:188] The path for preference file is /Users/pkumari/.odo/preference.yaml
[odo] Deploying service of type: EtcdCluster
[odo]  •  Deploying service  ...
[odo] I0619 12:06:16.036228   13954 preference.go:188] The path for preference file is /Users/pkumari/.odo/preference.yaml
 ✓  Deploying service [351ms]
[odo]  ✓  Service 'example' was created
[odo] 
[odo] Progress of the provisioning will not be reported and might take a long time
[odo] You can see the current status by executing 'odo service list'
[odo] Optionally, link etcdoperator.v0.9.4-clusterwide to your component by running: 'odo link <component-name>'
Running oc with args [oc get pods -n kofrgdxndl]
[oc] NAME                 READY   STATUS     RESTARTS   AGE
[oc] example-nhmpb7srcg   0/1     Init:0/1   0          1s
Running oc with args [oc get pods example-nhmpb7srcg -o template="{{.status.phase}}" -n kofrgdxndl]
[oc] "Pending"Running oc with args [oc get pods example-nhmpb7srcg -o template="{{.status.phase}}" -n kofrgdxndl]
[oc] "Running"Running odo with args [odo service list]
[odo]  ✗  Please specify the application name and project name
[odo] Or use the command from inside a directory containing an odo component.
Deleting project: kofrgdxndl
Running odo with args [odo project delete kofrgdxndl -f]
[odo] I0619 12:06:26.484956   13959 application.go:49] Unable to list Service Catalog instances: unable to list ServiceInstances: the server could not find the requested resource (get serviceinstances.servicecatalog.k8s.io)
[odo]  •  Deleting project kofrgdxndl  ...
[odo] I0619 12:06:33.845642   13959 occlient.go:2265] Status of delete of project kofrgdxndl is Terminating
[odo] I0619 12:06:57.254303   13959 occlient.go:2265] Status of delete of project kofrgdxndl is 
 ✓  Deleting project kofrgdxndl [31s]
[odo]  ✓  Deleted project : kofrgdxndl

------------------------------
• Failure [56.540 seconds]
odo service command tests for OperatorHub
/Users/pkumari/go/src/github.com/openshift/odo/tests/integration/operatorhub/cmd_service_test.go:17
  When operator backed services are created
  /Users/pkumari/go/src/github.com/openshift/odo/tests/integration/operatorhub/cmd_service_test.go:226
    should list the services if they exist [It]
    /Users/pkumari/go/src/github.com/openshift/odo/tests/integration/operatorhub/cmd_service_test.go:236

    No future change is possible.  Bailing out early after 1.118s.
    Running odo with args [odo service list]
    Expected
        <int>: 1
    to match exit code:
        <int>: 0

    /Users/pkumari/go/src/github.com/openshift/odo/tests/helper/helper_run.go:34
------------------------------
^[[18;148R•••

Summarizing 1 Failure:

[Fail] odo service command tests for OperatorHub When operator backed services are created [It] should list the services if they exist 
/Users/pkumari/go/src/github.com/openshift/odo/tests/helper/helper_run.go:34

Ran 7 of 7 Specs in 262.337 seconds
FAIL! -- 6 Passed | 1 Failed | 0 Pending | 0 Skipped
--- FAIL: TestOperatorhub (262.34s)
FAIL

Expected behavior

odo service list should not throw error.

Any logs, error output, etc?

prietyc123 commented 4 years ago

ping @dharmit

openshift-bot commented 4 years ago

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

dharmit commented 3 years ago
[oc] "Running"Running odo with args [odo service list]
[odo]  ✗  Please specify the application name and project name
[odo] Or use the command from inside a directory containing an odo component.

This should not be the case on any platform. Is this something that we still face on any platform?

openshift-bot commented 3 years ago

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten /remove-lifecycle stale

openshift-bot commented 3 years ago

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen. Mark the issue as fresh by commenting /remove-lifecycle rotten. Exclude this issue from closing again by commenting /lifecycle frozen.

/close

openshift-ci-robot commented 3 years ago

@openshift-bot: Closing this issue.

In response to [this](https://github.com/openshift/odo/issues/3392#issuecomment-761857508): >Rotten issues close after 30d of inactivity. > >Reopen the issue by commenting `/reopen`. >Mark the issue as fresh by commenting `/remove-lifecycle rotten`. >Exclude this issue from closing again by commenting `/lifecycle frozen`. > >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.