Skip to content
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

Feature/facter 2/fact 65 add default aggregate, freeze chunks #606

Closed
wants to merge 10 commits into from
Closed

Feature/facter 2/fact 65 add default aggregate, freeze chunks #606

wants to merge 10 commits into from

Conversation

adrienthebo
Copy link

This pull request refines the behavior of aggregate resolutions in two ways.

The first change is that chunk values will be frozen after they are evaluated. This means that when one chunk inspects another chunk, it cannot accidentally modify the already evaluated data.

The second change adds a default aggregate action for aggregate resolutions. The default aggregate action assumes that all resolved chunks will be data structures that can be deeply merged, so that people don't need to redefine this behavior every time.

This pull request is based on GH-605 and should be merged after that.

The Facter::Util::Resolution class contained behavior for determining if
a resolution was suitable, the precedence of the resolution, code for
safely resolving values, and code for actually resolving information.
This commit breaks up the Resolution class into a Suitable mixin for
determining if a resolution can run and the precedence of that
resolution, and a Resolvable mixin for handling behavior around the
resolution of a given fact.
Before this commit, errors occurred while evaluating an aggregate
resolution would be rescued and logged, which could mask problems and
cause more failures later. This commit removes the error handling so
that evaluations fail early.
@puppetcla
Copy link

CLA signed by all contributors.

@adrienthebo adrienthebo deleted the feature/facter-2/fact-65-default-aggregate branch January 21, 2014 21:40
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.

2 participants