Jira (PUP-8637) freeze_main setting breaks when used with type aliases

2018-05-17 Thread Josh Cooper (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Josh Cooper commented on  PUP-8637  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: freeze_main setting breaks when used with type aliases   
 

  
 
 
 
 

 
 Merged to 5.5.x in https://github.com/puppetlabs/puppet/commit/f3f37f401547c9a13a865ad035d76ce7e86a6588  
 

  
 
 
 
 

 
 
 

 
 
 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 (PUP-8637) freeze_main setting breaks when used with type aliases

2018-04-13 Thread Henrik Lindberg (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Henrik Lindberg updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet /  PUP-8637  
 
 
  freeze_main setting breaks when used with type aliases   
 

  
 
 
 
 

 
Change By: 
 Henrik Lindberg  
 
 
Release Notes Summary: 
 When using {{--freeze_main}} there were circumstances when this would cause an error even if there were no code loading resulting in a modification of the main loaded logic.  
 
 
Release Notes: 
 Bug Fix  
 

  
 
 
 
 

 
 
 

 
 
 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 (PUP-8637) freeze_main setting breaks when used with type aliases

2018-04-12 Thread Reid Vandewiele (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Reid Vandewiele commented on  PUP-8637  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: freeze_main setting breaks when used with type aliases   
 

  
 
 
 
 

 
 Henrik Lindberg !  
 
 
 
 
 [root@centos-7-0 puppet]# git checkout 5.5.0  
 
 
 HEAD is now at ceec9d2... Merge pull request #6740 from ekinanp/5.5.x  
 
 
 [root@centos-7-0 puppet]# ruby -I lib ./bin/puppet apply --modulepath test/modules --freeze_main test/manifests/site.pp --noop  
 
 
 Error: Evaluation Error: Error while evaluating a Type-Name, Cannot have code outside of a class/node/define because 'freeze_main' is enabled (file: /root/puppet/test/modules/haproxy/manifests/init.pp, line: 123, column: 3) on node centos-7-0.2016-4.puppet.vm
  
 
 
 
   
 
 
 
 
 [root@centos-7-0 puppet]# git checkout PUP-8637_freeze-main-should-allow-definitions-being-merged  
 
 
 Previous HEAD position was ceec9d2... Merge pull request #6740 from ekinanp/5.5.x  
 
 
 Switched to branch 'PUP-8637_freeze-main-should-allow-definitions-being-merged'  
 
 
 [root@centos-7-0 puppet]# ruby -I lib ./bin/puppet apply --modulepath test/modules --freeze_main test/manifests/site.pp --noop  
 
 
 Warning: /etc/puppetlabs/puppet/hiera.yaml: Use of 'hiera.yaml' version 3 is deprecated. It should be converted to version 5  
 
  

Jira (PUP-8637) freeze_main setting breaks when used with type aliases

2018-04-12 Thread Henrik Lindberg (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Henrik Lindberg commented on  PUP-8637  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: freeze_main setting breaks when used with type aliases   
 

  
 
 
 
 

 
 Unit tests modified/added since there was one that failed with the new behavior.  
 

  
 
 
 
 

 
 
 

 
 
 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 (PUP-8637) freeze_main setting breaks when used with type aliases

2018-04-12 Thread Henrik Lindberg (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Henrik Lindberg updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet /  PUP-8637  
 
 
  freeze_main setting breaks when used with type aliases   
 

  
 
 
 
 

 
Change By: 
 Henrik Lindberg  
 
 
Fix Version/s: 
 PUP 5.5.2  
 

  
 
 
 
 

 
 
 

 
 
 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 (PUP-8637) freeze_main setting breaks when used with type aliases

2018-04-12 Thread Henrik Lindberg (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Henrik Lindberg commented on  PUP-8637  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: freeze_main setting breaks when used with type aliases   
 

  
 
 
 
 

 
 While I did not find the exact combination that leads to the merge problem I found that the cause was a much too restrictive condition for freeze main failure. It should always be ok to merge definitions into main since that is the purpose of merging. I put up a PR where the failure for freeze_main only occurs if there is an attempt to merge actual code into the main (i.e. top scope ""). This is now done in the PopsBridge::Program (since that is always what is being merged when a :hostclass resource is being merged). With the change in the PR I managed to run the ha_proxy sample to the point it fails because it does not support Darwin. It did not fail with the reported issue. Reid Vandewiele can you take the PR for a spin and see if it solves your problem? I will need to add a unit test for the functionality I added. If possible it would be great to get a deeper understanding of exactly why this happens with the stdlib/ha_proxy/type-alias combo - but I think the change itself is sound in principle as we should not disallow merge of only definitions.  
 

  
 
 
 
 

 
 
 

 
 
 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 

Jira (PUP-8637) freeze_main setting breaks when used with type aliases

2018-04-12 Thread Henrik Lindberg (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Henrik Lindberg assigned an issue to Reid Vandewiele  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet /  PUP-8637  
 
 
  freeze_main setting breaks when used with type aliases   
 

  
 
 
 
 

 
Change By: 
 Henrik Lindberg  
 
 
Assignee: 
 Reid Vandewiele  
 

  
 
 
 
 

 
 
 

 
 
 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 (PUP-8637) freeze_main setting breaks when used with type aliases

2018-04-12 Thread Henrik Lindberg (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Henrik Lindberg commented on  PUP-8637  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: freeze_main setting breaks when used with type aliases   
 

  
 
 
 
 

 
 I tried to create a simpler reproducer than using full ha_proxy and stdlib modules since there is quite a lot going on when loading those. Comparing with --freeze_main and --no-freeze_main is a bit involved since the ha_proxy module does not run on Darwin. I made a simpler set up with just a test class using an autoloaded type alias, and that does not fail. There must be some other nesting going on in the ha_proxy/stdlib/loading-type-alias combination that triggers the freeze_main problem. Using the ha_proxy reproducer I could see that the merge that is going wrong is between "test/modules/stdlib/manifests/init.pp" and "test/manifests/site.pp". That looks legit as neither stdlib init.pp nor stages.pp have code outside of classes. For reference - when the merge takes place, there are two objects being merged that are instances of Puppet::Resource. They have a code instance variable that is a reference to a PopsBridge object that in turn has a program_model object. That object has a locator that shows the content of the file and the name of the file. To see what is being merged use for example instance.code.program_model.locator.file to view the filename in the debugger.  
 

  
 
 
 
 

 
 
 

 
 
 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 

Jira (PUP-8637) freeze_main setting breaks when used with type aliases

2018-04-11 Thread Josh Cooper (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Josh Cooper updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet /  PUP-8637  
 
 
  freeze_main setting breaks when used with type aliases   
 

  
 
 
 
 

 
Change By: 
 Josh Cooper  
 
 
Team: 
 Platform Core  
 

  
 
 
 
 

 
 
 

 
 
 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 (PUP-8637) freeze_main setting breaks when used with type aliases

2018-04-11 Thread Josh Cooper (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Josh Cooper updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet /  PUP-8637  
 
 
  freeze_main setting breaks when used with type aliases   
 

  
 
 
 
 

 
Change By: 
 Josh Cooper  
 
 
Sub-team: 
 Language  
 

  
 
 
 
 

 
 
 

 
 
 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 (PUP-8637) freeze_main setting breaks when used with type aliases

2018-04-06 Thread Reid Vandewiele (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Reid Vandewiele created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet /  PUP-8637  
 
 
  freeze_main setting breaks when used with type aliases   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Unassigned  
 
 
Created: 
 2018/04/06 11:56 AM  
 
 
Priority: 
  Normal  
 
 
Reporter: 
 Reid Vandewiele  
 

  
 
 
 
 

 
 The freeze_main setting throws an error when used with code containing type aliases. Reproduction:  
 
 
 
 
 mkdir -p test/modules test/manifests  
 
 
 puppet module install --modulepath test/modules puppetlabs-stdlib  
 
 
 puppet module install --modulepath test/modules puppetlabs-haproxy  
 
 
 echo 'include haproxy; notify { "test": }' > test/manifests/site.pp  
 
 
 puppet apply --modulepath test/modules --freeze_main test/manifests/site.pp --noop
  
 
 
 
  This error will be thrown: