Jira (PUP-11435) Puppet 6.26 and 7.13 may

7 views
Skip to first unread message

Josh Cooper (Jira)

unread,
Jan 25, 2022, 7:58:02 PM1/25/22
to puppe...@googlegroups.com
Josh Cooper created an issue
 
Puppet / Bug PUP-11435
Puppet 6.26 and 7.13 may
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2022/01/25 4:57 PM
Priority: Normal Normal
Reporter: 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.

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

Nick Burgan (Jira)

unread,
Jan 26, 2022, 5:15:01 PM1/26/22
to puppe...@googlegroups.com
Nick Burgan commented on Bug PUP-11435
 
Re: Puppet 6.26 and 7.13 may

Found more instances of this cropping up. When we want to use our own test facts, the facter.reset seems to change things to have it start reading facts from the node you are running tests on instead. For example, https://github.com/puppetlabs/puppet-enterprise-modules/blob/main/modules/pe_install/spec/hosts/monolithic_spec.rb is loading up a set of facts from rspec-puppet-facts for different OS types and doing let(:facts} to set them (https://github.com/puppetlabs/puppet-enterprise-modules/blob/main/modules/pe_install/spec/shared/contexts.rb#L11-L18).

At https://github.com/puppetlabs/puppet-enterprise-modules/blob/main/modules/pe_install/spec/hosts/monolithic_spec.rb#L267 which runs https://github.com/puppetlabs/puppet-enterprise-modules/blob/main/modules/pe_install/spec/hosts/monolithic_spec.rb#L4-L6, the first compile uses the test's facts, but the second one ends up picking up the test runner node's facts, I assume because the facter.reset happened in there somewhere.

Nick Burgan (Jira)

unread,
Jan 26, 2022, 5:40:01 PM1/26/22
to puppe...@googlegroups.com
Nick Burgan updated an issue
 
Change By: Nick Burgan
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.
Reply all
Reply to author
Forward
0 new messages