diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2019-03-06 18:50:29 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2019-03-07 10:39:47 -0800 |
commit | 2bc5a4f177d9218d7910a62061693cbcceac3579 (patch) | |
tree | 3c5bf7710b7170fe3593b8831326c7fa3ded28f6 | |
parent | b59f217715ed4e77c72c04cb22929ed9e5759e7d (diff) | |
download | chef-2bc5a4f177d9218d7910a62061693cbcceac3579.tar.gz |
reorder
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r-- | docs/dev/action_collection.md | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/docs/dev/action_collection.md b/docs/dev/action_collection.md index 649e5113c0..fb0566c865 100644 --- a/docs/dev/action_collection.md +++ b/docs/dev/action_collection.md @@ -44,6 +44,14 @@ it is created, so registration may be accomplished easily: Chef.run_context.action_collection.register(self) ``` +## Action Collection Requires Registration + +If one of the prior methods is not used to register for the action collection, then the action collection will disable itself and will not compile +the action collection in order to not waste the memory overhead of tracking the actions during the run. The Data Collector takes advantage of this +since if the run start message from the Data Collector is refused by the server, then the Data Collector disables itself, and then does not register +with the Action Collection, which would disable the Action Collection. This makes use of the delayed hooking through the `action_collection_regsitration` +so that the Data Collector never registers itself after it is disabled. + ## Searching There is a function `filtered_collection` which returns "slices" off of the `ActionCollection` object. The `max_nesting` argument can be used to prune @@ -64,14 +72,6 @@ As the action collection API was initially designed around the resource reporter and could easily lift some of the searching features on the name of the resource from the resource collection, and could use a more fluent API for composing searches. -## Action Collection Requires Registration - -If one of the prior methods is not used to register for the action collection, then the action collection will disable itself and will not compile -the action collection in order to not waste the memory overhead of tracking the actions during the run. The Data Collector takes advantage of this -since if the run start message from the Data Collector is refused by the server, then the Data Collector disables itself, and then does not register -with the Action Collection, which would disable the Action Collection. This makes use of the delayed hooking through the `action_collection_regsitration` -so that the Data Collector never registers itself after it is disabled. - # Implementation Details ## Resource Event Lifecycle Hooks @@ -96,3 +96,4 @@ the resource collection. This list will be necessarily incomplete of any unprocessed sub-resources in custom resources, since the run was aborted before those resources executed actions and built their own sub-resource collections. +This was a design requirement of the data collector. |