Bug 1658274 - [Container Admin] hammer docker manifest list never shows docker tag names
Summary: [Container Admin] hammer docker manifest list never shows docker tag names
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hammer - Content
Version: Unspecified
Hardware: Unspecified
OS: Unspecified
medium vote
Target Milestone: 6.5.0
Assignee: Partha Aji
QA Contact: Mirek Długosz
Depends On:
TreeView+ depends on / blocked
Reported: 2018-12-11 16:41 UTC by Mirek Długosz
Modified: 2019-11-05 22:41 UTC (History)
3 users (show)

Fixed In Version: tfm-rubygem-hammer_cli_foreman_docker-
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2019-05-14 12:39:33 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 25874 0 Normal Closed hammer docker manifest list never shows docker tag names 2021-01-18 11:58:46 UTC
Red Hat Product Errata RHSA-2019:1222 0 None None None 2019-05-14 12:39:39 UTC

Description Mirek Długosz 2018-12-11 16:41:16 UTC
`hammer docker manifest list` has "Tag name" column, but never shows anything in it.

It seems that hammer_cli_foreman_docker/lib/hammer_cli_foreman_docker/docker_manifest.rb file expects tag field with definition of single tag. Meanwhile, API returns "tags" field with array of tags data.

git log on katello/app/models/katello/docker_manifest.rb shows that model used to have `has_one :docker_tag`, but that was changed to `has_many` in late 2016. Marking as Regression since I assume it did work as advertised before that change.

Satellite 6.5 snap 7

Steps to reproduce:
1. `hammer product create --name="tags product" --organization-id=1`
2. `hammer repository create --content-type="docker" --docker-upstream-name="hello-world" --name="hello-world" --publish-via-http="true" --url="https://registry-1.docker.io" --product-id=7` # pass id of product created in step 1
3. `hammer repository synchronize --id=7` # pass id of repo crated in step 2
4. Run `curl -k 'https://localhost/katello/api/v2/docker_manifests?repository_id=7'` and verify that for some objects in results, there is "tags" field with name of tag
5. `hammer docker manifest list --repository-id 7` and verify if the same tag name is displayed in `Tag Name` column

Comment 4 Partha Aji 2019-01-17 02:24:02 UTC
Connecting redmine issue https://projects.theforeman.org/issues/25874 from this bug

Comment 5 Bryan Kearney 2019-01-18 17:08:06 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25874 has been resolved.

Comment 10 Mirek Długosz 2019-02-04 13:46:00 UTC
hammer docker manifest list can display tags associated with object.
Sample output (for nodejs repository with one tag synced):

$ hammer docker manifest list --repository-id 5
ID | SCHEMA VERSION | DIGEST                                                                  | TAGS  
50 | 1              | sha256:7d6b20ab71877d1feaba88a283b353355288d72cac8ae6d542775b3177c845b5 | latest
54 | 2              | sha256:f71e052c3d0a443c6a9107b99c0bb4bb3e753ffe2ed1c1514cbaa1f8a51c1ae8 |       
53 | 2              | sha256:a8238338d480992676dcac9ce4621b77a390e0cf75a25624d8e9f01ba2eaf8a4 |       
52 | 2              | sha256:4b5f2c7c42004cd46037ec9adfe30faf110a5aaa0b91443ff59076127a25b858 |       
51 | 2              | sha256:5ef8dfd8ee69cf5d301e9c46251eda98ffd8e750551c0e601039c2ea9e065b71 |       
49 | 2              | sha256:72559ad1c29e453c082e6abebf0118f09f42f141576aa69bdf32ed917f47a479 |       

Also noticed that sometimes the same tag is displayed multiple times. Seems to be somehow related to number of content view version copies laying around. I will investigate and create followup bug report for this.

Satellite 6.5 snap 14

Comment 13 errata-xmlrpc 2019-05-14 12:39:33 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.


Note You need to log in before you can comment on or make changes to this bug.