Skip to content

(maint) Use same prioritizer throughout catalog #2739

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

zaphod42
Copy link
Contributor

@zaphod42 zaphod42 commented Jun 4, 2014

Under normal system runs, there wasn't any problem with the prioritizer being
used, since the Puppet::Resource::Catalog created it and passed to all of the
correct places. However, the testing methods in PuppetSpec::Compiler ended up
lying to the user about the prioritizer that could be used. The prioritizer
that was passed in was not the one actually used by the catalog for
constructing the relationship graph. This was because the
Puppet::Parser::Catalog used the one it had internally. The answer is to have
the Puppet::Parser::Catalog act as one possible factory of prioritizers, and
pass the prioritizer around as it needs it. This allows the tests to then
pass in the correct prioritizer and use it consistently throughout.

Under normal system runs, there wasn't any problem with the prioritizer
being used, since the Puppet::Resource::Catalog created it and passed to
all of the correct places. However, the testing methods in
PuppetSpec::Compiler ended up lying to the user about the prioritizer
that could be used. The prioritizer that was passed in was not the one
actually used by the catalog for constructing the relationship graph.
This was because the Puppet::Parser::Catalog used the one it had
internally. The answer is to have the Puppet::Parser::Catalog act as one
possible factory of prioritizers, and pass the prioritizer around as it
needs it. This allows the tests to then pass in the correct prioritizer
and use it consistently throughout.
@puppetcla
Copy link

CLA signed by all contributors.

jpartlow added a commit that referenced this pull request Jun 5, 2014
…-to-be-used-in-tests

(maint) Use same prioritizer throughout catalog
@jpartlow jpartlow merged commit be96256 into puppetlabs:stable Jun 5, 2014
@jpartlow jpartlow deleted the maint/stable/allow-prioritizer-to-be-used-in-tests branch June 5, 2014 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants