Jira (PUP-7605) catalog.resource() doesn't accept "main" as a title parameter

2017-05-30 Thread Russell Mull (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Russell Mull created an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-7605 
 
 
 
  catalog.resource() doesn't accept "main" as a title parameter  
 
 
 
 
 
 
 
 
 

Issue Type:
 
  Bug 
 
 
 

Assignee:
 

 Unassigned 
 
 
 

Created:
 

 2017/05/30 12:10 PM 
 
 
 

Priority:
 
  Normal 
 
 
 

Reporter:
 
 Russell Mull 
 
 
 
 
 
 
 
 
 
 
When calling catalog.resource(type, title) with the string "main" as the title parameter, it doesn't return a resource in the catalog with that title. It appears that title is getting passed through resource.munge_type_name(), which had a special case for :main that doesn't kick in now we're using the stringified data from to_hash.  
This is triggered by PUP commit 7bbe36774; this returns title as a string in to_data_hash, where it used to be a symbol somtimes. The PDB terminus in turns calls catalog_resource with this, which then returns nil. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
   

Jira (PUP-7605) catalog.resource() doesn't accept "main" as a title parameter

2017-05-31 Thread Josh Cooper (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Josh Cooper assigned an issue to Thomas Hallgren 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-7605 
 
 
 
  catalog.resource() doesn't accept "main" as a title parameter  
 
 
 
 
 
 
 
 
 

Change By:
 
 Josh Cooper 
 
 
 

Assignee:
 
 Thomas Hallgren 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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 (PUP-7605) catalog.resource() doesn't accept "main" as a title parameter

2017-05-31 Thread Josh Cooper (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Josh Cooper updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-7605 
 
 
 
  catalog.resource() doesn't accept "main" as a title parameter  
 
 
 
 
 
 
 
 
 

Change By:
 
 Josh Cooper 
 
 
 

Fix Version/s:
 
 PUP 5.0.0 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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 (PUP-7605) catalog.resource() doesn't accept "main" as a title parameter

2017-05-31 Thread Josh Cooper (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Josh Cooper commented on  PUP-7605 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: catalog.resource() doesn't accept "main" as a title parameter  
 
 
 
 
 
 
 
 
 
 
The puppetdb terminus sometimes wants symbols, e.g. in the resource['title'] == :main case Russell Mull described. 
It also sometimes doesn't want symbols, e.g. the stringify_titles method eliminates them, and should no longer be necessary. 
The puppetdb terminus also adds symbolic values to the resources hash, e.g. :alias, which makes me think it is somehow sanitizing those values before generating as JSON? 
I think there may be other areas where the terminus has a string, but thinks it has a symbol, e.g. https://github.com/puppetlabs/puppetdb/blob/a79b4a795966c45b91dacfa79ec8eafab150756f/puppet/lib/puppet/indirector/catalog/puppetdb.rb#L349-L351. 
Putting this in needs information, because I think it would be interesting to compare the result of munge_catalog when run against a puppet 4.10.x vs puppet 5.0 with a realistic PE catalog to see how the behavior has changed, and to make sure we fully understand the behavior changes (and most likely update the puppetdb terminus now that the output of to_data_hash is sane). 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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 (PUP-7605) catalog.resource() doesn't accept "main" as a title parameter

2017-05-31 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg commented on  PUP-7605 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: catalog.resource() doesn't accept "main" as a title parameter  
 
 
 
 
 
 
 
 
 
 
Maybe the fact that we also now have dropped the Symbol monkey patch that made it compare equal to string is also involved here since it earlier did not matter that much if you used a String or a Symbol...  
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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 (PUP-7605) catalog.resource() doesn't accept "main" as a title parameter

2017-05-31 Thread Thomas Hallgren (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Thomas Hallgren commented on  PUP-7605 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: catalog.resource() doesn't accept "main" as a title parameter  
 
 
 
 
 
 
 
 
 
 
Do we want to keep the special handling of :main or would it be OK to always use a String throughout? Or to rephrase, do we expect :main to ever conflict with 'main'? If not, then the proper fix for this is likely to get rid of the symbol altogether and do a #to_s if a symbol is received as argument. The string 'main' should then be a frozen constant. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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 (PUP-7605) catalog.resource() doesn't accept "main" as a title parameter

2017-05-31 Thread Kenn Hussey (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Kenn Hussey updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-7605 
 
 
 
  catalog.resource() doesn't accept "main" as a title parameter  
 
 
 
 
 
 
 
 
 

Change By:
 
 Kenn Hussey 
 
 
 

Team:
 
 Agent 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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 (PUP-7605) catalog.resource() doesn't accept "main" as a title parameter

2017-05-31 Thread Kenn Hussey (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Kenn Hussey updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-7605 
 
 
 
  catalog.resource() doesn't accept "main" as a title parameter  
 
 
 
 
 
 
 
 
 

Change By:
 
 Kenn Hussey 
 
 
 

Sprint:
 
 Puppet 5 Race to the Finish! 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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 (PUP-7605) catalog.resource() doesn't accept "main" as a title parameter

2017-05-31 Thread Kenn Hussey (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Kenn Hussey updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-7605 
 
 
 
  catalog.resource() doesn't accept "main" as a title parameter  
 
 
 
 
 
 
 
 
 

Change By:
 
 Kenn Hussey 
 
 
 

Story Points:
 
 1 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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 (PUP-7605) catalog.resource() doesn't accept "main" as a title parameter

2017-05-31 Thread Kenn Hussey (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Kenn Hussey updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-7605 
 
 
 
  catalog.resource() doesn't accept "main" as a title parameter  
 
 
 
 
 
 
 
 
 

Change By:
 
 Kenn Hussey 
 
 
 

Sprint:
 
 Puppet 5 Race to the Finish! Agent 2017-06-14 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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 (PUP-7605) catalog.resource() doesn't accept "main" as a title parameter

2017-06-01 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg assigned an issue to Josh Cooper 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
Blocked awaiting decision to just accept "work around" in PDB terminus, or to move ahead with removing special use of :main name in resources as in the PR. 
 
 
 
 
 
 
 
 
 
 Puppet /  PUP-7605 
 
 
 
  catalog.resource() doesn't accept "main" as a title parameter  
 
 
 
 
 
 
 
 
 

Change By:
 
 Henrik Lindberg 
 
 
 

Assignee:
 
 Thomas Hallgren Josh Cooper 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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 (PUP-7605) catalog.resource() doesn't accept "main" as a title parameter

2017-06-01 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-7605 
 
 
 
  catalog.resource() doesn't accept "main" as a title parameter  
 
 
 
 
 
 
 
 
 

Change By:
 
 Henrik Lindberg 
 
 
 

Sub-team:
 
 Language 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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 (PUP-7605) catalog.resource() doesn't accept "main" as a title parameter

2017-06-05 Thread Eric Delaney (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Eric Delaney updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-7605 
 
 
 
  catalog.resource() doesn't accept "main" as a title parameter  
 
 
 
 
 
 
 
 
 

Change By:
 
 Eric Delaney 
 
 
 

QA Risk Assessment Reason:
 
 Check in includes test updates for the change 
 
 
 

QA Risk Assessment:
 
 Needs Assessment No Action 
 
 
 

QA Contact:
 
 Eric Delaney 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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 (PUP-7605) catalog.resource() doesn't accept "main" as a title parameter

2017-06-05 Thread Josh Cooper (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Josh Cooper commented on  PUP-7605 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: catalog.resource() doesn't accept "main" as a title parameter  
 
 
 
 
 
 
 
 
 
 
Decided to close as won't fix, see comment in https://github.com/puppetlabs/puppet/pull/5929#issuecomment-306250190 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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 (PUP-7605) catalog.resource() doesn't accept "main" as a title parameter

2017-06-05 Thread Thomas Hallgren (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Thomas Hallgren commented on  PUP-7605 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: catalog.resource() doesn't accept "main" as a title parameter  
 
 
 
 
 
 
 
 
 
 
Josh Cooper, Henrik Lindberg, please note that the problem that this ticket aimed to resolve isn't just the interrim fix in PuppetDB. This is also about how we serialize and deserialize resources. At present, the deserialized resource will have a string title, whether it's "main" or not and the behavior of having a String "main" is undefined. 
I'm not at all happy closing this for the reason that we don't know if it might break something, somewhere. We do know that there is a problem in that a deserialzed resource is different from the original. We also know for sure that referencing a resource using the string 'main' as the title causes a problem. To me, it seems very wrong to not fix known problems because we're afraid of the unknown ones. If we don't rely on our tests, then let's improve the tests. We cannot have a situation where we are paralyzed by fear that something might break somewhere down the line. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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 (PUP-7605) catalog.resource() doesn't accept "main" as a title parameter

2017-06-07 Thread Josh Cooper (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Josh Cooper commented on  PUP-7605 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: catalog.resource() doesn't accept "main" as a title parameter  
 
 
 
 
 
 
 
 
 
 
Thomas Hallgren I'm ok reopening this for more investigation and a fix down the road, if only to help define the type and provider API, but I think it's a much lower priority right now. I think we do have additional work to do in the puppetdb terminus because it is mixing data from different catalog representations, the serialized to_data_hash and Puppet::Resource::Catalog versions. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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.