Issue #8778 has been updated by Reid Vandewiele. Status changed from Closed to Re-opened
A conversation on IRC just led to a couple of users noticing this change in relation to the [puppetlabs/apt](https://github.com/puppetlabs/puppetlabs-apt) module and the [rtyler/jenkins](https://github.com/rtyler/puppet-jenkins) module. It turns out the `$release` parameter is handled in `apt::source` dependent on whether or not the `$release` is equal to `undef`. The point was brought up that while the patch is intended as a bug fix, it introduces a change in behavior that will affect existing modules and users. Specifically, the rtyler/jenkins module ceases no longer fully functional under 2.7.15, whereas it was fully functional under previous patch versions. This example demonstrates that users currently rely on the existing behavior. Given the above, my understanding of [semver](http://semver.org/) suggests that 3.x would be the place to introduce this change, not the 2.7.x series. In 3.x I think it would be better to see the problem resolved in the inverse way - making "" never be considered equal to undef by case/selector/if - the direction in which it appeared things were moving in comment [9](#note-9). Thoughts? ---------------------------------------- Bug #8778: Equality in Puppet is not commutative https://projects.puppetlabs.com/issues/8778#change-63332 Author: Jeff McCune Status: Re-opened Priority: Normal Assignee: Daniel Pittman Category: parser Target version: 2.7.15 Affected Puppet version: Keywords: parser commutative undef empty string Branch: https://github.com/puppetlabs/puppet/pull/727 # Overview # The equality (`==`) test in Puppet is not commutative in combination with the undef value. All three notices should print OR only "undef == undef" should print. Two notices should NOT print. <pre> if undef == undef { notice("undef == undef") } if undef == '' { notice("undef == ''") } if '' == undef { notice("'' == undef") } </pre> # Actual Behavior # Notice that undef == '' but not '' == undef. <pre> notice: Scope(Class[main]): undef == undef notice: Scope(Class[main]): undef == '' notice: Finished catalog run in 0.02 seconds </pre> -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" 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-bugs?hl=en.
