summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2017-03-15 11:09:59 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2017-03-15 11:10:44 -0700
commit9d1b12a0df3769dfa2806a89f32cd0a27ce24d58 (patch)
tree0eaa21b9239c15f3aed9bf9bc3a6068c9a13c865
parent8530d59fc4fdf3f0afe44a968abf331741083986 (diff)
downloadchef-9d1b12a0df3769dfa2806a89f32cd0a27ce24d58.tar.gz
[ci skip] add missing relnotes for Node deep-duping
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r--RELEASE_NOTES.md17
1 files changed, 17 insertions, 0 deletions
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index 7d5baaac2f..676b658068 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -65,3 +65,20 @@ Dropped the `create_if_missing` parameter that was immediately supplanted by the
this) and converted the `created_at` parameter from an optional positional parameter to a named parameter. These changes are unlikely
to affect any cookbook code.
+### Node deep-duping fixes
+
+The `node.to_hash`/`node.to_h` and `node.dup` APIs have been fixed so that they correctly deep-dup the node data structure including every
+string value. This results in a mutable copy of the immutable merged node structure. This is correct behavior, but is now more expensive
+and may break some poor code (which would have been buggy and difficult to follow code with odd side effects before).
+
+For example:
+
+```
+node.default["foo"] = "fizz"
+n = node.to_hash # or node.dup
+n["foo"] << "buzz"
+```
+
+before this would have mutated the original string in-place so that `node["foo"]` and `node.default["foo"]` would have changed to "fizzbuzz"
+while now they remain "fizz" and only the mutable `n["foo"]` copy is changed to "fizzbuzz".
+