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

"Array" settings get misleading formatting for default values and error reporting

    XMLWordPrintable

Details

    • Coremunity
    • Platform Core KANBAN
    • Bug Fix
    • Hide
      Now prints a meaningful error message if the "disable_warnings" setting is specified incorrectly: "Cannot disable unrecognized warning types 'foo'. Valid values are 'deprecations, undefined_variables, undefined_resources'."
      Show
      Now prints a meaningful error message if the "disable_warnings" setting is specified incorrectly: "Cannot disable unrecognized warning types 'foo'. Valid values are 'deprecations, undefined_variables, undefined_resources'."

    Description

      From the user's perspective, the new ":array" settings type is just a comma separated list, like we use in existing settings like dns_alt_names or tags. But the default values and error reporting for the disable_warnings setting aren't formatted with this in mind, and are presented in a confusing fashion:

      Error: Could not initialize global default settings: Cannot disable unrecognized warning types ["stuff"]. Valid values are ["deprecations"].
      

      See also the config reference, which shows the default value as "[]". (http://docs.puppetlabs.com/references/latest/configuration.html#disablewarnings)

      If you try to follow these hints and give a value like [deprecations], you get:

      Error: Could not initialize global default settings: Cannot disable unrecognized warning types ["[deprecations"]"]. Valid values are ["deprecations"].
      

      Boo. The UI is a comma-separated list without brackets, so any error or information reporting should present that same UI.

      Attachments

        Activity

          People

            josh Josh Cooper
            nick.fagerlund Nicholas Fagerlund
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support