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

New Puppet functions and type aliases are searched only in direct dependencies

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Do
    • Affects Version/s: PUP 4.9.0
    • Fix Version/s: None
    • Component/s: Language
    • Labels:
      None
    • Template:
    • Acceptance Criteria:
      Hide

      Puppet search should rely on actually available modules, but not on metadata.json of the calling/using module.

      If the change is not accepted then at least a clear documentation warning and/or error message hint is required.

      Show
      Puppet search should rely on actually available modules, but not on metadata.json of the calling/using module. If the change is not accepted then at least a clear documentation warning and/or error message hint is required.
    • Team:
      Puppet Developer Experience
    • QA Risk Assessment:
      Needs Assessment

      Description

      This is not critical, but absolutely not intuitively understandable compared to legacy "parser" functions.

      1. create moduleA and define new-style Ruby functions under

      {module}/lib/puppet/functions/{module_name} and/or PP type aliases under {module}

      /types
      Example: moduleA::some_func, moduleA::Sometype
      2. create moduleB -> metadata.json depends on moduleA
      3. create moduleC -> metadata.json depends on moduleB
      4. Call moduleA::some_func or use moduleA::Sometype from moduleC
      5. Observe very not intuitive failure of unknown function/resource type
      6. add moduleC metadata.json dependency on moduleA
      7. everything works

      The behavior is not consistent with search manifests/ or legacy "parser" functions.

      Rational: sometimes, a larger functionality can be split into many modules released together. In this case, it's much easier to control "sub-modules" dependency versions in one place (main module) and refer only to that "main" module in other not directly related modules.

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  andvgal Andrey Galkin
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: