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

Fix #2707 : odo catalog list components -o json does not have imageStreamRef in json output after update from v1.0.x to v1.1.0 #3226

Merged

Conversation

devang-gaur
Copy link
Contributor

What type of PR is this?

/kind bug

What does this PR do / why we need it:
Undoes the change made/bug added in PR #2451

Which issue(s) this PR fixes:
Fixes #2707

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label May 20, 2020
@devang-gaur devang-gaur changed the title Fix #2707: odo catalog list components -o json does not have imageStreamRef in json output after update from v1.0.x to v1.1.0 Fix #2707 : odo catalog list components -o json does not have imageStreamRef in json output after update from v1.0.x to v1.1.0 May 20, 2020
@dharmit
Copy link
Member

dharmit commented May 21, 2020

/test v4.3-integration-e2e
Looks like infra issue:

level=fatal msg="failed to fetch Cluster: failed to fetch dependency of \"Cluster\": failed to generate asset \"Platform Permissions Check\": validate AWS credentials: checking install permissions: error simulating policy: Throttling: Rate exceeded\n\tstatus code: 400, request id: 065d512a-bdb8-4093-b8af-4fd188aa55b7" 

@dharmit
Copy link
Member

dharmit commented May 21, 2020

/approve

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dharmit

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 May 21, 2020
@dharmit
Copy link
Member

dharmit commented May 29, 2020

Looks like connecting to devfile registry failed.
/test v4.5-integration-e2e

 [odo] I0526 11:16:31.969509    6263 util.go:399] path ./.odo/config.yaml doesn't exist, skipping it
[odo] I0526 11:16:31.969525    6263 preference.go:188] The path for preference file is /tmp/318979902/config.yaml
[odo] I0526 11:16:31.975008    6263 preference.go:188] The path for preference file is /tmp/318979902/config.yaml
[odo]  ⚠  Registry CheDevfileRegistry is not set up properly with error: Unable to download the devfile from https://che-devfile-registry.openshift.io/devfiles/angular/devfile.yaml: Get https://che-devfile-registry.openshift.io/devfiles/angular/devfile.yaml: net/http: timeout awaiting response headers
[odo]  ⚠  Registry CheDevfileRegistry is not set up properly with error: Unable to download the devfile from https://che-devfile-registry.openshift.io/devfiles/java-gradle/devfile.yaml: Get https://che-devfile-registry.openshift.io/devfiles/java-gradle/devfile.yaml: net/http: timeout awaiting response headers
[odo]  ✗  Get https://che-devfile-registry.openshift.io/devfiles/angular/devfile.yaml: net/http: timeout awaiting response headers
Deleting project: ydzppjstcg
Running odo with args [odo project delete ydzppjstcg -f]
[odo] I0526 11:16:46.256037    6400 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 "ydzppjstcg"
[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] I0526 11:16:46.356821    6400 odo.go:72] Could not get the latest release information in time. Never mind, exiting gracefully :)
[odo]  ✓  Deleted project : ydzppjstcg
Setting current dir to: /go/src/github.com/openshift/odo/tests/integration/devfile
Deleting dir: /tmp/318979902
• Failure [16.700 seconds]
odo devfile delete command tests
/go/src/github.com/openshift/odo/tests/integration/devfile/cmd_devfile_delete_test.go:14
  when devfile delete command is executed
  /go/src/github.com/openshift/odo/tests/integration/devfile/cmd_devfile_delete_test.go:46
    should delete the component created from the devfile and also the owned resources [It]
[odo]  ✓  Deleted project : vfqzcvhsgm
Setting current dir to: /go/src/github.com/openshift/odo/tests/integration/devfile
Deleting dir: /tmp/571707124 

4.3 failure is fixed by #3239.
/test v4.3-integration-e2e

@dharmit
Copy link
Member

dharmit commented May 29, 2020

/lgtm since it's a one-line fix simply undoing what was done in #2451.

@dharmit
Copy link
Member

dharmit commented Jun 1, 2020

4.3 integration test fails with:

 • Failure [42.928 seconds]
odo debug command tests
/go/src/github.com/openshift/odo/tests/integration/cmd_debug_test.go:18
  odo debug on a nodejs:latest component
  /go/src/github.com/openshift/odo/tests/integration/cmd_debug_test.go:41
    check that machine output debug information works [It]
    /go/src/github.com/openshift/odo/tests/integration/cmd_debug_test.go:42
    No future change is possible.  Bailing out early after 0.765s.
      
    Running odo with args [odo debug info --context /tmp/242064143 -o json]
    Expected
        <int>: 1
    to match exit code:
        <int>: 0 

Cause of failure:

Running odo with args [odo debug info --context /tmp/242064143 -o json]
[odo] Started port forwarding at ports - 45860:5858
[odo] {
[odo]     "kind": "Error",
[odo]     "apiVersion": "odo.dev/v1alpha1",
[odo]     "metadata": {
[odo]         "creationTimestamp": null
[odo]     },
[odo]     "message": "debug is not running for the component nodejs-242064143-svih"
[odo] } 

Opened #3273 since it's showing up with same tracebacks.

/test v4.3-integration-e2e

@dharmit
Copy link
Member

dharmit commented Jun 2, 2020

#3122 - link to logs

 [odo]  ✗  Failed to start component with name pjqkmu.
[odo] Error: Failed to create the component: unable to create or update component: unable to create Deployment pjqkmu: deployments.apps "pjqkmu" is forbidden: unable to create new content in namespace ybhcrgeoif because it is being terminated
Deleting project: bldnwdtvva
Running odo with args [odo project delete bldnwdtvva -f]
[odo] I0601 13:39:05.327060    5614 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 "bldnwdtvva"
[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] I0601 13:39:05.409894    5614 odo.go:72] Could not get the latest release information in time. Never mind, exiting gracefully :)
[odo]  ✓  Deleted project : bldnwdtvva
Setting current dir to: /go/src/github.com/openshift/odo/tests/integration/devfile
Deleting dir: /tmp/266381801
• Failure [3.527 seconds]
odo devfile url command tests
/go/src/github.com/openshift/odo/tests/integration/devfile/cmd_devfile_url_test.go:16
  Creating urls
  /go/src/github.com/openshift/odo/tests/integration/devfile/cmd_devfile_url_test.go:105
    create with now flag should pass [It]
[Fail] odo devfile url command tests Creating urls [It] create with now flag should pass 
/go/src/github.com/openshift/odo/tests/helper/helper_run.go:34
Ran 59 of 59 Specs in 576.181 seconds
FAIL! -- 58 Passed | 1 Failed | 0 Pending | 0 Skipped

/test v4.3-integration-e2e

@codecov
Copy link

codecov bot commented Jun 2, 2020

Codecov Report

Merging #3226 into master will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3226      +/-   ##
==========================================
- Coverage   45.57%   45.56%   -0.01%     
==========================================
  Files         111      111              
  Lines       10972    10972              
==========================================
- Hits         5000     4999       -1     
- Misses       5483     5484       +1     
  Partials      489      489              
Impacted Files Coverage Δ
pkg/catalog/catalog.go 50.44% <100.00%> (ø)
pkg/sync/sync.go 47.52% <0.00%> (-1.00%) ⬇️

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 8faf7e5...8171029. Read the comment docs.

@girishramnani
Copy link
Contributor

/hold

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. Required by Prow. label Jun 3, 2020
@kadel
Copy link
Member

kadel commented Jun 3, 2020

/hold

why?

@girishramnani
Copy link
Contributor

@kadel #2707 (comment)

@girishramnani
Copy link
Contributor

@dev-gaur can you add the change as discussed here #2707 (comment)

@@ -443,7 +443,7 @@ func SliceSupportedTags(component ComponentType) ([]string, []string) {

// this makes sure that json marshal shows these lists as [] instead of null
supTag, unSupTag := []string{}, []string{}
tagMap := createImageTagMap(component.Spec.ImageStreamRef.Spec.Tags)
tagMap := createImageTagMap(component.Spec.ImageStreamTags)
Copy link
Contributor

Choose a reason for hiding this comment

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

Don’t change this

Copy link
Contributor

Choose a reason for hiding this comment

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

Or on second thought, let’s see the tests

@devang-gaur
Copy link
Contributor Author

The json output we get now outputs the ImageStreamTags...

@dgolovin I think the info you require can be found at the .item[i].spec.imageStreamTags path

[dev-gaur@R3L-srv nodejs-ex]$ ./odo catalog list components -o json
{
    "kind": "List",
    "apiVersion": "odo.dev/v1alpha1",
    "metadata": {
        "creationTimestamp": null
    },
    "items": [
        {
            "kind": "ComponentType",
            "apiVersion": "odo.dev/v1alpha1",
            "metadata": {
                "name": "dotnet",
                "namespace": "openshift",
                "creationTimestamp": null
            },
            "spec": {
                "allTags": [
                    "2.1",
                    "2.2",
                    "latest"
                ],
                "nonHiddenTags": [
                    "2.1",
                    "2.2",
                    "latest"
                ],
                "supportedTags": [],
                "imageStreamTags": [
                    {
                        "name": "2.1",
                        "annotations": {
                            "description": "Build and run .NET Core 2.1 applications on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/2.1/build/README.md.",
                            "iconClass": "icon-dotnet",
                            "openshift.io/display-name": ".NET Core 2.1",
                            "sampleContextDir": "app",
                            "sampleRef": "dotnetcore-2.1",
                            "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex.git",
                            "supports": "dotnet:2.1,dotnet",
                            "tags": "builder,.net,dotnet,dotnetcore,rh-dotnet21",
                            "version": "2.1"
                        },
                        "from": {
                            "kind": "DockerImage",
                            "name": "registry.redhat.io/dotnet/dotnet-21-rhel7:2.1"
                        },
                        "generation": 2,
                        "importPolicy": {},
                        "referencePolicy": {
                            "type": "Local"
                        }
                    },
                    {
                        "name": "2.2",
                        "annotations": {
                            "description": "Build and run .NET Core 2.2 applications on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/2.2/build/README.md.",
                            "iconClass": "icon-dotnet",
                            "openshift.io/display-name": ".NET Core 2.2",
                            "sampleContextDir": "app",
                            "sampleRef": "dotnetcore-2.2",
                            "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex.git",
                            "supports": "dotnet:2.2,dotnet",
                            "tags": "builder,.net,dotnet,dotnetcore,rh-dotnet22",
                            "version": "2.2"
                        },
                        "from": {
                            "kind": "DockerImage",
                            "name": "registry.redhat.io/dotnet/dotnet-22-rhel7:2.2"
                        },
                        "generation": 2,
                        "importPolicy": {},
                        "referencePolicy": {
                            "type": "Local"
                        }
                    },
.....

@girishramnani
Copy link
Contributor

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. Required by Prow. label Jul 2, 2020
@girishramnani
Copy link
Contributor

Please verify if this works @dgolovin

@kadel
Copy link
Member

kadel commented Jul 8, 2020

/lgtm
/retest

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Jul 8, 2020
@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

2 similar comments
@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit e6340c9 into redhat-developer:master Jul 9, 2020
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. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. Required by Prow.
Projects
None yet
8 participants