Bug 1278187 - pulp-puppet-module-builder - Errors if no modules with 'Modulefile' or no modules with 'metadata.json' exist in git repo. Will run puppet module build with no path appended.
Summary: pulp-puppet-module-builder - Errors if no modules with 'Modulefile' or no mod...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Pulp
Version: 6.1.3
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-04 21:34 UTC by Harald Jensås
Modified: 2021-04-06 18:01 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 20:02:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Pulp Redmine 1249 0 Normal CLOSED - CURRENTRELEASE pulp_module_builder fails when there are no 'ModuleFile' metadata files 2017-01-05 17:03:39 UTC

Description Harald Jensås 2015-11-04 21:34:47 UTC
Description of problem:
Git repository content:

  ls -l /var/tmp/puppet-modules/
  total 8
  drwxr-xr-x. 7 root root 4096 Nov  4 21:22 puppetlabs-stdlib
  -rw-r--r--. 1 root root   50 Nov  4 21:22 README.md

There is an error, because the "paths" list will contain an empty element after running find on 'Modulefile' puppet module build is called with an empty path.

pulp-puppet-module-builder --working-dir=/var/tmp/ --output-dir=/puppet-modules --url=https://puppet%40acceleris.ch:Changeme12@gitlab.kmu4u.ch/puppet/puppet-modules.git --branch=master --clean
rm -rf /var/tmp/puppet-modules.git
cd /var/tmp/
git clone --recursive https://puppet%40acceleris.ch:Changeme12@gitlab.kmu4u.ch/puppet/puppet-modules.git
cd puppet-modules
git status
git remote show -n origin
git fetch
git fetch --tags
git checkout master
git pull
find . -name Modulefile
find . -name metadata.json
Pahts: 
['', './puppetlabs-stdlib/metadata.json']
Modules: 
set(['', './puppetlabs-stdlib'])
puppet module build 
Error: Unable to find module root at /var/tmp/puppet-modules or parent directories
Error: Try 'puppet help module build' for usage


Version-Release number of selected component (if applicable):
pulp-puppet-tools-2.6.0.16-1.el7sat.noarch

How reproducible:
Every time.

Steps to Reproduce:
1. Create git repo
2. Add puppet modules with 'metadata.json'. Do not add modules with 'Modulefile'
3. Attempt to use pulp-puppet-module-builder to build all module in the repo.

Actual results:
pulp-puppet-module-builder --working-dir=/var/tmp/ --output-dir=/puppet-modules --url=https://puppet%40acceleris.ch:Changeme12@gitlab.kmu4u.ch/puppet/puppet-modules.git --branch=master --clean
rm -rf /var/tmp/puppet-modules.git
cd /var/tmp/
git clone --recursive https://puppet%40acceleris.ch:Changeme12@gitlab.kmu4u.ch/puppet/puppet-modules.git
cd puppet-modules
git status
git remote show -n origin
git fetch
git fetch --tags
git checkout master
git pull
find . -name Modulefile
find . -name metadata.json
Pahts: 
['', './puppetlabs-stdlib/metadata.json']
Modules: 
set(['', './puppetlabs-stdlib'])
puppet module build 
Error: Unable to find module root at /var/tmp/puppet-modules or parent directories
Error: Try 'puppet help module build' for usage

Expected results:
All puppet modules in the git repo should be built.

Additional info:
Can be fixed by removing empty entries from the list before iterating to execute 'puppet module build'.

https://github.com/pulp/pulp_puppet/pull/200

Comment 5 pulp-infra@redhat.com 2015-11-18 15:00:22 UTC
The Pulp upstream bug status is at NEW. Updating the external tracker on this bug.

Comment 6 pulp-infra@redhat.com 2015-11-18 15:00:25 UTC
The Pulp upstream bug priority is at Normal. Updating the external tracker on this bug.

Comment 7 Bryan Kearney 2016-07-08 20:39:37 UTC
Per 6.3 planning, moving out non acked bugs to the backlog

Comment 9 pulp-infra@redhat.com 2016-12-12 20:03:03 UTC
The Pulp upstream bug status is at ASSIGNED. Updating the external tracker on this bug.

Comment 10 pulp-infra@redhat.com 2016-12-13 17:41:31 UTC
The Pulp upstream bug status is at CLOSED - DUPLICATE. Updating the external tracker on this bug.

Comment 11 pulp-infra@redhat.com 2017-01-05 17:03:40 UTC
The Pulp upstream bug status is at CLOSED - CURRENTRELEASE. Updating the external tracker on this bug.

Comment 12 pulp-infra@redhat.com 2017-01-05 17:03:43 UTC
The Pulp upstream bug priority is at Normal. Updating the external tracker on this bug.

Comment 13 Bryan Kearney 2017-08-01 20:02:23 UTC
The fix to this bug will be delivered with release 6.3 of Satellite.


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