>> So I've been trying to work on Facter version pinning for the next >> release of Puppet, based on a discussion with Daniel - it was deemed >> we might want to pin Telly -> Facter 2.0. > > > Will Facter be semantic versioned and does the 2.0.0 version (it won't be > 2.0) mean it won't be backwards compatible with Facter 1.6?
Yes - it will be version 2.0.0. The requirement from Daniel was to draw a line in the sand here (with features like structured facts) and mark for semantic versioning purposes. >> But quite frankly its horrible - and obviously requires one to include >> the check at multiple points. This would in most cases be a nightmare >> for face developers as well, as they would have to make their own >> decision about weither they require Facter. > > > Seems like it should just be in puppet.rb or maybe puppet/facter.rb to > abstract it. > > You should expect that simply loading Facter (or any library) isn't > expensive at all. If it is expensive then Facter likely is doing the wrong > thing, like loading facts or what not. Well - the problem isn't expense, its duplicate code. > https://github.com/kbarber/puppet/blob/master/lib/puppet.rb ? And yes - I got it working now - the problem I had earlier when I tried this, was that Puppet.err wasn't initialised at that point so I was getting zero text on stdout during failure, which is probably why I moved it into those different places some weeks ago. But now I took a second glance, by simply raising an exception in the feature instead it works a treat: https://github.com/kbarber/puppet/commit/938f7c92713529555e63f78393b56a52750aa79d#L6R22 So now I get: [ken@kb puppet]# ./bin/puppet apply -e 'notice("asdf")' Failed to load feature test for facter: Facter 2.0.0 or greater required for Puppet to operate [ken@kb puppet]# (error message could probably be more informative about the version it _did_ find though :-) So yes - I think you are right :-). puppet.rb seems perfect for it and I was hoping it would be, but I was stuck on ordering & logging, but this is probably a reasonable alternative. Thanks man - your a bloody champ :-). I'm going to obviously do more testing with differing entry points in the daylight hours but for now I'm much much happier with this direction :-). ken. -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.
