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

tagged function should downcase arguments

    XMLWordPrintable

    Details

    • Template:
      PUP Bug Template
    • Team:
      Coremunity
    • Sprint:
      Platform Core KANBAN
    • Method Found:
      Needs Assessment
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      The "tagged" function will now return true if the string case-insensitively matches a resource or catalog tag. Previously, the function was case sensitive.
    • QA Risk Assessment:
      Needs Assessment

      Description

      Puppet Version: 5.5.3
      Puppet Server Version: 5.3.4
      OS Name/Version: Ubuntu 18.04.1 LTS (Bionic Beaver)

      As Puppet always makes resource tags downcased and the same thing is doing PuppetDB while querying (https://github.com/puppetlabs/puppetdb/pull/260), tagged function should probably do the same.

      Desired Behavior:

      Following code should notify 'true':

       

      # cat test.pp 
      class foo { }
      include foo
      if tagged("Class") {
      	notify { 'true': }
      } else {
      	notify { 'false': }
      }
      # puppet apply -t test.pp
      Info: Loading facts
      Info: Loading facts
      Info: Loading facts
      Info: Loading facts
      Info: Loading facts
      Info: Loading facts
      Info: Loading facts
      Info: Loading facts
      Info: Loading facts
      Info: Loading facts
      Info: Loading facts
      Info: Loading facts
      Info: Loading facts
      Info: Loading facts
      Notice: Compiled catalog for local.local in environment production in 0.06 seconds
      Info: Applying configuration version '87c2c0fd052b62985e08e77716d9ee223c690c3d'
      Notice: false
      Notice: /Stage[main]/Main/Notify[false]/message: defined 'message' as 'false'
      Notice: Applied catalog in 0.87 seconds
      

       

      Actual Behavior:

      Mentioned code returns Notify[false], which is incorrect.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support