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

Default resource parameters are not stored in PuppetDB - not usable in collector

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Won't Do
    • Affects Version/s: PUP 4.3.2
    • Fix Version/s: None
    • Component/s: Language
    • Labels:
      None
    • Template:
    • Epic Link:
    • Team:
      Puppet Developer Experience

      Description

      It seems PUP-1045 is not directly related, not sure.

      Apply the following code:

      define test_exported_resource (
          $required_param,
          $default_param = 'default'
      ) {}
       
      @@test_exported_resource{ 'test_implicit':
          required_param => 'required',
      }
       
      @@test_exported_resource{ 'test_explicit':
          required_param => 'required',
          default_param  => 'default',
      }
      

      Go to DB:

      puppetdb=# SELECT title, name, value FROM catalog_resources JOIN resource_params USING (resource) WHERE type = 'Test_exported_resource';
           title     |      name      |   value    
      ---------------+----------------+------------
       test_implicit | required_param | "required"
       test_explicit | required_param | "required"
       test_explicit | default_param  | "default"
      (3 rows)
      

      Expected result:
      test_implicit must also export the default_param = 'default'.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              henrik.lindberg Henrik Lindberg
              Reporter:
              andvgal Andrey Galkin
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support