openshift / origin-web-console

Web Console for the OpenShift Application Platform
https://www.openshift.org/
Apache License 2.0
123 stars 230 forks source link

[BUG] project openshift catalog view error #3137

Closed ideapark closed 4 years ago

ideapark commented 5 years ago

[ENV]

openshift origin v3.11

[ACTION]

  1. grant user admin permission of project openshift

oc adm policy add-role-to-user admin myname -n openshift

  1. navigate to

https://my.openshift.cluster/console/project/openshift/catalog

[ERROR]

Nothing to display

[ANALYSIS]

Project openshift is a public place to hold shared resource of imagestream, templates. when the console needs to get imagestream or templates, it will get the current project and append project openshift result tegother.

But logical error is that, when the current project is project openshift, it will get templates and imagestreams twice, and aggregated data does not handle duplicates.

[My Browser Error Message]

vendor.js:5659 Error: [ngRepeat:dupes] Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: item in $ctrl.filteredItems track by item.resource.metadata.uid, Duplicate key: 91c6253b-aa16-11e9-a961-00163e10a746, Duplicate value: {"resource":{"metadata":{"name":"dotnet","namespace":"openshift","selfLink":"/apis/image.openshift.io/v1/namespaces/openshift/imagestreams/dotnet","uid":"91c6253b-aa16-11e9-a961-00163e10a746","resourceVersion":"1593","generation":2,"creationTimestamp":"2019-07-19T11:15:52Z","annotations":{"openshift.io/display-name":".NET Core","openshift.io/image.dockerRepositoryCheck":"2019-07-19T11:15:54Z"}},"spec":{"lookupPolicy":{"local":false},"tags":[{"name":"2.0","annotations":{"description":"Build and run .NET Core 2.0 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/2.0/build/README.md.","iconClass":"icon-dotnet","openshift.io/display-name":".NET Core 2.0","sampleContextDir":"app","sampleRef":"dotnetcore-2.0","sampleRepo":"https://github.com/redhat-developer/s2i-dotnetcore-ex.git","supports":"dotnet:2.0,dotnet","tags":"builder,.net,dotnet,dotnetcore,rh-dotnet20","version":"2.0"},"from":{"kind":"DockerImage","name":"registry.centos.org/dotnet/dotnet-20-centos7:latest"},"generation":2,"importPolicy":{},"referencePolicy":{"type":"Source"}},{"name":"latest","annotations":{"description":"Build and run .NET Core applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/2.0/build/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of .NET Core available on OpenShift, including major versions updates.","iconClass":"icon-dotnet","openshift.io/display-name":".NET Core (Latest)","sampleContextDir":"app","sampleRef":"dotnetcore-2.0","sampleRepo":"https://github.com/redhat-developer/s2i-dotnetcore-ex.git","supports":"dotnet","tags":"builder,.net,dotnet,dotnetcore"},"from":{"kind":"ImageStreamTag","name":"2.0"},"generation":1,"importPolicy":{},"referencePolicy":{"type":"Source"}}]},"status":{"dockerImageRepository":"docker-registry.default.svc:5000/openshift/dotnet","tags":[{"tag":"2.0","items":[{"created":"2019-07-19T11:15:54Z","dockerImageReference":"registry.centos.org/dotnet/dotnet-20-centos7@sha256:0f8ba35b50a98c7980af6aa8b023f347e9b1d7f9195df7b99ddeb9afaa018a32","image":"sha256:0f8ba35b50a98c7980af6aa8b023f347e9b1d7f9195df7b99ddeb9afaa018a32","generation":2}]},{"tag":"latest","items":[{"created":"2019-07-19T11:15:54Z","dockerImageReference":"registry.centos.org/dotnet/dotnet-20-centos7@sha256:0f8ba35b50a98c7980af6aa8b023f347e9b1d7f9195df7b99ddeb9afaa018a32","image":"sha256:0f8ba35b50a98c7980af6aa8b023f347e9b1d7f9195df7b99ddeb9afaa018a32","generation":2}]}]},"kind":"ImageStream","apiVersion":"image.openshift.io/v1"},"catalogSrv":{"constants":{"HELP_BASE_URL":"https://docs.openshift.org/latest/","HELP":{"cli":"cli_reference/index.html","get_started_cli":"cli_reference/get_started_cli.html","basic_cli_operations":"cli_reference/basic_cli_operations.html","build-triggers":"dev_guide/builds/triggering_builds.html","webhooks":"dev_guide/builds/triggering_builds.html#webhook-triggers","new_app":"dev_guide/application_lifecycle/new_app.html","start-build":"dev_guide/builds/basic_build_operations.html#starting-a-build","deployment-operations":"cli_reference/basic_cli_operations.html#build-and-deployment-cli-operations","route-types":"architecture/networking/routes.html#route-types","persistent_volumes":"dev_guide/persistent_volumes.html","expanding_persistent_volumes":"dev_guide/expanding_persistent_volumes.html","compute_resources":"dev_guide/compute_resources.html","pod_autoscaling":"dev_guide/pod_autoscaling.html","application_health":"dev_guide/application_health.html","webhook_secrets":"dev_guide/builds/triggering_builds.html#webhook-triggers","source_secrets":"dev_guide/builds/build_inputs.html#using-secrets-during-build","git_secret":"dev_guide/builds/build_inputs.html#source-clone-secrets","pull_secret":"dev_guide/managing_images.html#using-image-pull-secrets","managing_secrets":"dev_guide/service_accounts.html#managing-allowed-secrets","creating_secrets":"dev_guide/secrets.html#creating-secrets","storage_classes":"install_config/persistent_storage/dynamically_provisioning_pvs.html","selector_label":"install_config/persistent_storage/selector_label_binding.html","rolling_strategy":"dev_guide/deployments/deployment_strategies.html#rolling-strategy","recreate_strategy":"dev_guide/deployments/deployment_strategies.html#recreate-strategy","custom_strategy":"dev_guide/deployments/deployment_strategies.html#custom-strategy","lifecycle_hooks":"dev_guide/deployments/deployment_strategies.html#lifecycle-hooks","new_pod_exec":"dev_guide/deployments/deployment_strvendor.js:3372
    at vendor.js:9772
    at vendor.js:6223
    at p.$digest (vendor.js:6253)
    at p.$apply (vendor.js:6309)
    at Array.O (vendor.js:4471)
    at p.$digest (vendor.js:6266)
    at p.$apply (vendor.js:6309)
    at vendor.js:5302
    at w (vendor.js:5366)
ideapark commented 5 years ago

@jwforres @spadgett