Issue #5517 has been updated by John Bollinger.
Luke Kanies wrote: > You're right that it's basically impossible to escape pathological cases. > > I think we can get fantastically close by switching to lazy on-demand > evaluation and then at least throwing a warning if someone tries to override > a class that's already been evaluated, though. I think it's a harder problem than you appreciate, and that it's not just pathological cases that will prove difficult. If you have it working before PuppetConf 2013 such that 1. all variable references that are currently allowed continue to be allowed and to evaluate to the same values that they do in Puppet 3.0.2 and earlier, while at the same time 1. class parameter overrides succeed reliably in a sufficient majority of cases to satisfy those clamoring for the feature, in such a way that 1. whether a particular override will work or not is predictable by unaided human analysis of the manifest set in reasonable time then I will buy you the beverage of your choice at PC2013. Supposing I'm there, which I hope to be. And yes, the challenge contains some weasel words -- my challenge, my rules. ---------------------------------------- Bug #5517: behavior change within 2.6 makes it impossible to override class parameters of "included" parametrized classes https://projects.puppetlabs.com/issues/5517#change-83721 Author: Peter Meier Status: Accepted Priority: High Assignee: eric sorenson Category: language Target version: 3.x Affected Puppet version: 3.0.2 Keywords: parameterized_classes Branch: In 2.6.1 the following recipe: <pre> class a( $b_c = { 'b' => 'foo' } ) { notice $a::b_c if $a::b_c { notice $a::b_c['b'] } } class b { class{'a': b_c => false } } class b::c inherits b { Class['a']{ b_c => { 'b' => 'bleh' } } } class b::d { include ::b::c } include b::d </pre> produces the following output: <pre> $ puppet foo.pp notice: Scope(Class[A]): bbleh notice: Scope(Class[A]): bleh </pre> Which is what I expected. However with 2.6.3 it produces the following output: <pre> # puppet foo.pp notice: Scope(Class[A]): false </pre> Imho likely the changes for #4778 and #5074 are responsible for that behavior change. However this makes it impossible to overwrite parameters of a "included" parametrized class in a subclass. There are only ugly workarounds for that problem and I think this should actually work as it did within 2.6.1. Otherwise the usefulness of parametrized classes is quite reduced. -- 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 unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/puppet-bugs?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
