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

Remove TypeSetType from RichData

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Normal
    • Resolution: Won't Do
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Template:
    • QA Risk Assessment:
      Needs Assessment

      Description

      The PTypeSetType class defines a namespace for a set of PCore types. Internally puppet uses PTypeSetType when registering all of the AST model classes. See
      Puppet::Pops::Mode.register_pcore_types. At one point we considered serializing type information, for example the catalog could contain rich data and the type information needed by the receiver to deserialize. However, the type information was too verbose. So when serializing, we just send the type names, e.g. Sensitive, and assume the receiver knows how to deserialize.

      Commit 0a195ef6d6 defined RichData as:

              Variant[Scalar,SemVerRange,Binary,Sensitive,Type,TypeSet,Undef,Hash[RichDataKey,RichData],Array[RichData]]
      

      The TypeSet above refers to the PTypeSetType class. The commit also changed the lookup DataProvider to accept all RichData. However, lookup also validates that the data it receives from the data provider contains only RichData. As a result, puppet could perform full type interference on the entire hash. That was optimized in PUP-10628, but it's based on a heuristic, detecting if the pcore_version key exists. There's no reason currently to include TypeSet in RichData, so we should remove that to avoid performance issues.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              josh Josh Cooper
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support