(GH-137) Load Puppet Custom Types, Defined Types and Classes via Puppet API v4 #138
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Builds on #126 - Merged
Fixes #137
Now that there is a puppetstrings feature flag, we can change the loading
behaviour of the Custom Types to use the newer loader and Puppet Strings
metadata evaluation. This commit;
Adds Custom Types ('type') ability to the retrieve_via_puppet_strings method
Custom Types loading isn't fully implemented like Puppet Functions are, in
particular there's no use of the Smart Paths, and the loader still uses the
old autoload methods. To work around this a new loader is created, which is
based on the the NullLoader. It's purpose is to only support the needed
discover_path method, however as it's a NullLoader, it won't actually load
anything if it's called by Puppet.
This loader calls the old autoloader using the same logic we used previously
but surfaced via the loader.
Just like the previous loading mechanism, the whit and component types are
ignored.
The Puppet Strings helper is updated to support reading the type data from
Puppet Strings. Note that class documentation is now available whereas
in the current iteration of the sidecar it is not.
The integration tests were updated to test for the new information and that
the data can be cached correctly.
Now that there is a puppetstrings feature flag, we can change the loading
behaviour of Puppet Classes and Defined Types to use the newer loader and
Puppet Strings metadata evaluation. This commit;
for the information. This is because there's no type name in the loaders
which suits our needs. By using such a strict name we can be sure that the
default loaders will just ignore it.
manifests in the environment.
Puppet Strings. Note that class documentation is now available whereas
in the current iteration of the sidecar it is not.
the data can be cached correctly.