Bug 1518497

Summary: Alias of ImageStreamTag displays separately on webconsole
Product: OpenShift Container Platform Reporter: Kenjiro Nakayama <knakayam>
Component: Management ConsoleAssignee: Samuel Padgett <spadgett>
Status: CLOSED ERRATA QA Contact: Yadan Pei <yapei>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.6.0CC: aos-bugs, bparees, jforrest, jokerman, mmccomas, spadgett, yanpzhan, yapei
Target Milestone: ---   
Target Release: 3.7.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Previously, image stream tag aliases would not show up in the add to project dialog version dropdown when the alias was specified in "name:tag" format in the `from.name` property. The `oc tag --alias` uses this format. The web console now handles aliases in this format correctly, and they will show up as an alias in the version dropdown with the tag they reference.
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-05 09:32:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Separated display of ImageStreamTag alias
none
expected.png none

Description Kenjiro Nakayama 2017-11-29 05:37:37 UTC
Created attachment 1360162 [details]
Separated display of ImageStreamTag alias

Description of problem:

- When we create ImageStreamTag with NAME:TAG foramt, webconsole displays it seprately.

Version-Release number of selected component (if applicable):
- OCP 3.6

How reproducible: 100%

Steps to Reproduce:
1. Create a imageStream with [1].
 - Not, the imageStream could be create with:

  # oc tag registry.access.redhat.com/rhscl/perl-520-rhel7:latest perl:5.20 --source=docker
  # oc tag perl:5.20 perl:latest --source=istag --alias
    +
 Adding annotations manually to display it on webconsole.

Actual results:
- See attached alias_seprated.png

Expected results:
- See attached expected.png

Additional info:

- If latest's ImageStreamTag has below <TAG>, the alias displays it as expected. but <NAME>:<TAG> does not show.

~~~
    from:
      kind: ImageStreamTag
      name: 5.20
~~~

- Please also refer to https://github.com/openshift/origin/pull/17377#issuecomment-347743443 

[1]
~~~
apiVersion: v1
kind: ImageStream
metadata:
  annotations:
    openshift.io/display-name: Perl
    openshift.io/image.dockerRepositoryCheck: 2017-11-29T05:16:21Z
  creationTimestamp: null
  generation: 3
  name: perl
spec:
  lookupPolicy:
    local: false
  tags:
  - annotations:
      openshift.io/display-name: Perl 5.20
      tags: builder,perl
    from:
      kind: DockerImage
      name: registry.access.redhat.com/rhscl/perl-520-rhel7:latest
    generation: 2
    importPolicy: {}
    name: "5.20"
    referencePolicy:
      type: Source
  - annotations:
      openshift.io/display-name: Perl (latest)
      tags: builder,perl
    from:
      kind: ImageStreamTag
      name: perl:5.20
    generation: 3
    importPolicy: {}
    name: latest
    referencePolicy:
      type: Source
status:
  dockerImageRepository: ""
~~~

Comment 1 Kenjiro Nakayama 2017-11-29 05:38:56 UTC
Created attachment 1360163 [details]
expected.png

Comment 3 Samuel Padgett 2017-11-29 15:59:45 UTC
(In reply to Samuel Padgett from comment #2)
> https://github.com/openshift/origin-web-catalog/pull/574

I've confirmed this is a bug in both 3.6 and 3.7 web console catalogs. A fix for current master is in the PR above. A workaround is to edit the image stream to reference just the tag instead of name:tag (as it looks like you've found).

Comment 4 Samuel Padgett 2017-12-01 18:53:21 UTC
3.7.z console PR:

https://github.com/openshift/origin-web-console/pull/2551

Comment 6 Yadan Pei 2017-12-06 06:24:54 UTC
Checked on v3.7.13


Now the ImageStream tagged with :latest are shown together with it's tag in format 
<tag> - latest

Move to VERIFIED

Comment 7 Yadan Pei 2017-12-06 06:41:38 UTC
Sorry, in create from template/app wizard, the alias shown correctly,
while in DeployImage wizard, the alias is still shown separately.

Change back to ON_QA to test when changes merged

Comment 8 Yadan Pei 2017-12-06 06:48:21 UTC
v3.7.13 doesn't include the changes yet, will check in next update

Comment 9 Samuel Padgett 2017-12-06 12:17:24 UTC
The deploy image wizard has always shown the tag aliases separately, and it's working as intended currently. We could change that in the future, but this bug is specifically to fix inconsistent handling of "name:tag" vs "tag" references for builders.

Comment 10 Yadan Pei 2017-12-08 02:48:51 UTC
Change to MODIFIED since fix not picked in OCP, and it couldn't be tested

Comment 15 Yanping Zhang 2018-03-01 08:47:49 UTC
Checked on OPC v3.7.35, we tested with imagestream perl under openshift namespace, no matter imagestream perl latest alias refer to "NAME:TAG" or "TAG", it always show TAG-latest on web console when create from imagestream perl.
---------------------
      openshift.io/display-name: Perl (Latest)
      openshift.io/provider-display-name: Red Hat, Inc.
      sampleRepo: https://github.com/openshift/dancer-ex.git
      supports: perl
      tags: builder,perl
    from:
      kind: ImageStreamTag
      name: perl:5.24
---------------------
      openshift.io/display-name: Perl (Latest)
      openshift.io/provider-display-name: Red Hat, Inc.
      sampleRepo: https://github.com/openshift/dancer-ex.git
      supports: perl
      tags: builder,perl
    from:
      kind: ImageStreamTag
      name: "5.24"
-------------------------
The bug has been fixed, so move it to Verified.

Comment 19 errata-xmlrpc 2018-04-05 09:32:08 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0636