Jira (PUP-11435) Puppet 6.26 and 7.13 may cause specs to fail

2022-03-15 Thread Parker Leach (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Parker Leach updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet /  PUP-11435  
 
 
  Puppet 6.26 and 7.13 may cause specs to fail   
 

  
 
 
 
 

 
Change By: 
 Parker Leach  
 
 
Labels: 
 doc_reviewed docs_reviewed  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v8.20.2#820002-sha1:829506d)  
 
 

 
   
 

  
 

  
 

   





-- 
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.432469.164315863.2832.1647366360057%40Atlassian.JIRA.


Jira (PUP-11435) Puppet 6.26 and 7.13 may cause specs to fail

2022-03-14 Thread Parker Leach (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Parker Leach updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet /  PUP-11435  
 
 
  Puppet 6.26 and 7.13 may cause specs to fail   
 

  
 
 
 
 

 
Change By: 
 Parker Leach  
 
 
Labels: 
 doc_reviewed  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v8.20.2#820002-sha1:829506d)  
 
 

 
   
 

  
 

  
 

   





-- 
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.432469.164315863.2026.1647280020053%40Atlassian.JIRA.


Jira (PUP-11435) Puppet 6.26 and 7.13 may cause specs to fail

2022-02-16 Thread Heston Hoffman (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Heston Hoffman updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet /  PUP-11435  
 
 
  Puppet 6.26 and 7.13 may cause specs to fail   
 

  
 
 
 
 

 
Change By: 
 Heston Hoffman  
 
 
Release Notes Summary: 
 Faster changes caused some module Rspec  tests  to fail  with custom facts failed on some modules This release fixes an issue where rspec  module  tests would compile with the runner node’s facts instead of using the  custom  facts supplied by the test.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v8.20.2#820002-sha1:829506d)  
 
 

 
   
 

  
 

  
 

   





-- 
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.432469.164315863.17582.1645029180167%40Atlassian.JIRA.


Jira (PUP-11435) Puppet 6.26 and 7.13 may cause specs to fail

2022-02-16 Thread Heston Hoffman (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Heston Hoffman updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet /  PUP-11435  
 
 
  Puppet 6.26 and 7.13 may cause specs to fail   
 

  
 
 
 
 

 
Change By: 
 Heston Hoffman  
 
 
Release Notes Summary: 
 Facter Faster changes  caused some module tests to fail This release fixes an issue where rspec tests would compile with the runner node’s facts instead of using the facts supplied by the test .     
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v8.20.2#820002-sha1:829506d)  
 
 

 
   
 

  
 

  
 

   





-- 
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.432469.164315863.17581.1645029060089%40Atlassian.JIRA.


Jira (PUP-11435) Puppet 6.26 and 7.13 may cause specs to fail

2022-02-16 Thread Heston Hoffman (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Heston Hoffman updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet /  PUP-11435  
 
 
  Puppet 6.26 and 7.13 may cause specs to fail   
 

  
 
 
 
 

 
Change By: 
 Heston Hoffman  
 
 
Release Notes Summary: 
 Facter caused some module tests to fail.    
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v8.20.2#820002-sha1:829506d)  
 
 

 
   
 

  
 

  
 

   





-- 
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.432469.164315863.17574.1645028880032%40Atlassian.JIRA.


Jira (PUP-11435) Puppet 6.26 and 7.13 may cause specs to fail

2022-02-16 Thread Nirupama Mantha (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Nirupama Mantha updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet /  PUP-11435  
 
 
  Puppet 6.26 and 7.13 may cause specs to fail   
 

  
 
 
 
 

 
Change By: 
 Nirupama Mantha  
 
 
Release Notes: 
 Bug Fix  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v8.20.2#820002-sha1:829506d)  
 
 

 
   
 

  
 

  
 

   





-- 
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.432469.164315863.17522.1645027860139%40Atlassian.JIRA.


Jira (PUP-11435) Puppet 6.26 and 7.13 may cause specs to fail

2022-02-14 Thread Christopher Thorn (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Christopher Thorn assigned an issue to Unassigned  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet /  PUP-11435  
 
 
  Puppet 6.26 and 7.13 may cause specs to fail   
 

  
 
 
 
 

 
Change By: 
 Christopher Thorn  
 
 
Assignee: 
 Christopher Thorn  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v8.20.2#820002-sha1:829506d)  
 
 

 
   
 

  
 

  
 

   





-- 
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.432469.164315863.15707.1644871680040%40Atlassian.JIRA.


Jira (PUP-11435) Puppet 6.26 and 7.13 may cause specs to fail

2022-02-14 Thread Christopher Thorn (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Christopher Thorn commented on  PUP-11435  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Puppet 6.26 and 7.13 may cause specs to fail   
 

  
 
 
 
 

 
 This looks good, with the change in puppet I tested the puppet-enterprise-modules failure. Locally in my puppet repo I pulled down the changes on the 6.x branch, then I updated puppet-enterprise-module's gemfile to have this line ` gem 'puppet', :path => '../puppet'` and ran bundle install in order to get bundle to use the puppet that has the fix. Then I re-ran the puppet_enterprise module's spec test and that is now passing.   
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v8.20.2#820002-sha1:829506d)  
 
 

 
   
 

  
 

  
 

   





-- 
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.432469.164315863.15706.1644871620029%40Atlassian.JIRA.


Jira (PUP-11435) Puppet 6.26 and 7.13 may cause specs to fail

2022-02-14 Thread Christopher Thorn (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Christopher Thorn assigned an issue to Christopher Thorn  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet /  PUP-11435  
 
 
  Puppet 6.26 and 7.13 may cause specs to fail   
 

  
 
 
 
 

 
Change By: 
 Christopher Thorn  
 
 
Assignee: 
 Aria Li Christopher Thorn  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v8.20.2#820002-sha1:829506d)  
 
 

 
   
 

  
 

  
 

   





-- 
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.432469.164315863.15696.1644871140037%40Atlassian.JIRA.


Jira (PUP-11435) Puppet 6.26 and 7.13 may cause specs to fail

2022-02-10 Thread Aria Li (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Aria Li assigned an issue to Aria Li  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet /  PUP-11435  
 
 
  Puppet 6.26 and 7.13 may cause specs to fail   
 

  
 
 
 
 

 
Change By: 
 Aria Li  
 
 
Assignee: 
 Aria Li  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v8.20.2#820002-sha1:829506d)  
 
 

 
   
 

  
 

  
 

   





-- 
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.432469.164315863.13882.1644520200044%40Atlassian.JIRA.


Jira (PUP-11435) Puppet 6.26 and 7.13 may cause specs to fail

2022-02-09 Thread Josh Cooper (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Josh Cooper updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet /  PUP-11435  
 
 
  Puppet 6.26 and 7.13 may cause specs to fail   
 

  
 
 
 
 

 
Change By: 
 Josh Cooper  
 
 
Acceptance Criteria: 
 # Change is made to 6.x and main# The puppet_enterprise_module rspec tests should pass given the reproduction steps in the description  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v8.20.2#820002-sha1:829506d)  
 
 

 
   
 

  
 

  
 

   





-- 
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.432469.164315863.13125.1644471480046%40Atlassian.JIRA.


Jira (PUP-11435) Puppet 6.26 and 7.13 may cause specs to fail

2022-02-09 Thread Josh Cooper (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Josh Cooper commented on  PUP-11435  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Puppet 6.26 and 7.13 may cause specs to fail   
 

  
 
 
 
 

 
 In the case where things work, only one instance of Packages is created (early on when inventory.rb is loaded) and is shared across tests, which means there is the potential for state to leak across tests. In the case where things don't work, the call to Facter.reset unregisters the fact. So the next call to Facter.value('_puppet_inventory_1') will force the fact to be reloaded via Kernel.load. My theory is that rspec redefines a method on the class, but then the call to Kernel.load overwrites the rspec method, so rspec's hook is never called. I think we should just remove the call to Facter.reset like nick.burgan-illig suggested earlier.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v8.20.2#820002-sha1:829506d)  
 
 

 
   
 

  
 

  
 

   





-- 
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.432469.164315863.13124.1644471360036%40Atlassian.JIRA.


Jira (PUP-11435) Puppet 6.26 and 7.13 may cause specs to fail

2022-02-09 Thread Josh Cooper (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Josh Cooper updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet /  PUP-11435  
 
 
  Puppet 6.26 and 7.13 may cause specs to fail   
 

  
 
 
 
 

 
Change By: 
 Josh Cooper  
 

  
 
 
 
 

 
 Commit 78246ca8d08dee770886f0940a6472c45483d627 first released in 6.26.0 and 7.13.0 speeds up rspec tests but breaks puppet-enteprise-modules due to the way {{Facter.reset}} breaks stubbing for a custom fact.[https://github.com/puppetlabs/puppet/commit/78246ca8d08dee770886f0940a6472c45483d627]This ticket is to:1. Delete the call to {{Facter.reset}} line in [https://github.com/puppetlabs/puppet/blob/4772afa194402a3876069785a178611797a8eb7d/lib/puppet/defaults.rb#L1998]2. Optional (attempt 1), try adding {{Facter.reset}} to puppet's [spec_helper.rb|https://github.com/puppetlabs/puppet/blob/4772afa194402a3876069785a178611797a8eb7d/sec/spec_helper.rb]. That way the facter search path is reset across tests, but it's only triggered when running puppet's spec tests. But not when a module runs tests and calls puppet as a library.3. Optional (attempt 2), if attempt 1 doesn't work, try adding {{Facter.reset}} to puppet's [test helper|https://github.com/puppetlabs/puppet/blob/4772afa194402a3876069785a178611797a8eb7d/lib/puppet/test/test_helper.rb#L145-L146] This likely has to be done after the call to {{{}Puppet.runtime[:facter]{}}}. Note this code will be invoked by modules that are using puppetlabs_spec_helper.4. If neither work, just omit the call to Facter.reset entirely.5. A more complete fix is to understand why this issue affects PE modules, but not a custom module generated via pdk (see comment below).To reproduce the issue:{code}$ git clone g...@github.com:puppetlabs/puppet_enterprise_modules$ cd puppet_enterprise_modules$ git revert f8ec0e5d9234be99b3566034e921d797fb85ea43$ PUPPET_VERSION="6.26.0" bundle install --without system_tests $ cd modules/puppet_enterprise$ PUPPET_VERSION="6.26.0" bundle exec rake spec SPEC=spec/unit/facter/inventory_spec.rb...Failures:  1) inventory facts the inventory and metadata facts when setting the inventory fact wil be populated when enabled     Failure/Error: expect(Facter.value('_puppet_inventory_1')).not_to be nil            expected not # => nil                got # => nil            Compared using equal?, which compares object identity.     # ./spec/unit/facter/inventory_spec.rb:77:in `block (4 levels) in '  2) inventory facts the inventory and metadata facts when setting the metadata fact sets enabled to true if enabled     Failure/Error: expect(Facter.value('puppet_inventory_metadata')['packages']['collection_enabled']).to be true            expected true            got false     # ./spec/unit/facter/inventory_spec.rb:89:in `block (4 levels) in 'Finished in 0.16165 seconds (files took 0.97491 seconds to load)9 examples, 2 failuresFailed examples:rspec ./spec/unit/facter/inventory_spec.rb:75 # inventory facts the inventory and metadata facts when setting the inventory fact wil be populated when enabledrspec ./spec/unit/facter/inventory_spec.rb:87 # inventory facts the inventory and metadata facts when setting the 

Jira (PUP-11435) Puppet 6.26 and 7.13 may cause specs to fail

2022-02-09 Thread Josh Cooper (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Josh Cooper updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet /  PUP-11435  
 
 
  Puppet 6.26 and 7.13 may cause specs to fail   
 

  
 
 
 
 

 
Change By: 
 Josh Cooper  
 

  
 
 
 
 

 
 Commit 78246ca8d08dee770886f0940a6472c45483d627 first released in 6.26.0 and 7.13.0 speeds up rspec tests but breaks puppet-enteprise-modules due to the way {{Facter.reset}} breaks stubbing for a custom fact.[https://github.com/puppetlabs/puppet/commit/78246ca8d08dee770886f0940a6472c45483d627]This ticket is to:1. Delete the call to {{Facter.reset}} line in [https://github.com/puppetlabs/puppet/blob/4772afa194402a3876069785a178611797a8eb7d/lib/puppet/defaults.rb#L1998]2. Optional (attempt 1), try adding {{Facter.reset}} to puppet's [spec_helper.rb|https://github.com/puppetlabs/puppet/blob/4772afa194402a3876069785a178611797a8eb7d/sec/spec_helper.rb]. That way the facter search path is reset across tests, but it's only triggered when running puppet's spec tests. But not when a module runs tests and calls puppet as a library.3. Optional (attempt 2), if attempt 1 doesn't work, try adding {{Facter.reset}} to puppet's [test helper|https://github.com/puppetlabs/puppet/blob/4772afa194402a3876069785a178611797a8eb7d/lib/puppet/test/test_helper.rb#L145-L146] This likely has to be done after the call to {{{}Puppet.runtime[:facter]{}}}. Note this code will be invoked by modules that are using puppetlabs_spec_helper.4. If neither work, just omit the call to Facter.reset entirely.5. A more complete fix is to understand why this issue affects PE modules, but not a custom module generated via pdk (see comment below).To reproduce the issue:{code}$ git clone g...@github.com:puppetlabs/puppet_enterprise_modules$ cd puppet_enterprise_modules$ git revert f8ec0e5d9234be99b3566034e921d797fb85ea43$ PUPPET_VERSION="6.26.0" bundle install --without system_tests $ cd modules/puppet_enterprise$ PUPPET_VERSION="6.26.0" bundle exec rake spec SPEC=spec/unit/facter/inventory_spec.rb...Failures:  1) inventory facts the inventory and metadata facts when setting the inventory fact wil be populated when enabled     Failure/Error: expect(Facter.value('_puppet_inventory_1')).not_to be nil            expected not # => nil                got # => nil            Compared using equal?, which compares object identity.     # ./spec/unit/facter/inventory_spec.rb:77:in `block (4 levels) in '  2) inventory facts the inventory and metadata facts when setting the metadata fact sets enabled to true if enabled     Failure/Error: expect(Facter.value('puppet_inventory_metadata')['packages']['collection_enabled']).to be true            expected true            got false     # ./spec/unit/facter/inventory_spec.rb:89:in `block (4 levels) in 'Finished in 0.16165 seconds (files took 0.97491 seconds to load)9 examples, 2 failuresFailed examples:rspec ./spec/unit/facter/inventory_spec.rb:75 # inventory facts the inventory and metadata facts when setting the inventory fact wil be populated when enabledrspec ./spec/unit/facter/inventory_spec.rb:87 # inventory facts the inventory and metadata facts when setting the 

Jira (PUP-11435) Puppet 6.26 and 7.13 may cause specs to fail

2022-02-09 Thread Josh Cooper (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Josh Cooper updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet /  PUP-11435  
 
 
  Puppet 6.26 and 7.13 may cause specs to fail   
 

  
 
 
 
 

 
Change By: 
 Josh Cooper  
 

  
 
 
 
 

 
 Commit 78246ca8d08dee770886f0940a6472c45483d627 first released in 6.26.0 and 7.13.0 speeds up rspec tests but breaks puppet-enteprise-modules due to the way {{Facter.reset}} breaks stubbing for a custom fact.[https://github.com/puppetlabs/puppet/commit/78246ca8d08dee770886f0940a6472c45483d627]This ticket is to:1. Delete the call to {{Facter.reset}} line in [https://github.com/puppetlabs/puppet/blob/4772afa194402a3876069785a178611797a8eb7d/lib/puppet/defaults.rb#L1998]2. Optional (attempt 1), try adding {{Facter.reset}} to puppet's [spec_helper.rb|https://github.com/puppetlabs/puppet/blob/4772afa194402a3876069785a178611797a8eb7d/sec/spec_helper.rb]. That way the facter search path is reset across tests, but it's only triggered when running puppet's spec tests. But not when a module runs tests and calls puppet as a library.3. Optional (attempt 2), if attempt 1 doesn't work, try adding {{Facter.reset}} to puppet's [test helper|https://github.com/puppetlabs/puppet/blob/4772afa194402a3876069785a178611797a8eb7d/lib/puppet/test/test_helper.rb#L145-L146] This likely has to be done after the call to {{{}Puppet.runtime[:facter]{}}}. Note this code will be invoked by modules that are using puppetlabs_spec_helper.4. If neither work, just omit the call to Facter.reset entirely.5. A more complete fix is to understand why this issue affects PE modules, but not a custom module generated via pdk (see comment below).To reproduce the issue:{code :shell }  $ git clone g...@github.com:puppetlabs/puppet_enterprise_modules$ cd puppet_enterprise_modules$ git revert f8ec0e5d9234be99b3566034e921d797fb85ea43$ PUPPET_VERSION="6.26.0" bundle install --without system_tests $ cd modules/puppet_enterprise$ PUPPET_VERSION="6.26.0" bundle exec rake spec SPEC=spec/unit/facter/inventory_spec.rb...Failures:  1) inventory facts the inventory and metadata facts when setting the inventory fact wil be populated when enabled     Failure/Error: expect(Facter.value('_puppet_inventory_1')).not_to be nil            expected not # => nil                got # => nil            Compared using equal?, which compares object identity.     # ./spec/unit/facter/inventory_spec.rb:77:in `block (4 levels) in '  2) inventory facts the inventory and metadata facts when setting the metadata fact sets enabled to true if enabled     Failure/Error: expect(Facter.value('puppet_inventory_metadata')['packages']['collection_enabled']).to be true            expected true            got false     # ./spec/unit/facter/inventory_spec.rb:89:in `block (4 levels) in 'Finished in 0.16165 seconds (files took 0.97491 seconds to load)9 examples, 2 failuresFailed examples:rspec ./spec/unit/facter/inventory_spec.rb:75 # inventory facts the inventory and metadata facts when setting the inventory fact wil be populated when enabledrspec ./spec/unit/facter/inventory_spec.rb:87 # inventory facts the inventory and metadata facts when setting 

Jira (PUP-11435) Puppet 6.26 and 7.13 may cause specs to fail

2022-02-09 Thread Josh Cooper (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Josh Cooper updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet /  PUP-11435  
 
 
  Puppet 6.26 and 7.13 may cause specs to fail   
 

  
 
 
 
 

 
Change By: 
 Josh Cooper  
 

  
 
 
 
 

 
 Commit 78246ca8d08dee770886f0940a6472c45483d627 first released in 6.26.0 and 7.13.0 speeds up rspec tests but breaks puppet-enteprise-modules due to the way {{Facter.reset}} breaks stubbing for a custom fact.[https://github.com/puppetlabs/puppet/commit/78246ca8d08dee770886f0940a6472c45483d627]This ticket is to:1. Delete the call to {{Facter.reset}} line in [https://github.com/puppetlabs/puppet/blob/4772afa194402a3876069785a178611797a8eb7d/lib/puppet/defaults.rb#L1998]2. Optional (attempt 1), try adding {{Facter.reset}} to puppet's [spec_helper.rb|https://github.com/puppetlabs/puppet/blob/4772afa194402a3876069785a178611797a8eb7d/sec/spec_helper.rb]. That way the facter search path is reset across tests, but it's only triggered when running puppet's spec tests. But not when a module runs tests and calls puppet as a library.3. Optional (attempt 2), if attempt 1 doesn't work, try adding {{Facter.reset}} to puppet's [test helper|https://github.com/puppetlabs/puppet/blob/4772afa194402a3876069785a178611797a8eb7d/lib/puppet/test/test_helper.rb#L145-L146] This likely has to be done after the call to {{ {} Puppet.runtime[:facter] { }} } . Note this code will be invoked by modules that are using puppetlabs_spec_helper.4. If neither work, just omit the call to Facter.reset entirely.5. A more complete fix is to understand why this issue affects PE modules, but not a custom module generated via pdk (see comment below). To reproduce the issue:{code:shell}$ git clone g...@github.com:puppetlabs/puppet_enterprise_modules$ cd puppet_enterprise_modules$ git revert f8ec0e5d9234be99b3566034e921d797fb85ea43$ PUPPET_VERSION="6.26.0" bundle install --without system_tests $ cd modules/puppet_enterprise$ PUPPET_VERSION="6.26.0" bundle exec rake spec SPEC=spec/unit/facter/inventory_spec.rb...Failures:  1) inventory facts the inventory and metadata facts when setting the inventory fact wil be populated when enabled     Failure/Error: expect(Facter.value('_puppet_inventory_1')).not_to be nil            expected not # => nil                got # => nil            Compared using equal?, which compares object identity.     # ./spec/unit/facter/inventory_spec.rb:77:in `block (4 levels) in '  2) inventory facts the inventory and metadata facts when setting the metadata fact sets enabled to true if enabled     Failure/Error: expect(Facter.value('puppet_inventory_metadata')['packages']['collection_enabled']).to be true            expected true            got false     # ./spec/unit/facter/inventory_spec.rb:89:in `block (4 levels) in 'Finished in 0.16165 seconds (files took 0.97491 seconds to load)9 examples, 2 failuresFailed examples:rspec ./spec/unit/facter/inventory_spec.rb:75 # inventory facts the inventory and metadata facts when setting the inventory fact wil be populated when enabledrspec ./spec/unit/facter/inventory_spec.rb:87 # inventory facts the inventory and metadata facts when 

Jira (PUP-11435) Puppet 6.26 and 7.13 may cause specs to fail

2022-02-02 Thread Josh Cooper (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Josh Cooper updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet /  PUP-11435  
 
 
  Puppet 6.26 and 7.13 may cause specs to fail   
 

  
 
 
 
 

 
Change By: 
 Josh Cooper  
 

  
 
 
 
 

 
 Commit 78246ca8d08dee770886f0940a6472c45483d627 first released in 6.26.0 and 7.13.0 speeds up rspec tests but breaks puppet-enteprise-modules due to the way {{Facter.reset}} breaks stubbing for a custom fact. [ https://github.com/puppetlabs/puppet/commit/78246ca8d08dee770886f0940a6472c45483d627 ]This ticket is to:1. Delete the call to {{Facter.reset}} line in [https://github.com/puppetlabs/puppet/blob/4772afa194402a3876069785a178611797a8eb7d/lib/puppet/defaults.rb#L1998]2. Optional (attempt 1), try adding {{Facter.reset}} to puppet's [spec_helper.rb|https://github.com/puppetlabs/puppet/blob/4772afa194402a3876069785a178611797a8eb7d/sec/spec_helper.rb]. That way the facter search path is reset across tests, but it's only triggered when running puppet's spec tests. But not when a module runs tests and calls puppet as a library.3. Optional (attempt 2), if attempt 1 doesn't work, try adding {{Facter.reset}} to puppet's [test helper|https://github.com/puppetlabs/puppet/blob/4772afa194402a3876069785a178611797a8eb7d/lib/puppet/test/test_helper.rb#L145-L146] This likely has to be done after the call to {{Puppet.runtime[:facter]}}. Note this code will be invoked by modules that are using puppetlabs_spec_helper.4. If neither work, just omit the call to Facter.reset entirely.5. A more complete fix is to understand why this issue affects PE modules, but not a custom module generated via pdk (see comment below).  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
   

Jira (PUP-11435) Puppet 6.26 and 7.13 may cause specs to fail

2022-02-02 Thread Josh Cooper (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Josh Cooper updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet /  PUP-11435  
 
 
  Puppet 6.26 and 7.13 may cause specs to fail   
 

  
 
 
 
 

 
Change By: 
 Josh Cooper  
 
 
Fix Version/s: 
 PUP 7.15.0  
 
 
Fix Version/s: 
 PUP 6.27.0  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v8.20.2#820002-sha1:829506d)  
 
 

 
   
 

  
 

  
 

   





-- 
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.432469.164315863.6948.1643820540121%40Atlassian.JIRA.


Jira (PUP-11435) Puppet 6.26 and 7.13 may cause specs to fail

2022-02-02 Thread Josh Cooper (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Josh Cooper updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet /  PUP-11435  
 
 
  Puppet 6.26 and 7.13 may cause specs to fail   
 

  
 
 
 
 

 
Change By: 
 Josh Cooper  
 
 
Story Points: 
 1  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v8.20.2#820002-sha1:829506d)  
 
 

 
   
 

  
 

  
 

   





-- 
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.432469.164315863.6945.1643820480139%40Atlassian.JIRA.


Jira (PUP-11435) Puppet 6.26 and 7.13 may cause specs to fail

2022-02-02 Thread Nirupama Mantha (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Nirupama Mantha updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet /  PUP-11435  
 
 
  Puppet 6.26 and 7.13 may cause specs to fail   
 

  
 
 
 
 

 
Change By: 
 Nirupama Mantha  
 
 
Sprint: 
 Phoenix 2022-02-16  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v8.20.2#820002-sha1:829506d)  
 
 

 
   
 

  
 

  
 

   





-- 
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.432469.164315863.6942.1643820420109%40Atlassian.JIRA.


Jira (PUP-11435) Puppet 6.26 and 7.13 may cause specs to fail

2022-01-31 Thread Josh Cooper (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Josh Cooper commented on  PUP-11435  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Puppet 6.26 and 7.13 may cause specs to fail   
 

  
 
 
 
 

 
 Interestingly, pdk has a command to generate a new custom fact and related unit test. The pdk automatically adds a Facter.clear in a "before each":  
 
 
 
 
 # frozen_string_literal: true  
 
 
    
 
 
 require 'spec_helper'  
 
 
 require 'facter'  
 
 
 require 'facter/foo'  
 
 
    
 
 
 describe :foo, type: :fact do  
 
 
   subject(:fact) \{ Facter.fact(:foo) }  
 
 
    
 
 
   before :each do  
 
 
     # perform any action that should be run before every test  
 
 
     Facter.clear  
 
 
   end  
 
 
 end
  

Jira (PUP-11435) Puppet 6.26 and 7.13 may cause specs to fail

2022-01-31 Thread Josh Cooper (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Josh Cooper updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet /  PUP-11435  
 
 
  Puppet 6.26 and 7.13 may cause specs to fail   
 

  
 
 
 
 

 
Change By: 
 Josh Cooper  
 
 
Team: 
 Phoenix  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v8.20.2#820002-sha1:829506d)  
 
 

 
   
 

  
 

  
 

   





-- 
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.432469.164315863.4577.1643662380029%40Atlassian.JIRA.


Jira (PUP-11435) Puppet 6.26 and 7.13 may cause specs to fail

2022-01-26 Thread Nick Burgan (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Nick Burgan updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet /  PUP-11435  
 
 
  Puppet 6.26 and 7.13 may cause specs to fail   
 

  
 
 
 
 

 
Change By: 
 Nick Burgan  
 
 
Summary: 
 Puppet 6.26 and 7.13 maycause specs to fail  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v8.20.2#820002-sha1:829506d)  
 
 

 
   
 

  
 

  
 

   





-- 
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.432469.164315863.2119.1643236800133%40Atlassian.JIRA.