-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
POC: Add include_legacy_facts
setting
#53
base: main
Are you sure you want to change the base?
Conversation
b2f1bb1
to
00a23cc
Compare
When set to false (the default for Puppet 8+), all legacy facts are pruned before the catalog is compiled.
00a23cc
to
1338e03
Compare
If this is the right direction, I should also incorporate @ekohl 's comment original made here. voxpupuli/rspec-puppet-facts#143 (comment) |
Hey @alexjfisher, im looking at this and I think I understand the what, but not entirely the why. Is the aim here to remove legacy facts from spec files in modules? Simply removing and not replacing nor warning sounds like it would break things for the sake of breaking. Can you give me an example of use case? |
The assumption we made was that in Puppet 8 you didn't have access to legacy facts at all, so if you could test on Puppet 7 how it would look like in the future then you could prepare your manifests. Now it looks like you do have legacy facts available it's probably not as useful. |
Really? Is this something that's being back tracked on? From the Puppet 8 release notes... "Legacy facts are no longer collected on Puppet agent or sent to Puppet server. This saves network bandwidth and reduces Puppetserver's memory footprint when using templates. Since legacy facts are not available during compilation, they cannot be referenced in Puppet code, ERB/EPP templates or Hiera configuration." |
I think Josh mentioned that they are available in the catalog compilation, but I think this is really confusing. IMHO Puppet should have made sure module authors can test their configurations and the use of rspec-puppet together with rspec-puppet-facts is really common. That this wasn't solved prior to Puppet 8's release is a failure because it may mean tests are now unreliable. |
Yes, I said "Puppet 7 agents should still be able to resolve legacy facts during catalog application" This is because Puppet 7 agents send modern and legacy facts to the compiler when requesting a catalog. In Puppet 8, agents only send modern facts (by default based on the
We documented how to identify modules relying on legacy facts in https://github.com/puppetlabs/puppet/wiki/Puppet-8-Compatibility#legacy-facts using the |
When set to false (the default for Puppet 8+), all legacy facts are pruned before the catalog is compiled.