Project

General

Profile

Bug #25143

composite_content_view_ids field of a content_view_version is always empty

Added by Andrew Kofink about 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
High
Assignee:
Category:
Content Views
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1553105

Description of problem:

Assume the following setup:
Composite Content View "Capsule 6.3 with RHEL7 Server" with
  • Content View "RHEL7"
  • Content View "Tools 6.3 RHEL7"
  • Content View "Capsule 6.3 RHEL7"

For some housekeeping, I'd like to remove old versions of "RHEL7" and "Capsule 6.3 RHEL7", which are not used by the CCV anymore.

To do so, I'd request all versions of said CVs (/katello/api/content_views/:content_view_id/content_view_versions) and delete all that have an empty composite_content_view_ids, assuming the version is not used by any CCV.

The field is also empty when looking at a specific version via /katello/api/content_view_versions/:content_view_version_id.

This worked fine in 6.2.z, but fails in 6.3.0, as composite_content_view_ids is always [].

hammer shows the info correctly:
  1. hammer content-view info --name "Capsule 6.3 with RHEL7 Server" --organization Sat6-CI
    ID: 54
    Name: Capsule 6.3 with RHEL7 Server
    Label: Capsule_6_3_with_RHEL7_Server
    Composite: true
    Description:
    Content Host Count: 0
    Organization: Sat6-CI
    Yum Repositories:

    Docker Repositories:

OSTree Repositories:

Puppet Modules:

Lifecycle Environments:
1) ID: 2
Name: Library
Versions:

Components:
1) ID: 4365
Name: Capsule 6.3 RHEL7 248.0
2) ID: 4362
Name: Tools 6.3 RHEL7 247.0
3) ID: 4297
Name: RHEL7 18.0

And so does the API at /katello/api/content_views/:content_view_id in the "components" field.

Version-Release number of selected component (if applicable):
satellite-6.3.0-23.0.el7sat.noarch

How reproducible:
100%

Steps to Reproduce:
1. create (and publish) a CV
2. create (and publish) a CCV that includes the CV from step 1
3. fetch /katello/api/content_views/:content_view_id/content_view_versions for the CV

Actual results:
composite_content_view_ids is empty

Expected results:
composite_content_view_ids shows that it's used in CCV

Additional info:


Related issues

Has duplicate Katello - Bug #23458: content_view_versions is not showing correct data for composite_content_view_idClosed2018-04-30

Associated revisions

Revision cd99f28a (diff)
Added by Andrew Kofink about 1 year ago

Fixes #25143: properly show composite ids in API

- Add fields published_in_composite_content_view_ids and
published_in_composite_content_views to show composite CVs that
a version is published in.
- Add composite_content_view_versions to the API output
- Rename 'katello_content_views' to 'composite_content_views'

History

#1 Updated by The Foreman Bot about 1 year ago

  • Assignee set to Andrew Kofink
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/7740 added

#2 Updated by Andrew Kofink about 1 year ago

  • Has duplicate Bug #23458: content_view_versions is not showing correct data for composite_content_view_id added

#3 Updated by Justin Sherrill about 1 year ago

  • Target version set to Katello 3.9.0
  • Subject changed from composite_content_view_ids field of a content_view_version is always empty to composite_content_view_ids field of a content_view_version is always empty
  • Fixed in Releases Katello 3.9.0 added

#4 Updated by Justin Sherrill about 1 year ago

  • Triaged changed from No to Yes

#5 Updated by Andrew Kofink about 1 year ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF