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

PCore generation omits information about capability types

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 4.8.0
    • Component/s: None
    • Labels:
      None
    • Template:
    • Team:
      Puppet Developer Experience
    • Story Points:
      2
    • Sprint:
      PDS 2016-10-05
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      The opt in feature 'puppet generate types' did not generate the correct information for capability resources used in application orchestration which caused environment catalog compilation for orchestration to fail.

      Description

      Given a capability resource type definition:

      Puppet::Type.newtype :cap, :is_capability => true do
        newparam :name, :is_namevar => true
        newparam :value
      end
      

      the generated PCore looks something like:

      # This file was automatically generated on 2016-09-19 13:38:35 -0700.
      # Use the 'puppet generate types' command to regenerate this file.
       
      Puppet::Resource::ResourceType3.new(
        'cap',
        [
       
        ],
        [
          Puppet::Resource::Param(Any, 'name'),
       
          Puppet::Resource::Param(Any, 'value')
        ],
        {
          /(.*)/ => ['name']
        },
        true)
      

      The PCore version has lost the :is_capability => true flag, causing the resource type to behave like any other type. Since there's special handling of capabilities with regard to how/when they're validated and looked up from PuppetDB, this effectively breaks the app management features when using puppet generate.

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  nick Nick Lewis
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  8 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: