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

Project created with -w flag immediately is not shown in "odo project list -o json" #3609

Closed
amitkrout opened this issue Jul 21, 2020 · 4 comments
Labels
flake Categorizes issue or PR as related to a flaky test. priority/Medium Nice to have issue. Getting it done before priority changes would be great.

Comments

@amitkrout
Copy link
Contributor

/kind flake

What versions of software are you using?

Operating System:
Supported
Output of odo version:
master

How did you run odo exactly?

CI reference - https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/openshift_odo/3587/pull-ci-openshift-odo-master-v4.2-integration-e2e/1285409549875941376#1:build-log.txt%3A94498

Actual behavior

See the failure log

Expected behavior

-o json should capture the project

Any logs, error output, etc?

 Running odo with args [odo project create tkcpwomgvs -w -v4]
[odo]  •  Waiting for project to come up  ...
[odo] I0721 05:05:46.364771   15651 occlient.go:541] Status of creation of project tkcpwomgvs is Active
[odo] I0721 05:05:46.364868   15651 occlient.go:546] Project tkcpwomgvs now exists
[odo] I0721 05:05:46.380088   15651 occlient.go:581] Status of creation of service account &ServiceAccount{ObjectMeta:{default  tkcpwomgvs /api/v1/namespaces/tkcpwomgvs/serviceaccounts/default d59574a5-cb0f-11ea-8497-0ad2f6981259 107447 0 2020-07-21 05:05:45 +0000 UTC <nil> <nil> map[] map[] [] []  []},Secrets:[]ObjectReference{ObjectReference{Kind:,Namespace:,Name:default-token-wc5kb,UID:,APIVersion:,ResourceVersion:,FieldPath:,},ObjectReference{Kind:,Namespace:,Name:default-dockercfg-6g9t4,UID:,APIVersion:,ResourceVersion:,FieldPath:,},},ImagePullSecrets:[]LocalObjectReference{LocalObjectReference{Name:default-dockercfg-6g9t4,},},AutomountServiceAccountToken:nil,} is ready
[odo] 
 ✓  Waiting for project to come up [799ms]
[odo]  ✓  Project 'tkcpwomgvs' is ready for use
[odo]  ✓  New project created and now using project: tkcpwomgvs
[odo] I0721 05:05:46.395732   15651 odo.go:72] Could not get the latest release information in time. Never mind, exiting gracefully :)
Running odo with args [odo project list -o json]
[odo] {
[odo] 	"kind": "List",
[odo] 	"apiVersion": "odo.dev/v1alpha1",
[odo] 	"metadata": {},
[odo] 	"items": [
[odo] 		{
[odo] 			"kind": "Project",
[odo] 			"apiVersion": "odo.dev/v1alpha1",
[odo] 			"metadata": {
[odo] 				"name": "ci-operator-hub-project",
[odo] 				"namespace": "ci-operator-hub-project",
[odo] 				"creationTimestamp": null
[odo] 			},
[odo] 			"spec": {},
[odo] 			"status": {
[odo] 				"active": false
[odo] 			}
[odo] 		},
[odo] 		{
[odo] 			"kind": "Project",
[odo] 			"apiVersion": "odo.dev/v1alpha1",
[odo] 			"metadata": {
[odo] 				"name": "lyuqwdvlqo",
[odo] 				"namespace": "lyuqwdvlqo",
[odo] 				"creationTimestamp": null
[odo] 			},
[odo] 			"spec": {},
[odo] 			"status": {
[odo] 				"active": false
[odo] 			}
[odo] 		},
[odo] 		{
[odo] 			"kind": "Project",
[odo] 			"apiVersion": "odo.dev/v1alpha1",
[odo] 			"metadata": {
[odo] 				"name": "myproject",
[odo] 				"namespace": "myproject",
[odo] 				"creationTimestamp": null
[odo] 			},
[odo] 			"spec": {},
[odo] 			"status": {
[odo] 				"active": false
[odo] 			}
[odo] 		},
[odo] 		{
[odo] 			"kind": "Project",
[odo] 			"apiVersion": "odo.dev/v1alpha1",
[odo] 			"metadata": {
[odo] 				"name": "ncsykelidz",
[odo] 				"namespace": "ncsykelidz",
[odo] 				"creationTimestamp": null
[odo] 			},
[odo] 			"spec": {},
[odo] 			"status": {
[odo] 				"active": false
[odo] 			}
[odo] 		},
[odo] 		{
[odo] 			"kind": "Project",
[odo] 			"apiVersion": "odo.dev/v1alpha1",
[odo] 			"metadata": {
[odo] 				"name": "ortrrarady",
[odo] 				"namespace": "ortrrarady",
[odo] 				"creationTimestamp": null
[odo] 			},
[odo] 			"spec": {},
[odo] 			"status": {
[odo] 				"active": false
[odo] 			}
[odo] 		},
[odo] 		{
[odo] 			"kind": "Project",
[odo] 			"apiVersion": "odo.dev/v1alpha1",
[odo] 			"metadata": {
[odo] 				"name": "pgnqqoellr",
[odo] 				"namespace": "pgnqqoellr",
[odo] 				"creationTimestamp": null
[odo] 			},
[odo] 			"spec": {},
[odo] 			"status": {
[odo] 				"active": false
[odo] 			}
[odo] 		}
[odo] 	]
[odo] }
Deleting project: tkcpwomgvs
Running odo with args [odo project delete tkcpwomgvs -f]
[odo] I0721 05:05:46.886950   15686 application.go:49] Unable to list Service Catalog instances: unable to list ServiceInstances: serviceinstances.servicecatalog.k8s.io is forbidden: User "developer" cannot list resource "serviceinstances" in API group "servicecatalog.k8s.io" in the namespace "tkcpwomgvs"
[odo]  ⚠  Warning! Projects are deleted from the cluster asynchronously. Odo does its best to delete the project. Due to multi-tenant clusters, the project may still exist on a different node.
[odo] I0721 05:05:46.922622   15686 odo.go:72] Could not get the latest release information in time. Never mind, exiting gracefully :)
[odo]  ✓  Deleted project : tkcpwomgvs
Deleting dir: /tmp/189744642
------------------------------
• Failure [1.542 seconds]
odo project command tests
/go/src/github.com/openshift/odo/tests/integration/project/cmd_project_test.go:15
  odo machine readable output on empty project
  /go/src/github.com/openshift/odo/tests/integration/project/cmd_project_test.go:52
    should be able to list current project [It]
    /go/src/github.com/openshift/odo/tests/integration/project/cmd_project_test.go:53
    Expected
      
        <string>: {"apiVersion":"odo.dev/v1alpha1","items":[{"apiVersion":"odo.dev/v1alpha1","kind":"Project","metadata":{"creationTimestamp":null,"name":"ci-operator-hub-project","namespace":"ci-operator-hub-project"},"spec":{},"status":{"active":false}},{"apiVersion":"odo.dev/v1alpha1","kind":"Project","metadata":{"creationTimestamp":null,"name":"lyuqwdvlqo","namespace":"lyuqwdvlqo"},"spec":{},"status":{"active":false}},{"apiVersion":"odo.dev/v1alpha1","kind":"Project","metadata":{"creationTimestamp":null,"name":"myproject","namespace":"myproject"},"spec":{},"status":{"active":false}},{"apiVersion":"odo.dev/v1alpha1","kind":"Project","metadata":{"creationTimestamp":null,"name":"ncsykelidz","namespace":"ncsykelidz"},"spec":{},"status":{"active":false}},{"apiVersion":"odo.dev/v1alpha1","kind":"Project","metadata":{"creationTimestamp":null,"name":"ortrrarady","namespace":"ortrrarady"},"spec":{},"status":{"active":false}},{"apiVersion":"odo.dev/v1alpha1","kind":"Project","metadata":{"creationTimestamp":null,"name":"pgnqqoellr","namespace":"pgnqqoellr"},"spec":{},"status":{"active":false}}],"kind":"List","metadata":{}}
    to contain substring
        <string>: {"apiVersion":"odo.dev/v1alpha1","kind":"Project","metadata":{"creationTimestamp":null,"name":"tkcpwomgvs","namespace":"tkcpwomgvs"},"spec":{},"status":{"active":true}}
    /go/src/github.com/openshift/odo/tests/integration/project/cmd_project_test.go:59 
@openshift-ci-robot openshift-ci-robot added the flake Categorizes issue or PR as related to a flaky test. label Jul 21, 2020
@amitkrout
Copy link
Contributor Author

amitkrout commented Jul 21, 2020

Steps to reproduce it locally

Step 1:
$ cat test.sh 
#!/bin/bash
set -x

odo project create testproject -w
odo project list -o json | grep testproject

Step 2:
$ ./test.sh

Step 3:
Project name should be captured in the last command output

If you have time and patience then try to reproduce it locally.

@amitkrout amitkrout changed the title Project created with -w flag is not shown in "odo project list -o json" Project created with -w flag immediately is not shown in "odo project list -o json" Jul 21, 2020
@amitkrout amitkrout added the priority/Medium Nice to have issue. Getting it done before priority changes would be great. label Jul 21, 2020
@mik-dass
Copy link
Contributor

Duplicate of #2117

@mik-dass mik-dass marked this as a duplicate of #2117 Jul 21, 2020
@amitkrout
Copy link
Contributor Author

/close

@openshift-ci-robot
Copy link
Collaborator

@amitkrout: Closing this issue.

In response to this:

/close

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flake Categorizes issue or PR as related to a flaky test. priority/Medium Nice to have issue. Getting it done before priority changes would be great.
Projects
None yet
Development

No branches or pull requests

3 participants