On Fri, 15 May 2015 at 00:59 Joshua hoblitt <j...@hoblitt.com> wrote:
> As I'm slowly updating my modules' testing boilerplate for puppet 4.x, > I've run into a couple cases of breakage that I'm unsure if they are > intentional changes in semantics or regressions. > > When introspecting on a resource and the param is undefined, an empty > string is now being returned instead of my good friend `undef`. > > I understand that '' is the same type of the param in this case but it > seems like a step backwards to have to go back to [the early days of] > comparing everything to '' instead of undef. > > ``` > $user_home = getparam(User[$user], 'home') > > $home = $user_home ? { > '' => "/home/${user}", # puppet 4.0 > undef => "/home/${user}", # puppet 3.7 > default => $user_home, > } > ``` > > It appears that classes are no longer a first class resource. > > ``` > Class['port389::admin::ssl']{ notify => > Class['port389::admin::service'] } > ``` > > ``` > Evaluation Error: Resource Override can only operate on > resources, got: Class[port389::admin::ssl]-Type at > > /home/jhoblitt/github/puppet-port389/spec/fixtures/modules/port389/manifests/admin/ssl.pp:8:3 > on node leo.tuc.noao.edu > ``` > > I confess that this is fairly unusual syntax but it does work as > expected under 3.x. > > What do you guys think? > This second issue was discussed a bit in the comments on PUP-2891: https://tickets.puppetlabs.com/browse/PUP-2891 You could work around it by using the syntax Class['port389::admin::ssl'] ~> Class['port389::admin::service'] instead which works in both 3.x and 4.x. -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-dev/CAAAzDLed0i0gpHSvV58oCvy1Nus77GBO5c0%2BcYoU601Ep3Yr%2BQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.