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

common.yaml in the PDK templates causes warnings in Puppet Server logs

    XMLWordPrintable

    Details

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

      PDK: 1.14.0 +
      OS: N/A

    • Template:
    • Team:
      Puppet Developer Experience
    • Method Found:
      Needs Assessment
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Fix issue where invalid Hiera `common.yaml` was being created when running `pdk new module` or `pdk convert`.
    • QA Risk Assessment:
      Needs Assessment

      Description

      When running a pdk new module or pdk convert the current pdk-template adds in a hiera.yaml and common.yaml

      Unfortunately the default common.yaml is not valid as far as Hiera is concerned and logs warnings every puppet run.

      [Warning: .../modules/aide/data/common.yaml: file does not contain a valid yaml hash}
      

      Also some community members have complained that after doing a conversion/module init that they have to go through and remove these files that they never need. This is probably fine once, but after converting 10s of modules it becomes a tiresome chore.

      This ticket will track to work to answer some questions and implement:

      • How can we make the Hiera information an opt in during convert/init ?
      • We should make sure that the hiera YAMl that we generate should not cause warnings.
      • Should we add to the YAML linter a check for YAML files that would throw warnings in Puppet Server. Specifically

      https://github.com/puppetlabs/puppet/blob/master/lib/puppet/functions/eyaml_lookup_key.rb#L48-L58

      https://github.com/puppetlabs/puppet/blob/b3dea6ec6b3c07f14427321f01053f2b2ac0a227/lib/puppet/functions/yaml_data.rb#L24-L33

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              glenn.sarti Glenn Sarti
              Reporter:
              glenn.sarti Glenn Sarti
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support