Uploaded image for project: 'Puppet Task Runner'
  1. Puppet Task Runner
  2. BOLT-1057

BoltSpec::Run functions accept options inconsistently

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: BOLT 1.12.0
    • Component/s: None
    • Labels:
    • Template:
    • Epic Link:
    • Sprint:
      Bolt Kanban
    • Method Found:
      Needs Assessment
    • Release Notes:
      Enhancement
    • Release Notes Summary:
      This is a breaking change to the experimental {{BoltSpec::Run}} API. All helpers now require the {{params}} or {{arguments}} argument to be passed.
    • QA Risk Assessment:
      Needs Assessment

      Description

      Some of the boltspec run functions have arguments with defaults while others have options. We should standardize on one method.

      Whoever pulls the ticket try to optimize experience here.
      Maybe require more arguments and consolidate key-word arguments into a single options hash. Specifically if there is a params hash or arguments array then require those always. Everything else belongs in options hash.

      Special notes about run_script: https://github.com/puppetlabs/bolt/blob/9427286edf5f69c9d7bb2a041be29515ab8633c1/lib/bolt_spec/run.rb#L43
      `arguments` array is required, options hash is a keyword argument. That way you can pass the options hash without it being interpreted as the keyword arguments.

      run_script(script, targets, arguments, options: {}, config: nil, inventory: nil)
      

      Finally, whoever makes PR, mention it in slack bc it will affect people.

        Attachments

          Activity

            jsd-sla-details-panel

              People

              • Assignee:
                nick Nick Lewis
                Reporter:
                alex Alex Dreyer
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: