is a change of fqdn_rand to return a numeric a breaking change?

42 views
Skip to first unread message

Henrik Lindberg

unread,
Jun 4, 2015, 6:46:37 PM6/4/15
to puppe...@googlegroups.com
In ticket https://tickets.puppetlabs.com/browse/PUP-4698 it is suggested
that fqdn_rand should change its return value to be a numeric value
instead of a string since it is common to compare it to a value later
and string comparison never falls back to a numeric comparison with
future parser/puppet 4.0.0.

In a strict sense, fixing this bug is a breaking change and would have
to wait until puppet 5.0.0. OTOH, the consequence is that some may be
silently bitten because there is no error, only that logic takes a
different part because of a string compare instead of a numeric compare.

What says the people here? Is this a breaking change that has to wait
until puppet 5.0.0, or can this be done for puppet 4.x ?

- henrik
--

Visit my Blog "Puppet on the Edge"
http://puppet-on-the-edge.blogspot.se/

Jeff McCune

unread,
Jun 4, 2015, 7:11:30 PM6/4/15
to puppe...@googlegroups.com
I think it can be done for Puppet 4 provided the value doesn't change, only the representation or type.  For example if fqdn_rand on host A went from returning "5" to 5, I think that's fine, but if moves from "5" to 6 on host A then that's not OK.

With this said, I don't actually use this so please put my feedback behind anyone who relies on the behavior.

-Jeff

Erik Dalén

unread,
Jun 4, 2015, 7:28:10 PM6/4/15
to puppe...@googlegroups.com
I would see the wrong return type a a bug, so fixing it is not a API change. AFAIK something similar was done with some facts that had the wrong type between facter 2.2.x and 2.3.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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-dev/CAOXx1vFBLYJfTnYnZupJikA3fDBvOF8D2yf-szjGuefpG_X7Ug%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Daniel Dreier

unread,
Jun 4, 2015, 11:30:13 PM6/4/15
to puppe...@googlegroups.com
On Thu, Jun 4, 2015 at 3:46 PM, Henrik Lindberg <henrik....@cloudsmith.com> wrote:
In ticket https://tickets.puppetlabs.com/browse/PUP-4698 it is suggested that fqdn_rand should change its return value to be a numeric value instead of a string since it is common to compare it to a value later and string comparison never falls back to a numeric comparison with future parser/puppet 4.0.0.

In a strict sense, fixing this bug is a breaking change and would have to wait until puppet 5.0.0. OTOH, the consequence is that some may be silently bitten because there is no error, only that logic takes a different part because of a string compare instead of a numeric compare.

What says the people here? Is this a breaking change that has to wait until puppet 5.0.0, or can this be done for puppet 4.x ? 
 

Just as another data point, I did a quick review of the puppetlabs operations codebase and I'm pretty confident it won't cause problems for us. Would be good to hear from others, though.

--
Daniel Dreier
Technical Operations Engineer
GPG: BA4379FD
Reply all
Reply to author
Forward
0 new messages