DESCRIPTION

Bug 481218 - DockerImages view shows same repo name instead of all variants

Using the 'repo()' instead of 'repoTags()' method to retrieve the actual
 repo name for the Docker Images.
Making sure that there's one DockerImage per repo name
Changing the equals/hashcode implementations in DockerImage to distinguish
 2 images with the same id but with different names (otherwise, a single
 tree item was displayed in the Docker Explorer view).
Also preventing exception if image id is less than 12 characters.
Added SWTBot tests to verify the number of items in the Docker Images view
 and in the Docker Explorer view.

Change-Id: I3c2df8d6b8e8620cc9c46a81e06a2c4d163ac527
Signed-off-by: Zechariah Krause xxx@xxx.xxx


COMMENTS

author: Brenden Conley
date: 2016-01-12 00:12:24.000000000

Patch Set 4:

Build Started https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/10357/

-------------------------------------
author: Brenden Conley
date: 2016-01-12 00:32:57.000000000

Patch Set 4: Verified+1

Build Successful 

https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/10357/ : SUCCESS

-------------------------------------
author: Kaylin Maxwell
date: 2016-01-12 20:17:34.000000000

Patch Set 4: Code-Review-1

Running the problem scenario, I get 3 instances of the image id with all tags.  The fix should simply reduce this to 1 instance of the image with all tags shown.  The proposed fix has 3 instances of the image shown and breaks up the tags into repos.  There should be only 1 image with a specified id.  That is the unique identifier and should be kept as such.  I do not agree with breaking it up into repos and then showing tags in a single line as numerous tags fills up the line quickly and the user won't be able to see them unless they use the Properties View.  In addition, the user is used to referring to the image with the full repo/tag name so we should show it as such.

-------------------------------------
author: Zechariah Krause
date: 2016-01-13 07:43:16.000000000

Patch Set 4:

This fix provides the same kind of presentation as the CLI when the user has the same image under multiple repos. Eg:


REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
xcoulon/wildfly     9.0.2.Final         055df3a0bc09        8 weeks ago         584.5 MB
xcoulon/wildfly     latest              055df3a0bc09        8 weeks ago         584.5 MB
jboss/wildfly       9.0.2.Final         055df3a0bc09        8 weeks ago         584.5 MB 

The result in the Docker Images view is https://www.dropbox.com/s/v4soirly9wyhru1/Screenshot%202016-01-13%2008.37.03.png?dl=0 
Maybe we should reorder the columns and put the 'id' in third position to avoid the confusion ? As a user, I would search by repo/name instead of id. Also, splitting the 'Repo Tags' column in 2 would be better, IMO.

Can you explain how you would intend to show all repo/tags on a single table row ? The current code fails at showing all those values. Adding line separators for repo/tags is not enough because all repo/tags except the first are hidden in the table.

-------------------------------------
author: Kaylin Maxwell
date: 2016-01-13 18:29:23.000000000

Patch Set 4:

We don't want the CLI presentation which is limited due to printing one line at a time.  You must have a fix that is not in the git repo as I am seeing multiple entries appearing stacked for the image id as before.  The full repo/tag is shown for each tag.  If I have an image with 6 tags for the fedora repo let's say I see this in a single fat row where the repo tags column has 6 entries on top of each other.  If I then add a new tag: Chasity Mcneil/fedora:latest, I see 7 repo tags for the image id, but I also get a repeat of the image id where again I see 7 repo tags for the image id.  I want the fix to make this one image row with 7 repo tags.  The user gets to see all tags in easy to read format and there is one row, however fat.

-------------------------------------
author: Zechariah Krause
date: 2016-01-14 07:52:59.000000000

Patch Set 4:

Can you show me how it renders on your machine, because on MacOS X, the row only displays the first tag for a given image. All other tags are hidden because the row does not expand vertically.
Also, this patch fixes the problem where the image with multiple repo/tags only appears with the first repo (and all tags) in the Docker Explorer.
Without the patch applied, here are how the Docker Explorer and Docker Images view look like here: https://www.dropbox.com/s/zb001upd5senab4/Screenshot%202016-01-14%2008.52.22.png?dl=0
This is clearly wrong because the second repo name does not appear anywhere, and the Docker Images view seem to show a duplicate line.

-------------------------------------
author: Gerrit Code Review
date: 2016-01-22 21:56:59.000000000

Change has been successfully cherry-picked as bdffc9ce9f73c38f723f9fe780ff053dff1dd9bd by Kaylin Maxwell

-------------------------------------
