[puppetlabs/puppet] 378b65: (PUP-3351) Evaluate ENC classes in the correct ord...

0 views
Skip to first unread message

GitHub

unread,
Oct 3, 2014, 4:11:02 PM10/3/14
to puppet-...@googlegroups.com, puppet...@googlegroups.com
Branch: refs/heads/stable
Home: https://github.com/puppetlabs/puppet
Commit: 378b656d9de32b644c16e0e3f3e6aefd45af4304
https://github.com/puppetlabs/puppet/commit/378b656d9de32b644c16e0e3f3e6aefd45af4304
Author: Jeff McCune <je...@puppetlabs.com>
Date: 2014-10-03 (Fri, 03 Oct 2014)

Changed paths:
M lib/puppet/parser/compiler.rb
M spec/unit/parser/compiler_spec.rb

Log Message:
-----------
(PUP-3351) Evaluate ENC classes in the correct order

Without this patch classes declared from an ENC are evaluated in the
wrong order. This is a problem because classes declared without
parameters are evaluated prior to classes with parameters which causes
an Error: Duplicate declaration when the classes with parameters are
evaluated. According to the code comments for the
`evaluate_node_classes` method, the expected behavior is that classes
with an empty set of parameters will not conflict with classes that have
declared parameters.


Commit: b62ec8c7d1c3f7c6a34e804f0c568275e77a2aa4
https://github.com/puppetlabs/puppet/commit/b62ec8c7d1c3f7c6a34e804f0c568275e77a2aa4
Author: Andrew Parker <an...@puppetlabs.com>
Date: 2014-10-03 (Fri, 03 Oct 2014)

Changed paths:
M lib/puppet/parser/compiler.rb
M spec/unit/parser/compiler_spec.rb

Log Message:
-----------
(PUP-3351) Test using example of problematic behavior

After talking with Reid Vandewiele, it turns out that the problematic
behavior isn't directly the order of the classes themselves. Previous
assertions that there are possible conflicts from the classes when they
were done in one order or another are incorrect. The classes, when any
have parameters, are kept by the node in a hash keyed off of the class
name, which means that there is no possibility of them creating a
duplicate resource error.

The actual usecase comes down to *how* parameterized classes vs
unparameterized classes are often used. A parameterized class can often
be simply a set of shared data that the unparameterized classes depend
on (or inherit from) parameterized classes.

This modifies the test case for the reordering change to provide an
example of the use case here.


Commit: e19552a098258daab0894befcb8d7ef73a60e715
https://github.com/puppetlabs/puppet/commit/e19552a098258daab0894befcb8d7ef73a60e715
Author: Andrew Parker <an...@puppetlabs.com>
Date: 2014-10-03 (Fri, 03 Oct 2014)

Changed paths:
M lib/puppet/parser/compiler.rb
M spec/unit/parser/compiler_spec.rb

Log Message:
-----------
Merge branch 'pr/3126' into stable

* pr/3126:
(PUP-3351) Test using example of problematic behavior
(PUP-3351) Evaluate ENC classes in the correct order

Closes GH-3126


Compare: https://github.com/puppetlabs/puppet/compare/766cce7ff953...e19552a09825
Reply all
Reply to author
Forward
0 new messages