Uploaded image for project: 'Puppet Development Kit'
  1. Puppet Development Kit
  2. PDK-972

Marking a template file as `delete: true` causes `pdk update` to always emit a change report

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PDK 1.8.0
    • Component/s: None
    • Template:
    • Method Found:
      Needs Assessment
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      PDK no longer generates a false "file removed" event when {{pdk update}} tries to remove a file that does not exist.
    • QA Risk Assessment:
      Needs Assessment

      Description

      When running pdk update on a module with appveyor.yml: delete: true in the .sync.yml, the file is always reported as "to be removed":

      david@davids:~/tmp/blubb3$ cat .sync.yml 
      ---
      appveyor.yml:
              delete: true
       
      david@davids:~/tmp/blubb3$ ls appveyor.yml
      ls: cannot access 'appveyor.yml': No such file or directory
      david@davids:~/tmp/blubb3$ pdk update  --force
      pdk (INFO): Updating puppetlabs-blubb3 using the default template, from remotes/origin/master to master@d2a9165
       
      -----------Files to be removed----------
      appveyor.yml
       
      ----------------------------------------
       
      ------------Update completed------------
       
      1 files removed.
       
      david@davids:~/tmp/blubb3$ 
      

      When the file does not exist, no changes should be reported.

      Originally reported in https://github.com/puppetlabs/pdk/issues/444#issuecomment-386187818

        Attachments

          Activity

            jsd-sla-details-panel

              People

              • Assignee:
                tim.sharpe Tim Sharpe
                Reporter:
                david.schmitt David Schmitt
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: