-
Notifications
You must be signed in to change notification settings - Fork 71
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
Use 3.9 as default facterlib facts version #589
Conversation
Or we could wait for https://tickets.puppetlabs.com/browse/PDK-1438 |
moduleroot/spec/spec_helper.rb.erb
Outdated
@@ -62,6 +62,12 @@ RSpec.configure do |c| | |||
c.hiera_config = <%= @configs['hiera_config'] %> | |||
|
|||
<%- end -%> | |||
case Puppet.version | |||
when %r{^5} | |||
c.default_facter_version = '3.9' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Random-ish version chosen here. It shipped with Puppet 5.2 and 5.3. It's the only 3.X version of facter with any archlinux facts in facterlib.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nicer if puppetlabs_spec_helper would do this but IIRC that doesn't have rspec-puppet-facts
as a dependency so 👍
@ekohl I picked the 2 versions to use semi-randomly. Do you think they're reasonable choices? Given that not everyone uses AIO packages, there's no perfect answer. Maybe just a single default would have been fine too. |
Even if distribution packagers can make different choices, following something near matrix version of puppet/facter that uses Puppet Inc. LGTM. |
f5cbf16
to
e654a1f
Compare
e654a1f
to
0442658
Compare
An environment variable lets you override this as required. A module can also override `facterdb_facts_version` in `.sync.yml`
0442658
to
d50f6b3
Compare
This has actually proved a little problematic. If facterdb doesn't contain 3.9 facts for all OSes in metadata.json, rspec-puppet-facts hangs. Discovered by @bastelfreak in the ipset module. |
DO NOT MERGE. Just looking for feedback and/or alternative suggestions.