<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/ruby-gems/chef.git/spec/unit/node, branch php</title>
<subtitle>github.com: opscode/chef.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ruby-gems/chef.git/'/>
<entry>
<title>Revert "Per-container deep merge caching"</title>
<updated>2018-02-23T19:20:50+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2018-02-23T19:20:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=c60c5009e887e650c747581f90b6c68dfae44234'/>
<id>c60c5009e887e650c747581f90b6c68dfae44234</id>
<content type='text'>
This reverts commit 0c29acc106ca774e230c8ef45694c8bffd166b69.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 0c29acc106ca774e230c8ef45694c8bffd166b69.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "remove more debugging and revert no-longer necessary fix"</title>
<updated>2018-02-23T19:09:04+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2018-02-23T19:09:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=00f35ace0da4920ce93f0aa6883b55010136166e'/>
<id>00f35ace0da4920ce93f0aa6883b55010136166e</id>
<content type='text'>
This reverts commit 80b9d0448d9fb01a7188cbee6c9595bf0cf5b974.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 80b9d0448d9fb01a7188cbee6c9595bf0cf5b974.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "fix node assignment of ImmutableArrays to VividMashes/AttrArrays"</title>
<updated>2018-02-23T19:07:05+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2018-02-23T19:07:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=87079d5014b331da6d55125a2d91c283c395a038'/>
<id>87079d5014b331da6d55125a2d91c283c395a038</id>
<content type='text'>
This reverts commit e56f8d58b80334256085907961aac9ca9f56f125.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit e56f8d58b80334256085907961aac9ca9f56f125.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix node assignment of ImmutableArrays to VividMashes/AttrArrays</title>
<updated>2018-01-25T20:52:13+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2018-01-25T20:52:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=e56f8d58b80334256085907961aac9ca9f56f125'/>
<id>e56f8d58b80334256085907961aac9ca9f56f125</id>
<content type='text'>
node.default['foo'] = node['bar'] need to have node['bar'] have its
cache vivified otherwise we potentially get an empty hash or array.

in the case of hashes, the assignment must have been walking though
the values with #each or something which poked the cache on the target
hash which caused it to vivify, so this bug only affected Arrays
where the AttrArray initializer likely did a quick-n-dirty copy of
the internal structure of the ImmutableArray which was empty.

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
node.default['foo'] = node['bar'] need to have node['bar'] have its
cache vivified otherwise we potentially get an empty hash or array.

in the case of hashes, the assignment must have been walking though
the values with #each or something which poked the cache on the target
hash which caused it to vivify, so this bug only affected Arrays
where the AttrArray initializer likely did a quick-n-dirty copy of
the internal structure of the ImmutableArray which was empty.

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>update immutable API blacklist and whitelist</title>
<updated>2018-01-23T21:18:51+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2018-01-23T21:18:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=cffc809bc20f14d85bd4403e25a9d8793864d7b0'/>
<id>cffc809bc20f14d85bd4403e25a9d8793864d7b0</id>
<content type='text'>
adds the whitelist so that when we update to new ruby versions it forces
us to audit the new Array and Hash methods and figure out if they are
mutators or not.

this change closes the Hash#store loophole that was being abused by
some cookbook consumers to directly modify merged ImmutableHashes
(producing inherently undefined behavior that we 'broke' at one
point).

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
adds the whitelist so that when we update to new ruby versions it forces
us to audit the new Array and Hash methods and figure out if they are
mutators or not.

this change closes the Hash#store loophole that was being abused by
some cookbook consumers to directly modify merged ImmutableHashes
(producing inherently undefined behavior that we 'broke' at one
point).

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>prepping for rubocop 0.52.1</title>
<updated>2018-01-17T21:34:18+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2018-01-17T21:34:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=746562d6358c27b838c95ea27b2a2bd82c03cefe'/>
<id>746562d6358c27b838c95ea27b2a2bd82c03cefe</id>
<content type='text'>
Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>remove more debugging and revert no-longer necessary fix</title>
<updated>2017-12-06T20:44:06+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2017-10-25T17:58:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=80b9d0448d9fb01a7188cbee6c9595bf0cf5b974'/>
<id>80b9d0448d9fb01a7188cbee6c9595bf0cf5b974</id>
<content type='text'>
Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Per-container deep merge caching</title>
<updated>2017-12-06T20:44:05+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2017-10-09T16:54:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=0c29acc106ca774e230c8ef45694c8bffd166b69'/>
<id>0c29acc106ca774e230c8ef45694c8bffd166b69</id>
<content type='text'>
Replaces the one-big top level deep merge cache with individual deep
merge caches in every container.  The Immutable container state becomes
the deep merge cache.

