Skip to content
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

Merged
merged 1 commit into from
Sep 24, 2019

Conversation

alexjfisher
Copy link
Member

DO NOT MERGE. Just looking for feedback and/or alternative suggestions.

@alexjfisher
Copy link
Member Author

Or we could wait for https://tickets.puppetlabs.com/browse/PDK-1438
Not sure how practical that will be. Perhaps someone at Puppet Inc is going to be keeping all the fact sets updated more regularly than currently happens.

@@ -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'
Copy link
Member Author

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.

Copy link
Member

@ekohl ekohl left a 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 👍

@alexjfisher
Copy link
Member Author

@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.

@Dan33l
Copy link
Member

Dan33l commented Sep 20, 2019

Even if distribution packagers can make different choices, following something near matrix version of puppet/facter that uses Puppet Inc. LGTM.
And the picked versions looks reasonable IMO.

@alexjfisher alexjfisher changed the title RFC: Default facter version based on puppet major version RFC: Use 3.9 as default facterlib facts version Sep 20, 2019
@alexjfisher alexjfisher changed the title RFC: Use 3.9 as default facterlib facts version Use 3.9 as default facterlib facts version Sep 24, 2019
moduleroot/spec/spec_helper.rb.erb Outdated Show resolved Hide resolved
An environment variable lets you override this as required.
A module can also override `facterdb_facts_version` in `.sync.yml`
@alexjfisher alexjfisher merged commit 17f763d into voxpupuli:master Sep 24, 2019
@alexjfisher
Copy link
Member Author

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.
See voxpupuli/rspec-puppet-facts#100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants