Project

Profile

Help

Issue #1853

closed

pulp-puppet-module-builder should not overwrite existing module files

Added by mhrivnak almost 8 years ago. Updated about 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Low
Assignee:
Start date:
Due date:
Estimated time:
Severity:
1. Low
Version:
2.6.0
Platform Release:
2.11.1
OS:
RHEL 7
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Sprint 13
Quarter:

Description

From the downstream report:

Issue:
pulp-puppet-module-builder will overwrite existing module files in my --output-dir.  

There is no option to disable this behaviour or emit a warning when it happens. 

Steps to Reproduce:

1. mkdir -p /tmp/example-output
2. cd /tmp/
3. puppet module generate support-example
  take the default responses to all questions
4. cd /tmp/support-example
5. pulp-puppet-module-builder --output-dir=/tmp/example-output
6. sha1sum /tmp/example-output/support-example-0.1.0.tar.gz
Alter the content of /tmp/support-example/manifests/init.pp in some valid way
7. cd /tmp/support-example
8. pulp-puppet-module-builder --output-dir=/tmp/example-output
9. sha1sum /tmp/example-output/support-example-0.1.0.tar.gz

Actual results:
The content of /tmp/example-output/support-example-0.1.0.tar.gz from Step 5 was replaced by Step 8 but no notice was provided.

Expected results:
It would be helpful if there was notice provided and a switch added to prevent overwriting existing module files.

We may need some discussion to decide what the right behavior is.

Actions #1

Updated by mhrivnak almost 8 years ago

  • Priority changed from Normal to Low
  • Severity changed from 2. Medium to 1. Low
  • Triaged changed from No to Yes
Actions #2

Updated by bmbouter over 7 years ago

If the resolution to this is to add an option, someone please notify katello.

Actions #3

Updated by ipanova@redhat.com over 7 years ago

  • Sprint/Milestone set to 31
Actions #4

Updated by daviddavis over 7 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to daviddavis
Actions #5

Updated by daviddavis over 7 years ago

  • Status changed from ASSIGNED to POST

Added by daviddavis over 7 years ago

Revision 96945c87 | View on GitHub

Don't ovewrite modules unless force flag is passed

By default, no longer overwriting modules in the output dir. Also, added a force flag which can override this behavior.

fixes #1853 https://pulp.plan.io/issues/1853

Actions #6

Updated by daviddavis over 7 years ago

  • Status changed from POST to MODIFIED
Actions #7

Updated by semyers over 7 years ago

  • Platform Release set to 2.11.1
Actions #8

Updated by semyers over 7 years ago

  • Status changed from MODIFIED to 5
Actions #9

Updated by pthomas@redhat.com over 7 years ago

  • Status changed from 5 to 6

verified

[root@qe-blade-05 support-example]# rpm -qa pulp-puppet-tools
pulp-puppet-tools-2.11.1-0.1.beta.el7.noarch
[root@qe-blade-05 support-example]#

[root@qe-blade-05 support-example]# pulp-puppet-module-builder --output-dir=/tmp/example-output
cd /tmp/support-example
git status
find . -name Modulefile -o -name metadata.json
puppet module build .
mkdir -p /tmp/example-output
Skipping support-example-0.1.0.tar.gz as the file exists
cd /tmp/example-output
cd /tmp/support-example
cd /tmp/support-example
[root@qe-blade-05 support-example]# ls -l /tmp/example-output/
total 8
-rw-r--r-- 1 root root   99 Jan 13 15:00 PULP_MANIFEST
-rw-r--r-- 1 root root 3490 Jan 13 14:49 support-example-0.1.0.tar.gz
[root@qe-blade-05 support-example]#
[root@qe-blade-05 support-example]#
[root@qe-blade-05 support-example]# sha1sum /tmp/example-output/support-example-0.1.0.tar.gz
bb934cfd2fd17a3d03beafd1846379baf1a4cabf  /tmp/example-output/support-example-0.1.0.tar.gz
[root@qe-blade-05 support-example]#
[root@qe-blade-05 support-example]#
[root@qe-blade-05 support-example]# pulp-puppet-module-builder --output-dir=/tmp/example-output -f
cd /tmp/support-example
git status
find . -name Modulefile -o -name metadata.json
puppet module build .
mkdir -p /tmp/example-output
cp ./pkg/support-example-0.1.0.tar.gz /tmp/example-output
cd /tmp/example-output
cd /tmp/support-example
cd /tmp/support-example
[root@qe-blade-05 support-example]#
[root@qe-blade-05 support-example]#
[root@qe-blade-05 support-example]#
[root@qe-blade-05 support-example]# ls -l /tmp/example-output/
total 8
-rw-r--r-- 1 root root   99 Jan 13 15:01 PULP_MANIFEST
-rw-r--r-- 1 root root 3497 Jan 13 15:01 support-example-0.1.0.tar.gz
[root@qe-blade-05 support-example]# sha1sum /tmp/example-output/support-example-0.1.0.tar.gz
e330d939af48408bfd6c02e9fc2aebc240748856  /tmp/example-output/support-example-0.1.0.tar.gz
[root@qe-blade-05 support-example]#
Actions #10

Updated by semyers over 7 years ago

  • Status changed from 6 to CLOSED - CURRENTRELEASE
Actions #12

Updated by bmbouter about 6 years ago

  • Sprint set to Sprint 13
Actions #13

Updated by bmbouter about 6 years ago

  • Sprint/Milestone deleted (31)
Actions #14

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF