Jira (BOLT-680) Simplify scaffolding for powershell tasks with metadata

2018-07-12 Thread Michael Smith (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Michael Smith commented on  BOLT-680  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Simplify scaffolding for powershell tasks with metadata   
 

  
 
 
 
 

 
 Reproduced from https://github.com/puppetlabs/bolt/pull/497#discussion_r202175010 
 
I'm not sure how that would impact _noop if there are no PowerShell consumers of this concept yet? 
Only one thing to worry about colliding is better than more than one (agree that the risk of collision is probably low given I'm not aware of anyone who uses params in PowerShell that start with _) 
Never having to update PDK templates when new params are added is a long-term maintenance win (especially if the template comments a line like Write-Debug $_meta | Select * which will give you all the props) 
I think a single self-descriptive object is much better UX than receiving any number of arbitrary params (only passed when a script explicitly asks for them) - I'd wager that has the benefit of providing better flexibility for task authors running against multiple Bolt / task versions as well 
To expand on above, if a script is designed to run local, but can also receive task metadata, it's cleaner to have a single arg exposed (for things like tab completion) 
Generally speaking, introducing parameter objects is a good refactor 
 My only response is that the task spec reserves all arguments beginning with _ for the task runner's use, so they should never collide.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
  

Jira (BOLT-680) Simplify scaffolding for powershell tasks with metadata

2018-07-10 Thread Michael Smith (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Michael Smith commented on  BOLT-680  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Simplify scaffolding for powershell tasks with metadata   
 

  
 
 
 
 

 
 I'm not currently in favor of this change: 
 
it would require a change to the task specification, that affects how tasks use _noop in existing PE releases 
we'd want to name it something like _meta anyway to avoid collisions with valid user parameter names 
I'm not convinced it's that much of an improvement when they still need to go lookup what the metaparameter syntax is to be able to scaffold it, which means it doesn't feel worth the effort 
 I'm open to more input that it would be useful however.  
 

  
 
 
 
 

 
 
 

 
 
 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-680) Simplify scaffolding for powershell tasks with metadata

2018-07-10 Thread Michael Smith (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Michael Smith updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet Task Runner /  BOLT-680  
 
 
  Simplify scaffolding for powershell tasks with metadata   
 

  
 
 
 
 

 
Change By: 
 Michael Smith  
 
 
Issue Type: 
 Story Improvement  
 

  
 
 
 
 

 
 
 

 
 
 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-680) Simplify scaffolding for powershell tasks with metadata

2018-07-10 Thread Michael Smith (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Michael Smith created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet Task Runner /  BOLT-680  
 
 
  Simplify scaffolding for powershell tasks with metadata   
 

  
 
 
 
 

 
Issue Type: 
  Story  
 
 
Assignee: 
 Unassigned  
 
 
Created: 
 2018/07/10 10:40 AM  
 
 
Priority: 
  Normal  
 
 
Reporter: 
 Michael Smith  
 

  
 
 
 
 

 
 Ethan Brown suggested in https://github.com/puppetlabs/bolt/pull/497#discussion_r199299011 that we simplify creating templates for powershell tasks with PDK by putting metadata under a single hash parameter. Then all powershell tasks could include  
 
 
 
 
 param(  
 
 
   [Parameter(Mandatory = $False)]  
 
 
   [Hash]  
 
 
   $_meta  
 
 
 )