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

comma-separated list of validators only accepts one validator on windows

    Details

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

      windows 10

      ruby --version
      ruby 2.4.3p205 (2017-12-14 revision 61247) [x64-mingw32]

    • Template:
    • Method Found:
      Needs Assessment
    • Release Notes:
      Known Issue
    • Release Notes Summary:
      Updated `pdk validate --help` output to note the need to enclose the list of validators in single quotes when running with PowerShell e.g. `pdk validate 'puppet,metadata'`.
    • QA Risk Assessment:
      Needs Assessment

      Description

      Summary
      On linux, I can run a subset of pdk validators, like this:

      geoff@computer:~/vagrant_labs/win10/noodle$ pdk validate metadata,puppet
      

      On windows, the same command gives several File does not exist errors

      Expected
      Expect to be able to run identical PDK command on windows and linux and have same tests performed

      Actual
      On Linux, you can specify multiple validators to run as a comma delimited list. On windows, you can only run validators individually, eg:

      pdk validate metadata
      pdk validate puppet
      

      works, but

      pdk validate metadata,puppet
      

      Gives error:

      PS C:\Users\vagrant\royalewithcheese> pdk validate metadata,puppet
      pdk (INFO): Running all available validators...
      pdk (INFO): Using Ruby 2.4.4
      pdk (INFO): Using Puppet 5.5.3
      error: metadata-syntax: metadata puppet: File does not exist.
      error: metadata-json-lint: metadata puppet: File does not exist.
      error: task-metadata-lint: metadata puppet: File does not exist.
      error: puppet-syntax: metadata puppet: File does not exist.
      error: puppet-lint: metadata puppet: File does not exist.
      error: rubocop: metadata puppet: File does not exist.
      

      Validating on linux

      geoff@computer:~/vagrant_labs/win10/noodle$ pdk validate metadata,puppet
      pdk (INFO): Using Ruby 2.4.4
      pdk (INFO): Using Puppet 5.5.6
      [✔] Checking metadata syntax (metadata.json tasks/*.json).
      [✔] Checking module metadata style (metadata.json).
      info: task-metadata-lint: ./: Target does not contain any files to validate (tasks/*.json).
      info: puppet-syntax: ./: Target does not contain any files to validate (**/**.pp).
      info: puppet-lint: ./: Target does not contain any files to validate (**/*.pp).
      

      Validating on windows

      Workaround
      Call each validator individually but this means longer execution times since each `pdk` command needs to load ruby environment

        Attachments

          Activity

            jsd-sla-details-panel

              People

              • Assignee:
                tim.sharpe Tim Sharpe
                Reporter:
                geoff@declarativesystems.com Geoff Williams
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: