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

`pdk validate` should not error on plans

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PDK 1.8.0
    • Component/s: None
    • Template:
    • Team:
      Puppet Developer Experience
    • Method Found:
      Needs Assessment
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      PDK now excludes the `plans` directory during validation.
    • QA Risk Assessment:
      Needs Assessment

      Description

      If a module contains plans, at present, pdk validate will error out with something like the following:

      [reidmv@halcyon:~/src/reidmv-pe_xl/] % pdk validate
      pdk (INFO): Running all available validators...
      pdk (INFO): Using Ruby 2.4.4
      pdk (INFO): Using Puppet 5.5.3
      [✔] Checking metadata syntax (metadata.json tasks/*.json).
      [✔] Checking module metadata style (metadata.json).
      [✔] Checking task metadata style (tasks/*.json).
      [✖] Checking Puppet manifest syntax (**/**.pp).
      [✖] Checking Ruby code style (**/**.rb).
      Error: puppet-syntax: plans/misc/divert_code_manager.pp:23:3: Could not parse for environment production: Syntax error at 'run_task'
      ...
      

      At present, to validate Puppet Task Plans manually, you would need to run puppet parser validate --tasks

      An example syntactically valid plan which PDK should not error on, should it be found at plans/foo.pp of a module called "mymodule":

      plan mymodule::foo {
        run_task('bar', 'target.example.vm')
      }
      

        Attachments

          Activity

            jsd-sla-details-panel

              People

              • Assignee:
                tim.sharpe Tim Sharpe
                Reporter:
                reid Reid Vandewiele
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: