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

Move Operator Hub out of experimental mode #3938

Merged
merged 1 commit into from
Sep 16, 2020
Merged

Move Operator Hub out of experimental mode #3938

merged 1 commit into from
Sep 16, 2020

Conversation

dharmit
Copy link
Member

@dharmit dharmit commented Sep 11, 2020

What type of PR is this?
/kind feature
/kind code-refactoring

What does does this PR do / why we need it:
It moves Operator Hub integration out of experimental mode. We need it for v2.

Which issue(s) this PR fixes:

Fixes #3595

PR acceptance criteria:

How to test changes / Special notes to the reviewer:

  • Tests should pass.
  • If Operators are supported by the cluster (4.x), we ignore service catalog altogether.
  • If user's working with 3.x cluster, odo should support Service Catalog (if enabled by the user).

@openshift-ci-robot openshift-ci-robot added kind/feature Categorizes issue as a feature request. For PRs, that means that the PR is the implementation kind/code-refactoring labels Sep 11, 2020
@cdrage
Copy link
Member

cdrage commented Sep 11, 2020

Code looks great. I did review this code twice already before the rebasing mess! So big approval from me.

/approve

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cdrage

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. Required by Prow. label Sep 11, 2020
@dharmit
Copy link
Member Author

dharmit commented Sep 12, 2020

The three test specs that failed are in the file tests/integration/cmd_link_unlink_test.go. These specs are:

  1. Wait till frontend dc rollout properly after linking the frontend application to the backend
  2. should link the frontend application to the backend and then unlink successfully
  3. When link between components using wrong port

And they all failed with the same error: [odo] ✗ Neither a service nor a component named backend could be located. Please create one of the two before attempting to use 'odo link'.

But on my local setup running CRC with OpenShift 4.5, doing ginkgo --focus "odo link and unlink command tests" tests/integration/ passes without any errors for all the 6 specs in that file.

@dharmit
Copy link
Member Author

dharmit commented Sep 14, 2020

Unrelated error in 4.5 integration tests

 [odo] [ERROR] For more information about the errors and possible solutions, please read the following articles:
[odo] [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException
[odo] I0914 07:50:45.401555   26358 exec.go:43] ExecuteCommand returned an an err: error while streaming command: command terminated with exit code 1. for command '[/bin/sh -c mvn clean -Dmaven.repo.local=/home/user/.m2/repository package -Dmaven.test.skip=true]'. output: [INFO] Scanning for projects...
[odo] [INFO] ------------------------------------------------------------------------
[odo] [INFO] BUILD FAILURE
[odo] [INFO] ------------------------------------------------------------------------
[odo] [INFO] Total time:  0.478 s
[odo] [INFO] Finished at: 2020-09-14T07:50:45Z
[odo] [INFO] ------------------------------------------------------------------------
[odo] [ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/projects). Please verify you invoked Maven from the correct directory. -> [Help 1]
[odo] [ERROR] 
[odo] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[odo] [ERROR] Re-run Maven using the -X switch to enable full debug logging.
[odo] [ERROR] 
[odo] [ERROR] For more information about the errors and possible solutions, please read the following articles:
[odo] [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException
[odo]  ✗  Executing build command "mvn clean -Dmaven.repo.local=/home/user/.m2/repository package -Dmaven.test.skip=true" [8s]
[odo]  ✗  Failed to start component with name qdwnws. Error: Failed to create the component: command execution failed: unable to execute the run command: unable to exec command [/bin/sh -c mvn clean -Dmaven.repo.local=/home/user/.m2/repository package -Dmaven.test.skip=true]: 
[odo] [INFO] Scanning for projects...
[odo] [INFO] ------------------------------------------------------------------------
[odo] [INFO] BUILD FAILURE
[odo] [INFO] ------------------------------------------------------------------------
[odo] [INFO] Total time:  0.478 s
[odo] [INFO] Finished at: 2020-09-14T07:50:45Z
[odo] [INFO] ------------------------------------------------------------------------
[odo] [ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/projects). Please verify you invoked Maven from the correct directory. -> [Help 1]
[odo] [ERROR] 
[odo] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[odo] [ERROR] Re-run Maven using the -X switch to enable full debug logging.
[odo] [ERROR] 
[odo] [ERROR] For more information about the errors and possible solutions, please read the following articles:
[odo] [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException
[odo] : error while streaming command: command terminated with exit code 1
Deleting project: pneizhqbcx
Running odo with args [odo project delete pneizhqbcx -f]
[odo] I0914 07:53:36.636390   27392 util.go:730] HTTPGetRequest: https://raw.githubusercontent.com/openshift/odo/master/build/VERSION
[odo] I0914 07:53:36.636629   27392 util.go:751] Response will be cached in /tmp/odohttpcache for 1h0m0s
[odo] I0914 07:53:36.636844   27392 util.go:764] Cached response used.
[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] I0914 07:53:36.797126   27392 odo.go:72] Could not get the latest release information in time. Never mind, exiting gracefully :)
[odo]  ✓  Deleted project : pneizhqbcx
Setting current dir to: /go/src/github.com/openshift/odo/tests/integration/devfile
Deleting dir: /tmp/718293413
• Failure [275.302 seconds]
odo devfile push command tests
/go/src/github.com/openshift/odo/tests/integration/devfile/cmd_devfile_push_test.go:21
  Verify devfile push works
  /go/src/github.com/openshift/odo/tests/integration/devfile/cmd_devfile_push_test.go:80
    Ensure that push -f correctly removes local deleted files from the remote target sync folder [It]
[Fail] odo devfile push command tests Verify devfile push works [It] Ensure that push -f correctly removes local deleted files from the remote target sync folder 
/go/src/github.com/openshift/odo/tests/helper/helper_run.go:109
Ran 187 of 187 Specs in 2135.333 seconds
FAIL! -- 186 Passed | 1 Failed | 0 Pending | 0 Skipped
Ginkgo ran 1 suite in 35m44.632120769s
Test Suite Failed
make: *** [test-integration-devfile] Error 1
error: failed to execute wrapped command: exit status 2 

/test v4.5-integration-e2e

@prietyc123
Copy link
Contributor

Unrelated error in 4.5 integration tests

The issue was due to #3943 which got fixed now. Maybe you need to rebase the pr to get the test passed.

@dharmit
Copy link
Member Author

dharmit commented Sep 15, 2020

odo] I0915 06:24:39.782715   32113 sync.go:90] Making /tmp/gnclwwncgf relative to /tmp/gnclwwncgf/sb.jar
[odo] I0915 06:24:39.782721   32113 sync.go:102] makeTar srcFile: gnclwwncgf/sb.jar
[odo] I0915 06:24:39.782727   32113 sync.go:103] makeTar destFile: sb.jar
[odo] I0915 06:24:39.782745   32113 sync.go:121] recursiveTar arguments: srcBase: /tmp, srcFile: gnclwwncgf/sb.jar, destBase: /tmp/src, destFile: sb.jar
[odo] I0915 06:24:39.782757   32113 sync.go:127] Corrected destinations: base: /tmp/src file: sb.jar
[odo]  ✗  Syncing files to the component [394ms]
[odo]  ✗  Command 'tar xf - -C /tmp/src' in container failed.
[odo] 
[odo]  ✗  stdout: 
[odo] 
[odo]  ✗  stderr: tar: /tmp/src: Cannot open: No such file or directory
[odo] tar: Error is not recoverable: exiting now
[odo] 
[odo] 
[odo]  ✗  err: error while streaming command: Internal error occurred: error executing command in container: write |1: broken pipe
[odo] 
[odo] E0915 06:24:40.176497   32113 v2.go:105] tls: use of closed connection
[odo]  ✗  Internal error occurred: error executing command in container: write |1: broken pipe
Deleting project: dccsjcwboi
Running odo with args [odo project delete dccsjcwboi -f]
[odo] I0915 06:24:40.418962   32136 util.go:730] HTTPGetRequest: https://raw.githubusercontent.com/openshift/odo/master/build/VERSION
[odo] I0915 06:24:40.419132   32136 util.go:751] Response will be cached in /tmp/odohttpcache for 1h0m0s
[odo] I0915 06:24:40.419314   32136 util.go:764] Cached response used.
[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] I0915 06:24:40.542797   32136 odo.go:72] Could not get the latest release information in time. Never mind, exiting gracefully :)
[odo]  ✓  Deleted project : dccsjcwboi
Setting current dir to: /go/src/github.com/openshift/odo/tests/integration
Deleting dir: /tmp/017087335
• Failure [49.503 seconds]
odo component command tests
/go/src/github.com/openshift/odo/tests/integration/cmd_cmp_test.go:13
  Creating component using symlink
  /go/src/github.com/openshift/odo/tests/integration/component.go:745
    Should be able to deploy a spring boot uberjar file using symlinks in all odo commands [It]
    /go/src/github.com/openshift/odo/tests/integration/component.go:769
    No future change is possible.  Bailing out early after 21.516s.
      
    Running odo with args [odo push --context /tmp/gnclwwncgf]
    Expected
        <int>: 1
    to match exit code:
        <int>: 0
    /go/src/github.com/openshift/odo/tests/helper/helper_run.go:34 

/test v4.5-integration-e2e

@codecov
Copy link

codecov bot commented Sep 15, 2020

Codecov Report

Merging #3938 into master will decrease coverage by 0.28%.
The diff coverage is 1.01%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3938      +/-   ##
==========================================
- Coverage   44.83%   44.55%   -0.29%     
==========================================
  Files         143      143              
  Lines       13908    13985      +77     
==========================================
- Hits         6236     6231       -5     
- Misses       7082     7163      +81     
- Partials      590      591       +1     
Impacted Files Coverage Δ
pkg/component/component.go 25.47% <0.00%> (-0.33%) ⬇️
pkg/kclient/deployments.go 21.95% <0.00%> (-11.08%) ⬇️
pkg/occlient/occlient.go 49.79% <0.00%> (-0.06%) ⬇️
pkg/odo/cli/service/delete.go 23.33% <0.00%> (-0.40%) ⬇️
pkg/odo/cli/service/list.go 0.00% <0.00%> (ø)
pkg/odo/util/cmdutils.go 1.63% <0.00%> (-0.08%) ⬇️
pkg/odo/cli/service/create.go 10.46% <5.88%> (-2.09%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 12fdfad...2ca661a. Read the comment docs.

@girishramnani
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Sep 16, 2020
@openshift-merge-robot openshift-merge-robot merged commit b055c99 into redhat-developer:master Sep 16, 2020
@dharmit dharmit deleted the 3595-alpha-bkp branch September 17, 2020 05:53
@@ -96,6 +98,7 @@ type LinkOptions struct {
func NewLinkOptions() *LinkOptions {
options := LinkOptions{}
options.commonLinkOptions = newCommonLinkOptions()
options.commonLinkOptions.csvSupport, _ = util.IsCSVSupported()
Copy link
Contributor

@metacosm metacosm Sep 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Obviously late on this but this should actually be done in Complete… New functions should contain as little logic as possible unless it cannot be avoided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. Required by Prow. area/refactoring Issues or PRs related to code refactoring kind/feature Categorizes issue as a feature request. For PRs, that means that the PR is the implementation lgtm Indicates that a PR is ready to be merged. Required by Prow.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move Operator Hub integration out of Experimental mode
8 participants