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

When a command is not specified on CLI a helpful error message is not raised

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: BOLT 1.19.0
    • Component/s: None
    • Labels:
    • Template:
    • Team:
      Bolt
    • Sprint:
      Bolt Kanban
    • Method Found:
      Needs Assessment
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Prints clear error message when no object is specified on the command line, i.e. `bolt command run --nodes foo`.
    • QA Risk Assessment:
      Needs Assessment

      Description

      There appear to be inconsistencies with how we handle messaging about missing arguments on the CLI. For

      {plan,task,script}

      run nothing is attempted to be run and a helpful error message is returned if the object is empty. Similarly for file upload, and appy. However in the case of command run it appear that we try to connect and run nothing.

      cas@cas-ThinkPad-T460p:~/working_dir/bolt/Boltdir$ bolt apply --rerun all
      a manifest file or --execute is required
      cas@cas-ThinkPad-T460p:~/working_dir/bolt/Boltdir$ bolt task run --rerun all
      Must specify a task to run
      cas@cas-ThinkPad-T460p:~/working_dir/bolt/Boltdir$ bolt script run  --rerun all
      A script must be specified
      cas@cas-ThinkPad-T460p:~/working_dir/bolt/Boltdir$ bolt plan run  --rerun all
      Must specify a plan to run
      cas@cas-ThinkPad-T460p:~/working_dir/bolt/Boltdir$ bolt file upload  --rerun all 
      A destination path must be specified
      cas@cas-ThinkPad-T460p:~/working_dir/bolt/Boltdir$ bolt command run --rerun all
      Started on localhost...
      Failed on localhost:
        undefined method `map' for nil:NilClass
      Started on 0.0.0.0...
      Failed on 0.0.0.0:
        undefined method `map' for nil:NilClass
      Started on foo...
      all authorization methods failed (tried none, publickey, password)
      Failed on foo:
        Authentication failed for user cas@foo
      Failed on 3 nodes: localhost,local://0.0.0.0,foo
      

      Also for my bash shell the colors appear to be different for the warnings. Specifically script run and file upload provide a red error while all others are uncolored. That might be my shell though...

        Attachments

          Activity

            jsd-sla-details-panel

              People

              • Assignee:
                lucy Lucy Wyman
                Reporter:
                cas.donoghue Cas Donoghue
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support