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

delete: true - Does not delete file marked for deletion

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PDK 1.5.0
    • Component/s: None
    • Environment:

      pdk version: 1.4.1

    • Template:
    • Acceptance Criteria:
      Hide

      When marking a file for deletion it should be:

      • Reported in the convert_report.txt
      • Actually be deleted
      Show
      When marking a file for deletion it should be: Reported in the convert_report.txt Actually be deleted
    • Team:
      Puppet Developer Experience
    • Method Found:
      Needs Assessment
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      This ticket fixes a bug where PDK convert and PDK update were not honoring the `delete` key in the .sync.yml.
    • QA Risk Assessment:
      Needs Assessment

      Description

      When adding `delete: true` to the `.sync.yml` the file and running `pdk convert` the file is not deleted.

      Steps to reproduce
      --------------------------
      1) Ensure 'NOTICE' file exists within the module root directory
      2) Populate the `.sync.yml` file with NOTICE: delete: true (At the bottom I have included the specific `.sync.yml` file I have used
      3) Run `pdk convert' (with flag N)
      4) Confirm module has not been converted
      5) Inspect the convert_report.txt file
      6) Confirm the report does not mention NOTICE being removed
      7) Actually run the convert this time: `pdk convert` (with flag Y)
      8) Confirm `NOTICE` file still exists

      • Note I have also tried to delete metadata.json for testing purposes.

      Expected Results
      -----------------------
      I would expect the report to notify me that NOTICE file will be deleted, I would then also expected the NOTICE file to be deleted when I actually run the convert.

      Actual Results
      ---------------------
      The file marked for deletion is not mentioned in the convert_report.txt and then when actually running the convert, the file is not deleted.

      Example of .sync.yml I was used (for netdev_stdlib module):

      ---
      .travis.yml:
        bundle_args: --without system_tests
        docker_sets:
          - set: docker/centos-7
            options:
          - set: docker/ubuntu-14.04
            options:
        docker_defaults:
          bundler_args: ""
        secure: ""
        branches:
          - release
        extras:
          - env: CHECK=release_checks
            rvm: 2.1.9
       
      Gemfile:
        required:
          ':development':
            - gem: puppet-blacksmith
              version: '~> 3.4'
            - gem: 'rspec-puppet'
       
      NOTICE:
        delete: true
      

      The output convert_report.txt has been attached.

        Attachments

          Activity

            jsd-sla-details-panel

              People

              • Assignee:
                bryan.jen Bryan Jen
                Reporter:
                paula Paula Muir
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: