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

lookup cli --unpack-arrays broken

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: PUP 4.3.2
    • Fix Version/s: PUP 4.4.1, PUP 4.5.0
    • Component/s: None
    • Labels:
      None
    • Environment:

      centos 7 + puppet-agent 1.3.5

    • Template:
    • Epic Link:
    • Story Points:
      1
    • Sprint:
      Language 2016-03-23
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Hide
      The lookup command line tool did not handle the --unpack-arrays option the correct way and this option did not work at all because of this. There were also other minor problems with the documentation that are now fixed.

      NOTE: The --unpack-arrays option has strange behaviour even if it now "works" and this experimental feature will be removed in the next maintenance release.
      Show
      The lookup command line tool did not handle the --unpack-arrays option the correct way and this option did not work at all because of this. There were also other minor problems with the documentation that are now fixed. NOTE: The --unpack-arrays option has strange behaviour even if it now "works" and this experimental feature will be removed in the next maintenance release.

      Description

      unpack-arrays should take an argument, but the code has:

        option('--unpack-arrays') do |arg|
          options[:unpack_arrays] = arg
        end
      

      so it doesn't actually take it, should be:

        option('--unpack-arrays DELIMITER') do |arg|
          options[:unpack_arrays] = arg
        end
      

      Additionally even with that fixed the options are not correctly merged into the options hash it constructs.

      https://github.com/puppetlabs/puppet/blob/9849572b805a1cf3cada6b9b0c94f7699c780888/lib/puppet/application/lookup.rb#L275 and https://github.com/puppetlabs/puppet/blob/9849572b805a1cf3cada6b9b0c94f7699c780888/lib/puppet/application/lookup.rb#L279 should use merge! and not merge. Additionally the key for knockout prefix is "knockout_prefix" not "prefix"

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  ripienaar R.I.Pienaar
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  7 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: