Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-9190

Puppet should ignore empty init.pp

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 5.5.7, PUP 6.0.3
    • Component/s: None
    • Labels:
      None
    • Template:
    • Team:
      Coremunity
    • Sprint:
      Platform Core KANBAN
    • Method Found:
      Needs Assessment
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Empty or comments only files will no longer emit a deprecation warning or error about illegal top level construct.
    • QA Risk Assessment:
      Needs Assessment

      Description

      Puppet6 will error if a module contains an empty init.pp. The module documentation says, "init.pp: Contains a class definition. The init.pp class, if used, is the main class of the module. This class's name must match the module's name."

      So the init.pp file is optional, but we don't specify whether the file can exist, but be empty or if it only contains a defined type.

      We discovered in MODULES-7854 that some people may have empty init.pp and puppet should be more lenient. For now, we removed the empty init.pp from the rspec-puppet's module fixtures.

      /cc Henrik Lindberg, Kris Bosland, Ben Ford, Charlie Sharpsteen, Eric Sorenson

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  kris.bosland Kris Bosland
                  Reporter:
                  josh Josh Cooper
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: