Jira (BOLT-260) Should be easier to pass typed data on CLI

2018-03-21 Thread Kate Lopresti (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Kate Lopresti updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet Task Runner /  BOLT-260  
 
 
  Should be easier to pass typed data on CLI   
 

  
 
 
 
 

 
Change By: 
 Kate Lopresti  
 
 
Labels: 
 docs-reviewed feature  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (BOLT-260) Should be easier to pass typed data on CLI

2018-03-21 Thread Kate Lopresti (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Kate Lopresti commented on  BOLT-260  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Should be easier to pass typed data on CLI   
 

  
 
 
 
 

 
 Added to release notes:  http://docs-preview.webteam.puppet.com/docs/bolt/dev/new_features.html    
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (BOLT-260) Should be easier to pass typed data on CLI

2018-03-20 Thread Alex Dreyer (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alex Dreyer updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet Task Runner /  BOLT-260  
 
 
  Should be easier to pass typed data on CLI   
 

  
 
 
 
 

 
Change By: 
 Alex Dreyer  
 
 
Fix Version/s: 
 BOLT 0.18.0  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (BOLT-260) Should be easier to pass typed data on CLI

2018-03-20 Thread Alex Dreyer (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alex Dreyer updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet Task Runner /  BOLT-260  
 
 
  Should be easier to pass typed data on CLI   
 

  
 
 
 
 

 
Change By: 
 Alex Dreyer  
 
 
Release Notes Summary: 
 parameters passed to plans or tasks the commandline can now be typed json data in addition to strings. Any parameter value passed on the commandline will be parsed but the parsed value will only be used if it matches the type. Otherwise the original string will be used.For example an array can be passed with:bolt task run my_task --nodes all files='["/file1", "file2"]'bolt plan run my_plan file=["/file1", "file2"]If you have a parameter than can accept either a string or typed value and want to pass a string wrap the value in double qoutes so that it is parsed as a string.bolt plan run my_plan bool_or_string='"false"'To pass a quoted string:bolt plan run my_plan string_param='"\"quoted\""'  
 
 
Release Notes: 
 New Feature  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google 

Jira (BOLT-260) Should be easier to pass typed data on CLI

2018-03-20 Thread David Kramer (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 David Kramer assigned an issue to Nick Lewis  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet Task Runner /  BOLT-260  
 
 
  Should be easier to pass typed data on CLI   
 

  
 
 
 
 

 
Change By: 
 David Kramer  
 
 
Assignee: 
 Alex Dreyer Nick Lewis  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (BOLT-260) Should be easier to pass typed data on CLI

2018-03-19 Thread Alex Dreyer (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alex Dreyer updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet Task Runner /  BOLT-260  
 
 
  Should be easier to pass typed data on CLI   
 

  
 
 
 
 

 
Change By: 
 Alex Dreyer  
 

  
 
 
 
 

 
 It's common to want to support boolean and integer types, which currently require falling back to passing a JSON blob. We should detect the types required by a task or plan and try to coerce command-line arguments to those types when unambiguous, to avoid making people pass JSON all the time.Handling for different target types:-  If String is assignable to  Parse  the  type specified in the plan do not attempt to parse the value  string as JSON .- If  String is not assignable to  the  value successfully parses and matches the  type  specified attempt to parse  from metadata use  it  as JSON and pass it on to puppet  otherwise use the original string value .  If it cannot be parsed raise a useful error. Test common Data types (including that Data gets a string). Also Variant[String, ...]. Optional should not error.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)  
 
 

 
   
 

  
 

  
 
  

Jira (BOLT-260) Should be easier to pass typed data on CLI

2018-03-14 Thread Alex Dreyer (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alex Dreyer assigned an issue to Alex Dreyer  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet Task Runner /  BOLT-260  
 
 
  Should be easier to pass typed data on CLI   
 

  
 
 
 
 

 
Change By: 
 Alex Dreyer  
 
 
Assignee: 
 Alex Dreyer  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (BOLT-260) Should be easier to pass typed data on CLI

2018-03-13 Thread Michael Smith (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Michael Smith updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet Task Runner /  BOLT-260  
 
 
  Should be easier to pass typed data on CLI   
 

  
 
 
 
 

 
Change By: 
 Michael Smith  
 

  
 
 
 
 

 
 It's common to want to support boolean and integer types, which currently require falling back to passing a JSON blob. We should detect the types required by a task or plan and try to coerce command-line arguments to those types when unambiguous, to avoid making people pass JSON all the time.Handling for different target types:- If String is assignable to the type specified in the plan do not attempt to parse the value.- If String is not assignable to the type specified attempt to parse it as JSON and pass it on to puppet. If it cannot be parsed raise a useful error.Test common Data types (including that Data gets a string). Also Variant[String, ...].  Optional should not error.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To 

Jira (BOLT-260) Should be easier to pass typed data on CLI

2018-03-13 Thread Michael Smith (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Michael Smith updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet Task Runner /  BOLT-260  
 
 
  Should be easier to pass typed data on CLI   
 

  
 
 
 
 

 
Change By: 
 Michael Smith  
 
 
Sprint: 
 Bolt  Ready for Grooming  Kanban  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (BOLT-260) Should be easier to pass typed data on CLI

2018-03-13 Thread Michael Smith (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Michael Smith updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet Task Runner /  BOLT-260  
 
 
  Should be easier to pass typed data on CLI   
 

  
 
 
 
 

 
Change By: 
 Michael Smith  
 

  
 
 
 
 

 
 It's common to want to support boolean and integer types, which currently require falling back to passing a JSON blob. We should detect the types required by a task or plan and try to coerce command-line arguments to those types when unambiguous, to avoid making people pass JSON all the time.Handling for different target types:- If String is assignable to the type specified in the plan do not attempt to parse the value.- If String is  not  assignable to the type specified attempt to parse it as JSON and pass it on to puppet. If it cannot be parsed raise a useful error.Test common Data types (including that Data gets a string). Also Variant[String, ...].  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and 

Jira (BOLT-260) Should be easier to pass typed data on CLI

2018-03-13 Thread Michael Smith (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Michael Smith updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet Task Runner /  BOLT-260  
 
 
  Should be easier to pass typed data on CLI   
 

  
 
 
 
 

 
Change By: 
 Michael Smith  
 

  
 
 
 
 

 
 It's common to want to support boolean and integer types, which currently require falling back to passing a JSON blob. We should detect the types required by a task or plan and try to coerce command-line arguments to those types when unambiguous, to avoid making people pass JSON all the time.Handling for different target types:- If  String is assignable to  the type specified in the plan  is assignable to String  do not attempt to parse the value.- If  the type specified  String  is  not  assignable to  String  the type specified  attempt to parse it as JSON and pass it on to puppet. If it cannot be parsed raise a useful error.Test common Data types (including that Data gets a string). Also Variant[String, ...].  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google 

Jira (BOLT-260) Should be easier to pass typed data on CLI

2018-03-13 Thread Michael Smith (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Michael Smith updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet Task Runner /  BOLT-260  
 
 
  Should be easier to pass typed data on CLI   
 

  
 
 
 
 

 
Change By: 
 Michael Smith  
 

  
 
 
 
 

 
 It's common to want to support boolean and integer types, which currently require falling back to passing a JSON blob. We should detect the types required by a task or plan and try to coerce command-line arguments to those types when unambiguous, to avoid making people pass JSON all the time.Handling for different target types:- If the type specified in the plan is assignable to String do not attempt to parse the value.- If the type specified is not assignable to String attempt to parse it as JSON and pass it on to puppet. If it cannot be parsed raise a useful error. Test common Data types (including that Data gets a string). Also Variant[String, ...].  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and 

Jira (BOLT-260) Should be easier to pass typed data on CLI

2018-02-27 Thread Alex Dreyer (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alex Dreyer updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet Task Runner /  BOLT-260  
 
 
  Should be easier to pass typed data on CLI   
 

  
 
 
 
 

 
Change By: 
 Alex Dreyer  
 

  
 
 
 
 

 
 It's common to want to support boolean and integer types, which currently require falling back to passing a JSON blob. We should detect the types required by a task or plan and try to coerce command-line arguments to those types when unambiguous, to avoid making people pass JSON all the time.Handling for different target types:-  The default behavior is a type that accepts a String.-  If the  target accepts a Boolean, Integer, Float, Number, or Enum,  type specified in the plan is assignable to String do not  attempt to  coerce  parse  the value  using Puppet's type conversion .  e.g. {{Boolean('true')}}. - If the  target  type specified  is  a Variant of scalars,  not assignable to String  attempt to  use each type conversion in the scalar in order. If one succeeds, use  parse  it  as JSON and pass it on to puppet . If  none succeed,  it cannot be parsed raise a useful  error. Questions:- Should we try to handle Regexp?- Should we bother handling Variants?  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.5.1#75006-sha1:7df2574)  
 
 

 
   
 

   

Jira (BOLT-260) Should be easier to pass typed data on CLI

2018-02-27 Thread Alex Dreyer (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alex Dreyer updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet Task Runner /  BOLT-260  
 
 
  Should be easier to pass typed data on CLI   
 

  
 
 
 
 

 
Change By: 
 Alex Dreyer  
 
 
Sprint: 
 Discover/Design Bolt Ready for Grooming  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.5.1#75006-sha1:7df2574)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (BOLT-260) Should be easier to pass typed data on CLI

2018-02-27 Thread Michael Smith (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Michael Smith updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet Task Runner /  BOLT-260  
 
 
  Should be easier to pass typed data on CLI   
 

  
 
 
 
 

 
Change By: 
 Michael Smith  
 

  
 
 
 
 

 
 A common pattern being established in plans is to pass an array of nodes. Our example at https://puppet.com/docs/bolt/0.x/writing_plans.html#defining-plan-parameters did that by passing a comma-separated list, which doesn't work at all. It's  also  common to want to support boolean and integer types, which currently  also  require falling back to passing a JSON blob.  We should detect the types required by a task or plan and try to coerce command-line arguments to those types when unambiguous, to avoid making people pass JSON all the time. One challenging example of this is from our plan docs Handling for different target types :  {{Variant[String[1], Array[String[1]]] $backends}} with - The default behavior is  a  CLI arg of {{backends=kermit  type that accepts a String . myorg.com,gonzo.myorg.com}} could either be - If the target accepts  a  string  Boolean ,  Integer, Float, Number,  or  an array of 2 items  Enum, attempt to coerce the value using Puppet's type conversion .  Also {{backends=kermit  e . myorg g . com  {{Boolean('true') }}  could be .- If the target is  a  string or an array  Variant  of  1 item  scalars, attempt to use each type conversion in the scalar in order .  We'll need  If one succeeds, use it. If none succeed, error.Questions:- Should we try  to  decide how to  handle  that.  Regexp?- Should we bother handling Variants?  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This 

Jira (BOLT-260) Should be easier to pass typed data on CLI

2018-02-27 Thread Michael Smith (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Michael Smith commented on  BOLT-260  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Should be easier to pass typed data on CLI   
 

  
 
 
 
 

 
 We've done something specific to handle arrays of targets. This ticket can be updated to handling scalar types only.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.5.1#75006-sha1:7df2574)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (BOLT-260) Should be easier to pass typed data on CLI

2018-02-20 Thread Alex Dreyer (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alex Dreyer updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet Task Runner /  BOLT-260  
 
 
  Should be easier to pass typed data on CLI   
 

  
 
 
 
 

 
Change By: 
 Alex Dreyer  
 
 
Summary: 
 Should be easier to pass  simple types  typed data  on CLI  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.5.1#75006-sha1:7df2574)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.