Project

General

Profile

Actions

Bug #9131

closed

Composite content view publish puppet module by specified version (uuid) not working

Added by Justin Sherrill about 9 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Web UI
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1186353
Description of problem:
The code to publish a content view uses “uuid”, if not available it falls back to latest version:

def computed_module_ids_by_repoid
  # In order to copy the puppet modules to the new repo, we need to retrieve the module
  # details.  This is necessary since pulp requires both a source and destination
  # repo id to copy content.
ids = []
names_and_authors = []
puppet_modules_to_publish.each do |cvpm|
if cvpm.uuid
ids << cvpm.uuid
else
names_and_authors << { :name => cvpm.name, :author => cvpm.author }
end
end
puppet_modules = ids.blank? ? [] : PuppetModule.id_search(ids)
unless names_and_authors.blank?
puppet_modules << PuppetModule.latest_modules_search(names_and_authors,
self.organization.library.repositories.puppet_type.map(&:pulp_id))
end

The code to retrieve the list of puppet modules to publish is from this method that makes a difference between composite and not. For the composite it uses the details from a composite view version:

def puppet_modules_to_publish
if composite?
components.flat_map { |version| version.puppet_modules }
else
content_view_puppet_modules
end
end

Composite content view version returns the following details, and those do not include the uuid that is used in computed_module_ids_by_repoid:

curl -K /opt/hoici/etc/sat6/curl-hoici.conf "-HContent-Type: application/json" "-d{\"per_page\":9999}" -XGET https://localhost/katello/api/v2/content_views/41 | hoi-json - --get ALL | egrep 'puppet_modules'
components.0.puppet_modules.0.author=puppetlabs
components.0.puppet_modules.0.id=dc4e90b4-490b-4974-8fd6-4d4fc4a8a161
components.0.puppet_modules.0.name=stdlib
components.0.puppet_modules.0.version=4.3.2

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

How reproducible:

Steps to Reproduce:
1.
2.
3.

Actual results:
Composite content views always have the latest available puppet module versions included instead of the specified version

Expected results:
The specified puppet module version is used in the composite content view

Additional info:

Actions #1

Updated by The Foreman Bot about 9 years ago

  • Status changed from New to Ready For Testing
  • Target version set to 66
  • Pull request https://github.com/Katello/katello/pull/4960 added
  • Pull request deleted ()
Actions #2

Updated by Eric Helms about 9 years ago

  • translation missing: en.field_release set to 23
Actions #3

Updated by Eric Helms about 9 years ago

  • Triaged changed from No to Yes
Actions #4

Updated by Justin Sherrill about 9 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF