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

Puppet 4.x functions should be available to all modules not just those that declare the containing module as a dependency

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • None
    • PUP 5.5.7, PUP 6.0.0
    • None
    • Platform Core
    • Platform Core KANBAN, Tasks Kanban
    • Major
    • 3 - 25-50% of Customers
    • 4 - Major
    • 4 - $$$$$
    • Hide
      Users writing modules can run into this and end up thrashing around trying to understand why it's not working. Anything that makes writing modules more accessible/less confusing to users is a good thing.

      Given that the initial attempts at this included a significant performance impact, perhaps there is a middle ground of having a flag that tells puppet whether to rely on the dependencies entry in metadata.json or instead go for "slow mode", perhaps as a new metadata.json entry, where it scans the environment for functions.
      Show
      Users writing modules can run into this and end up thrashing around trying to understand why it's not working. Anything that makes writing modules more accessible/less confusing to users is a good thing. Given that the initial attempts at this included a significant performance impact, perhaps there is a middle ground of having a flag that tells puppet whether to rely on the dependencies entry in metadata.json or instead go for "slow mode", perhaps as a new metadata.json entry, where it scans the environment for functions.
    • 32385
    • 1
    • New Feature
    • It is no longer required to have a dependency listed in a module's metadata.json on another module (b) in order to use functions or data types from module b.
    • Automate

    Description

      The Problem

      See PUP-6952 and PUP-6953 for backgound but essentially, puppet can't find puppet 4.x functions in other modules unless they are declared as a dependency of the module trying to use the function.

      OR if the module just doesn't declare any dependencies.

      The Change

      The behavior of finding functions should not be dependent on the modules dependencies as defined in metadata.json for the module.

      We should search the entire modulepath for a function and not just in the declared dependencies.

      We can retain some of the optimization by searching in declared dependencies first and then if not found extend the search to all modules. This makes the optimization opt-in and not required.

      Attachments

        Issue Links

          Activity

            People

              josh Josh Cooper
              nick.walker Nick Walker
              Votes:
              0 Vote for this issue
              Watchers:
              22 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support