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

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 5.5.7, PUP 6.0.0
    • Component/s: None
    • Labels:
    • Template:
    • Epic Link:
    • Team:
      Platform Core
    • Sub-team:
    • Sprint:
      Platform Core KANBAN, Tasks Kanban
    • CS Priority:
      Major
    • CS Frequency:
      3 - 25-50% of Customers
    • CS Severity:
      4 - Major
    • CS Business Value:
      4 - $$$$$
    • CS Impact:
      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.
    • Release Notes:
      New Feature
    • Release Notes Summary:
      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.
    • QA Risk Assessment:
      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

              jsd-sla-details-panel

                People

                • Assignee:
                  josh Josh Cooper
                  Reporter:
                  nick.walker Nick Walker
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  21 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: