summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2018-02-08 18:06:01 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2018-02-21 14:32:17 -0800
commitcb6c4beeb124629d7d0b812b3c1dbe01efaff282 (patch)
tree61ef0ddea8b807891208abada307add801952677
parentebdf5a37fa14fd3d9d039b06df5cfc10ab6d8c91 (diff)
downloadchef-cb6c4beeb124629d7d0b812b3c1dbe01efaff282.tar.gz
stop update issuing full resets every cell
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r--lib/chef/node/attribute.rb3
-rw-r--r--lib/chef/node/attribute_collections.rb7
2 files changed, 9 insertions, 1 deletions
diff --git a/lib/chef/node/attribute.rb b/lib/chef/node/attribute.rb
index 4ffc25c7af..7624a928bb 100644
--- a/lib/chef/node/attribute.rb
+++ b/lib/chef/node/attribute.rb
@@ -229,7 +229,8 @@ class Chef
end
def reset
- #puts "TOTAL RESET"
+ puts "TOTAL RESET"
+ #puts caller
@deep_merge_cache = nil
end
diff --git a/lib/chef/node/attribute_collections.rb b/lib/chef/node/attribute_collections.rb
index d74aba9f51..25e61e1693 100644
--- a/lib/chef/node/attribute_collections.rb
+++ b/lib/chef/node/attribute_collections.rb
@@ -93,6 +93,7 @@ class Chef
private
def convert_value(value, path = nil)
+ puts "CONVERT_VALUE: #{path}"
value.ensure_generated_cache! if value.respond_to?(:ensure_generated_cache!)
case value
when VividMash
@@ -184,6 +185,11 @@ class Chef
ret # rubocop:disable Lint/Void
end
+ def update(other_hash)
+ other_hash.each_pair { |key, value| regular_writer(convert_key(key), convert_value(value, __path__ + [ key ])) }
+ self
+ end
+
alias :attribute? :has_key?
def convert_key(key)
@@ -195,6 +201,7 @@ class Chef
# AttrArray for consistency and to ensure that the added parts of the
# attribute tree will have the correct cache invalidation behavior.
def convert_value(value, path = nil)
+ puts "CONVERT_VALUE: #{path}"
value.ensure_generated_cache! if value.respond_to?(:ensure_generated_cache!)
case value
when VividMash