forked from puppetlabs/puppetlabs-registry
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Registry keys and values were autorequiring all ancestors
Previously, registry keys and values were including all of their ancestors in the array returned by the `autorequire` block. If the catalog contained those resources, then puppet was creating one dependency edge between the registry key/value and each ancestor. This is not desirable, as we only need one dependency edges between the resource and its nearest ancestor that we're managing. Also, registry values were autorequiring themselves. This commit changes the autorequire blocks using the same logic as is used in the file type. We walk our ancestors, looking for the nearest registry_key that we're managing. It also changes the `ascend` method to exclude the current resource from enumeration, since both registry_key and registry_value had to do extra work to exclude itself from the autorequire. Also removed a spurious downcase method. Currently, we only canonicalize the root key (to handled mixed case). A future commit will resolve case-insensitivity for registry key paths and value path and names.
- Loading branch information
1 parent
92b1c40
commit 0de7a0a
Showing
4 changed files
with
13 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters