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
Add ability to create new service backed by an operator #2739
Add ability to create new service backed by an operator #2739
Conversation
Not related to this PR. Maybe a flake? Running 4.3 tests once more.
|
Failed with same trace again. Doesn't look like a flake:
|
Since it's a flake, triggering again hoping it passes. 😉 🤞 /test v4.3-integration-e2e-benchmark |
Codecov Report
@@ Coverage Diff @@
## master #2739 +/- ##
==========================================
- Coverage 43.67% 43.18% -0.50%
==========================================
Files 95 95
Lines 8762 8839 +77
==========================================
- Hits 3827 3817 -10
- Misses 4571 4653 +82
- Partials 364 369 +5
Continue to review full report at Codecov.
|
Created dir: /tmp/030013783
Creating a new project: kfwdgfteka
Running odo with args [odo project create kfwdgfteka -w -v4]
[odo] • Waiting for project to come up ...
[odo] I0325 05:14:03.867137 2341 occlient.go:547] Status of creation of project kfwdgfteka is Active
[odo] I0325 05:14:03.867173 2341 occlient.go:552] Project kfwdgfteka now exists
[odo] I0325 05:14:03.871808 2341 occlient.go:587] Status of creation of service account &ServiceAccount{ObjectMeta:k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta{Name:default,GenerateName:,Namespace:kfwdgfteka,SelfLink:/api/v1/namespaces/kfwdgfteka/serviceaccounts/default,UID:7172b53d-6e57-11ea-95a4-42010a1e0044,ResourceVersion:7399,Generation:0,CreationTimestamp:2020-03-25 05:14:03 +0000 UTC,DeletionTimestamp:<nil>,DeletionGracePeriodSeconds:nil,Labels:map[string]string{},Annotations:map[string]string{},OwnerReferences:[],Finalizers:[],ClusterName:,Initializers:nil,},Secrets:[{ default-token-wf9df } { default-dockercfg-r9bbv }],ImagePullSecrets:[{default-dockercfg-r9bbv}],AutomountServiceAccountToken:nil,} is ready
✓ Waiting for project to come up [811ms]
[odo] ✓ Project 'kfwdgfteka' is ready for use
[odo] ✓ New project created and now using project: kfwdgfteka
[odo] I0325 05:14:03.878314 2341 odo.go:80] Could not get the latest release information in time. Never mind, exiting gracefully :)
Created dir: /tmp/480965834
Created dir: /tmp/433769889
Current working dir: /home/travis/gopath/src/github.com/openshift/odo/tests/integration/servicecatalog
Running odo with args [odo service create --app qphldq -w dh-postgresql-apb --project kfwdgfteka --plan dev -p postgresql_user=luke -p postgresql_password=secret -p postgresql_database=my_data -p postgresql_version=9.6]
[odo] Deploying service dh-postgresql-apb of type: dh-postgresql-apb
[odo] • Deploying service ...
✓ Deploying service [28ms]
[odo] • Waiting for service to come up ...
✓ Waiting for service to come up [40s]
[odo] ✓ Service 'dh-postgresql-apb' is ready for use
[odo] Optionally, link dh-postgresql-apb to your component by running: 'odo link <component-name>'
Running oc with args [oc get serviceinstance -o name -n kfwdgfteka]
[oc] serviceinstance.servicecatalog.k8s.io/dh-postgresql-apb
Running odo with args [odo app delete qphldq -f]
[odo] ✗ qphldq app does not exists
• Failure [42.140 seconds]
odo service command tests
/home/travis/gopath/src/github.com/openshift/odo/tests/integration/servicecatalog/cmd_service_test.go:15
When the application is deleted
/home/travis/gopath/src/github.com/openshift/odo/tests/integration/servicecatalog/cmd_service_test.go:439
should delete the service(s) in the application as well [It]
/home/travis/gopath/src/github.com/openshift/odo/tests/integration/servicecatalog/cmd_service_test.go:444
No future change is possible. Bailing out early after 0.117s.
Running odo with args [odo app delete qphldq -f]
Expected
<int>: 1
to match exit code:
<int>: 0
/home/travis/gopath/src/github.com/openshift/odo/tests/helper/helper_run.go:34 I don't understand why it can't find the app |
/test v4.2-integration-e2e-benchmark related to flake with /test v4.3-integration-e2e-benchmark
|
Travis fails for the same reason as mentioned in previous comment:
Going to try and modify the particular test case to also have project info so that it does: |
Failing for same
/test v4.1-integration-e2e-benchmark |
@dharmit I am not getting the expected result. I am using a 4.4 cluster hosted on AWS resources. Let me know if i am missing anything
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dharmit Integration tests are missing. You can just replicate ``How to test``` through integration test script
@amitkrout I'm guessing that you're expecting MongoDB pods to spin up. Correct me if I'm wrong but I'm not able to infer anything else from the code blocks you've mentioned. The thing is that you need to test an operator that's got a valid alm example in its yaml definition. And that's not the case with MongoDB. So, please try with etcd operator's In upcoming PRs, we will address this issue to an extent. You can follow #2723 if you'd like to.
Sure. Thanks for the tip. I'll add it. 👍 |
Doesn't look related to the PR. Link to error log.
|
Both seems to be infra issues. /test v4.1-integration-e2e-benchmark
/test v4.2-integration-e2e-benchmark
|
/test v4.1-integration-e2e-benchmark
/test v4.2-integration-e2e-benchmark
|
I'm seeing same errors repeating in the tests.
|
/retest |
/test 4.1-integration-e2e-benchmark |
/test v4.1-integration-e2e-benchmark |
/test v4.1-integration-e2e-benchmark |
/test v4.1-integration-e2e-benchmark
/test v4.3-integration-e2e-benchmark
|
|
||
helper.CmdShouldPass("odo", "service", "create", etcdOperator, "--crd", "EtcdCluster") | ||
|
||
pods := helper.CmdShouldPass("oc", "get", "pods") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pass namespace along with rest argument, For example
helper.CmdShouldPass("oc", "get", "pods", "-n", project)
otherwise it may leads to flaky output in parallel run
// Look for pod with example name because that's the name etcd will give to the pods. | ||
etcdPod := regexp.MustCompile(`example-.[a-z0-9]*`).FindString(pods) | ||
|
||
ocArgs := []string{"get", "pods", etcdPod, "-o", "template=\"{{.status.phase}}\""} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pass namespace as a argument to avoid active namespace collision in parallel run
operators := helper.CmdShouldPass("odo", "catalog", "list", "services") | ||
etcdOperator := regexp.MustCompile(`etcdoperator\.*[a-z][0-9]\.[0-9]\.[0-9]`).FindString(operators) | ||
|
||
helper.CmdShouldPass("odo", "service", "create", etcdOperator, "--crd", "EtcdCluster") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete the service at the end of the spec to make sure odo service delete works in this scenario too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently we're doing this by helper.CmdShouldPass("oc", "delete", "EtcdCluster", "example")
since there's no way to delete operator backed services right now. This reminds me that I need to create a user story for service deletion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created #2792 to track this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool!!!
/test v4.3-integration-e2e-benchmark |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dharmit Integration test looks good to me, however UTs are missing for the changes you made. Can please add them or do you have any other plan ?
@girishramnani $ odo service create etcdoperator.v0.9.4
✗ unable to search classes by name (clusterserviceclasses.servicecatalog.k8s.io is forbidden: User "developer" cannot list resource "clusterserviceclasses" in API group "servicecatalog.k8s.io" at the cluster scope) I'll have to add a check for this so that if user has only specified operator name and not a crd, it fails; otherwise it continues to look for the service in Service Catalog. I have a tangential question related to the behaviour of But I don't see the message |
I found two things
|
@dharmit can we close this PR? |
It now contains information about how to spin up an operator backed service.
/retest |
/test v4.2-integration-e2e-benchmark odo supported images e2e tests
/go/src/github.com/openshift/odo/tests/e2escenarios/e2e_images_test.go:14
odo supported images deployment
/go/src/github.com/openshift/odo/tests/e2escenarios/e2e_images_test.go:137
Should be able to verify the nodejs-8-rhel7 image [It]
[Fail] odo supported images e2e tests odo supported images deployment [It] Should be able to verify the nodejs-8-rhel7 image
/go/src/github.com/openshift/odo/tests/helper/helper_run.go:34
Ran 23 of 23 Specs in 934.581 seconds
FAIL! -- 22 Passed | 1 Failed | 0 Pending | 0 Skipped |
/lgtm |
/retest Please review the full test history for this PR and help us cut down flakes. |
12 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
What type of PR is this?
/kind feature
What does does this PR do / why we need it:
This PR creates operator backed services.
Which issue(s) this PR fixes:
Fixes a part of #2613
How to test changes / Special notes to the reviewer:
developer
user:odo project create myproject
kubeadmin
user and install etcd operator in themyproject
namespace.myproject
namespace$ export ODO_EXPERIMENTAL=true $ odo login https://api.crc.testing:6443 -u developer -p developer $ odo catalog list services Operators available through Operator Hub NAME CRDs etcdoperator.v0.9.4 EtcdCluster, EtcdBackup, EtcdRestore
odo
doesn't support listing operator backed services yet so useoc
CLI for this):