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

Indirection symbol name inappropriately compared to string

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • PUP 4.4.1
    • PUP 4.4.2
    • None
    • None
    • Not Needed
    • Internal change that removes one deprecation warning for symbol vs string comparison.

    Description

      When I startup Puppet under Puppet Server, I've noticed messages like this one:

      2016-03-29 08:44:49,364 WARN  [clojure-agent-send-pool-7] [puppet-server] Puppet Comparing Symbols to non-Symbol values is deprecated
         (file & line not available)
      

      Tracing the source of the message, it appears to be happening, at least in one case, due to this comparison:

      https://github.com/puppetlabs/puppet/blob/master/lib/puppet/indirector/terminus.rb#L73

      In this case, the previous line does a .intern call to produce the indirection_name. Since the result would produce a symbol, it seems like the comparison above should only compare for an empty symbol - maybe something like...

      if indirection_name == :""
        raise Puppet::DevError, "Could not discern indirection model from class constant"
      end
      

      Attachments

        Issue Links

          Activity

            People

              qa qa
              jeremy.barlow Jeremy Barlow
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support