Jira (BOLT-833) JSON Output for Results is confusing for new users

2019-08-15 Thread Yasmin Rajabi (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Yasmin Rajabi updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet Task Runner /  BOLT-833  
 
 
  JSON Output for Results is confusing for new users   
 

  
 
 
 
 

 
Change By: 
 Yasmin Rajabi  
 
 
Labels: 
 ghm  
 

  
 
 
 
 

 
 
 

 
 
 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 view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.275601.1536858546000.58708.1565910900382%40Atlassian.JIRA.


Jira (BOLT-833) JSON Output for Results is confusing for new users

2019-04-04 Thread Alex Dreyer (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alex Dreyer commented on  BOLT-833  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: JSON Output for Results is confusing for new users   
 

  
 
 
 
 

 
 In general I think we should prefer breaking changes to the json format rather then the plan language. One possible path forward that will not break plans is to inject _target and _status keys into the result's value. In Bolt 2.0 we can then change the json output to be just the value rather then have the value nested in result  
 

  
 
 
 
 

 
 
 

 
 
 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-833) JSON Output for Results is confusing for new users

2019-04-03 Thread Henrik Lindberg (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Henrik Lindberg commented on  BOLT-833  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: JSON Output for Results is confusing for new users   
 

  
 
 
 
 

 
 It is not as easy as adding a function `[]` like that since it is an operator in the Puppet Language and there is no automatic mapping of operators to methods.  
 

  
 
 
 
 

 
 
 

 
 
 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-833) JSON Output for Results is confusing for new users

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


 
 
 
 

 
 
 

 
   
 Michael Smith commented on  BOLT-833  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: JSON Output for Results is confusing for new users   
 

  
 
 
 
 

 
 This seems like it'll need to be split into near-term improvements and Bolt 2.0 changes.  
 

  
 
 
 
 

 
 
 

 
 
 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-833) JSON Output for Results is confusing for new users

2018-09-13 Thread Alex Dreyer (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alex Dreyer commented on  BOLT-833  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: JSON Output for Results is confusing for new users   
 

  
 
 
 
 

 
 That seems like the correct solution for ResultSet. I think without breaking existing plans or the ability to stream Resultsets the best we can do is add a warning around calling $result['result'] .  
 

  
 
 
 
 

 
 
 

 
 
 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-833) JSON Output for Results is confusing for new users

2018-09-13 Thread Nick Maludy (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Nick Maludy commented on  BOLT-833  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: JSON Output for Results is confusing for new users   
 

  
 
 
 
 

 
 Some thoughts on improvements:   
 
In ResultSet, could add a function to access Results by index 
  
 
 
 
 
 '[]' => Callable[Integer, Optional[Result]],  
 
 
 
  
 
In Result, could rename 'result' (in the JSON) to 'value' 
In Result, could rename 'node' (in the JSON) to 'target' 
In Result, could add a field named 'status' that returns the status string (instead of just ok() and error()) to be consistent with the JSON 
        
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
You 

Jira (BOLT-833) JSON Output for Results is confusing for new users

2018-09-13 Thread Alex Dreyer (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alex Dreyer commented on  BOLT-833  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: JSON Output for Results is confusing for new users   
 

  
 
 
 
 

 
 We should definitely make the ResultSet object indexable. The design of the Result object vs it's json representation evolved early in bolt's lifetime based on two problems we ran into. 1. We want to make the json object returned from a task accessible directly in plans because without that everything has the boilerplate $result['result']['foo']. 2. We need to include the "target name" in the json output or there is no way to know what the result relates to. Changing either the behavior of the Result object will be a pretty big breaking change and I don't see a good way to change the json format(which would also be a breaking change)  
 

  
 
 
 
 

 
 
 

 
 
 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-833) JSON Output for Results is confusing for new users

2018-09-13 Thread Nick Maludy (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Nick Maludy created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet Task Runner /  BOLT-833  
 
 
  JSON Output for Results is confusing for new users   
 

  
 
 
 
 

 
Issue Type: 
  Improvement  
 
 
Assignee: 
 Unassigned  
 
 
Created: 
 2018/09/13 10:09 AM  
 
 
Priority: 
  Normal  
 
 
Reporter: 
 Nick Maludy  
 

  
 
 
 
 

 
 Teaching some of the people on my team how to use Bolt and several of them have been confused by the way that ResultSet is displayed when printed out with notice() from a plan.   By default the ResultSet object's to_s() function returns a JSON representation that looks like:  
 
 
 
 
 [{"node":"winrm://hostname.domain.tld","status":"success","result":{"os":{"name":"windows","release":{"full":"2012 R2","major":"2012 R2"},"family":"windows"}}}]
  
 
 
 
  Their initial reaction is to try and read parts of this data by accessing it like an array + dictionary that is shown:  
 
 
 
 
 plan encore_st2::get_facts (  
 
 
   TargetSpec $nodes  
 
 
 ) {