- Does not use a pure decorator style approach since that failed before
because of ruby internals breaking things like `===` and `=~` on
decorated objects, so we inherit (ultimately from Hash + Array).
- The state being the container state is useful in ruby since APIs on
Hash and Array poke around in internal state to make things fast.  If
we inherit from Hash/Array but don't have the correct internal state
things go wonky.
- Throwing away the internal state is equivalent to flushing the cache.
- Since we throw away all linked objects when we do that, we flush at
every level below the level being flushed (which is correct semantics).
- If a user has a pointer to an old immutable object from a sub-level,
that isn't mutated so the old object still contains the old view of
the data (which I think is correct, although I have some doubts that
its necessary, but it came along free for the ride).
- When we reset the cache we do mutate the cache being reset, which
might change data in held references.  If this becomes an issue the fix would
be to reset the cache at the level above by creating a new, "empty"
ImmutableHash/ImmutableArray object and inserting it into the
deep_merge_cache datastructure instead of clearing the internal state
of the child object.  I don't know practically how anyone would hit
this, though, so would prefer to wait on doing that work until we see
an actual bug report.
- Because of the way ruby pokes around internally there's some
weirdnesses like the pre-generation of the cache for all the values of
a subarray when #each is called, which is due to the way that ruby
walks through array-serialized hashes when called like:
`Array#each { key, value| ... }` (which is an undocumented(?) thing
in ruby).

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replaces the one-big top level deep merge cache with individual deep
merge caches in every container.  The Immutable container state becomes
the deep merge cache.

- Does not use a pure decorator style approach since that failed before
because of ruby internals breaking things like `===` and `=~` on
decorated objects, so we inherit (ultimately from Hash + Array).
- The state being the container state is useful in ruby since APIs on
Hash and Array poke around in internal state to make things fast.  If
we inherit from Hash/Array but don't have the correct internal state
things go wonky.
- Throwing away the internal state is equivalent to flushing the cache.
- Since we throw away all linked objects when we do that, we flush at
every level below the level being flushed (which is correct semantics).
- If a user has a pointer to an old immutable object from a sub-level,
that isn't mutated so the old object still contains the old view of
the data (which I think is correct, although I have some doubts that
its necessary, but it came along free for the ride).
- When we reset the cache we do mutate the cache being reset, which
might change data in held references.  If this becomes an issue the fix would
be to reset the cache at the level above by creating a new, "empty"
ImmutableHash/ImmutableArray object and inserting it into the
deep_merge_cache datastructure instead of clearing the internal state
of the child object.  I don't know practically how anyone would hit
this, though, so would prefer to wait on doing that work until we see
an actual bug report.
- Because of the way ruby pokes around internally there's some
weirdnesses like the pre-generation of the cache for all the values of
a subarray when #each is called, which is due to the way that ruby
walks through array-serialized hashes when called like:
`Array#each { key, value| ... }` (which is an undocumented(?) thing
in ruby).

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>missing spec fix</title>
<updated>2017-08-28T21:05:46+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2017-08-28T21:05:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=a556a6d04efdba1d4e5b94f41d6118e179c341df'/>
<id>a556a6d04efdba1d4e5b94f41d6118e179c341df</id>
<content type='text'>
Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>speed up immutabilization</title>
<updated>2017-08-28T20:06:51+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2017-08-28T20:06:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=128ffdd40823a877b3063856a9f107d4264e7b6a'/>
<id>128ffdd40823a877b3063856a9f107d4264e7b6a</id>
<content type='text'>
since we only inject Mash/VividMashes do not convert

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
since we only inject Mash/VividMashes do not convert

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
