Jira (PUP-3732) type validation should not run for `puppet resource`

2017-06-19 Thread Bernhard Frauendienst (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Bernhard Frauendienst commented on  PUP-3732 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: type validation should not run for `puppet resource`  
 
 
 
 
 
 
 
 
 
 
Taylan Develioglu, it turns out that checking for managed? does not help (at least not in all cases), because even for managed resources the above situation occurs, where the resource is created but validation is called before properties are set. However, the resources is already marked as managed. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 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-3732) type validation should not run for `puppet resource`

2017-06-19 Thread Bernhard Frauendienst (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Bernhard Frauendienst commented on  PUP-3732 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: type validation should not run for `puppet resource`  
 
 
 
 
 
 
 
 
 
 
Taylan Develioglu thanks, that's good to know! However, in my case, even for unmanaged resources that validated invariant always holds true, so guarding for managed resources would just be working around implementation details. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 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-3732) type validation should not run for `puppet resource`

2017-06-19 Thread Bernhard Frauendienst (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Bernhard Frauendienst commented on  PUP-3732 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: type validation should not run for `puppet resource`  
 
 
 
 
 
 
 
 
 
 

This should still work for normal catalog application, as a resource returned by self.instances and thus passing global validation is already configured correctly.
 
Are you sure about this? I've encountered the same issue with resources created by self.instances when trying to purge them with resources.  
I tried to follow the code, the resources are created in self.instances @ type.rb#L1174 with just a name and a provider, and are then validated in initialize @ type.rb#L2398. I can't see where the values from the provider would be set inbetween, and given that the validation fails, this does not seem to be the case. Then again, I'm very new to the Ruby language. Am I missing something here? 
I've checked most built-in types, and none of them have a global validate block that would not work if the values are not set. That would explain why this never was reported with a built-in type. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 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.