<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/ruby-gems/chef.git/lib/chef/runner.rb, branch https</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>Remove copyright dates</title>
<updated>2020-04-13T22:47:17+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2020-04-13T22:21:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=4d3b847aee1b917bb139862c623e9633d180fb31'/>
<id>4d3b847aee1b917bb139862c623e9633d180fb31</id>
<content type='text'>
Legally incredibly dubious, particularly since we don't follow it
strictly as policy, and we have git history instead, which does it right.
This is just a waste of time and a cargo cult.

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Legally incredibly dubious, particularly since we don't follow it
strictly as policy, and we have git history instead, which does it right.
This is just a waste of time and a cargo cult.

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix typo</title>
<updated>2020-04-06T17:16:26+00:00</updated>
<author>
<name>Vivek Singh</name>
<email>vivek.singh@msystechnologies.com</email>
</author>
<published>2020-04-06T16:44:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=a1bf06c753173ac698d9329a09c6edba6c18c781'/>
<id>a1bf06c753173ac698d9329a09c6edba6c18c781</id>
<content type='text'>
Signed-off-by: Vivek Singh &lt;vivek.singh@msystechnologies.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Vivek Singh &lt;vivek.singh@msystechnologies.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>remove debugging</title>
<updated>2019-08-13T21:44:32+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2019-08-13T21:44:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=cd32e8e600bd2ee48de9d9032bac5726635033df'/>
<id>cd32e8e600bd2ee48de9d9032bac5726635033df</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>Add unified_mode switch for resources</title>
<updated>2019-08-12T18:29:16+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2019-06-18T04:07:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=35a63ddc192e50c45f6e94a3b270ed0e75c93668'/>
<id>35a63ddc192e50c45f6e94a3b270ed0e75c93668</id>
<content type='text'>
This is inspired by "use_inline_resources".

Setting `unified_mode false` in a resource would be the existing
behavior with separate compile/converge phases.

Setting `unified_mode true` in a resource will eliminate the converge
phase.  Reverse notifications and delayed notifications will still
fire.  The resource action will behave like all resources are executing
at compile time.

As a aside, notifications have never worked for resources firing at
compile time.  This implementation gets that behavior correct so
that notifications will work.

Of course forward immediate notifications to resources not yet declared will not
be possible.

Setting `resource_unified_mode_default true` in `Chef::Config` would
turn off the split compile/converge mode for every custom resource.

NOTE: This does not affect recipe mode at all.

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is inspired by "use_inline_resources".

Setting `unified_mode false` in a resource would be the existing
behavior with separate compile/converge phases.

Setting `unified_mode true` in a resource will eliminate the converge
phase.  Reverse notifications and delayed notifications will still
fire.  The resource action will behave like all resources are executing
at compile time.

As a aside, notifications have never worked for resources firing at
compile time.  This implementation gets that behavior correct so
that notifications will work.

Of course forward immediate notifications to resources not yet declared will not
be possible.

Setting `resource_unified_mode_default true` in `Chef::Config` would
turn off the split compile/converge mode for every custom resource.

NOTE: This does not affect recipe mode at all.

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Style/SymbolProc</title>
<updated>2019-07-05T20:26:53+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2019-07-05T20:26:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=3b10f9ca503dcbce747241281b9151d3d010f9ef'/>
<id>3b10f9ca503dcbce747241281b9151d3d010f9ef</id>
<content type='text'>
enforce pretzels.

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
enforce pretzels.

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Style/ClassCheck</title>
<updated>2019-07-05T19:57:40+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2019-07-05T19:03:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=8215091264d67d81f0da9a13f968b864ff736cb2'/>
<id>8215091264d67d81f0da9a13f968b864ff736cb2</id>
<content type='text'>
convert kind_of? to is_a?

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
convert kind_of? to is_a?

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Convert require to require_relative</title>
<updated>2019-05-09T00:03:26+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2019-05-09T00:03:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=bc7687e56763cedbd010cfd566aa2fc0c53bb194'/>
<id>bc7687e56763cedbd010cfd566aa2fc0c53bb194</id>
<content type='text'>
This gives a speed boost since rubygems does not have to scan through
every gem in the gemset in order to find the file.

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This gives a speed boost since rubygems does not have to scan through
every gem in the gemset in order to find the file.

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Extract Action Collection from Data Collector</title>
<updated>2019-03-11T18:49:31+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2019-03-11T18:49:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=66015ba654469f4dacfd78d40b02aafee52bbf1b'/>
<id>66015ba654469f4dacfd78d40b02aafee52bbf1b</id>
<content type='text'>
See the PR for details on this change.

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
See the PR for details on this change.

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>add a pointer from the run_context back to the runner</title>
<updated>2017-04-20T16:40:31+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2017-04-20T16:40:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=d23b24b021364784ca79317c42d8f4028a9d7253'/>
<id>d23b24b021364784ca79317c42d8f4028a9d7253</id>
<content type='text'>
because surfing through Objectspace makes kittens cry

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
because surfing through Objectspace makes kittens cry

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Make notifications recursive.</title>
<updated>2016-04-04T18:04:03+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2016-04-04T17:45:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=0ca27b6f30ccd327505bd3a44bd319fb3eba956b'/>
<id>0ca27b6f30ccd327505bd3a44bd319fb3eba956b</id>
<content type='text'>
This is similar to poise's approach but has a few differences.

Similarly to poise, the base behavior of notifications and find() and
lookup() on the resource collection is changed to be 'recursive' and
to search in outer contexts for resources and will return them by
default.

There are find_local() and lookup_local() methods added to allow for
bypassing the recursion and making sure to throw exceptions if the
current run_context does not have any matching resources.

The CHEF-3694 resource cloning code has been modified to call the
lookup_local() API and not to be recursive because we believe that
nobody in their right mind would want that behavior (and resource
cloning should eventually be removed).  So the behavior of resource
cloning should remain unchanged.

The behavior of delayed notifications to resources outside of the current
run_context is slightly different than what Poise has been implementing.
The delayed notification will run in the run_context of the resource
that is being notified.  I think Poise tends to bubble up to the nextmost
wrapping resource context (as opposed to Poise's subcontext_block or
notifying_block contexts).  This code I think is conceptually simpler to
reason about, and I think it gets the use case right where if you're
notifying a service resource in the outermost run_context from within
multiple wrapping resources that it correctly bubbles out to the
outermost run context and will notify with all the other delayed
notifications at the end of the chef client run.

Another useful feature of the delayed notification behavior is that if
we do implement notifying_block or subcontext_block that each block can
get its own delayed notification run and any resources that are inside
of that block can run in the delayed notification phase of that block
(while still being able to notify resources outside of the block and
having those delayed notifications run in the receiving resources
run_context).  This will let us implement an often-requested feature for
having "notifications delayed to the end of a block/recipe" instead of
having to do all notifications absolutely immediately or delayed to the
end of the chef run.

This code also cleans up the object model a little bit.  All of the
state about notification collection is now hanging off of the
run_context -- the delayed_actions have been moved from the Chef::Runner
to the Chef::RunContext.  Hanging it off of the Chef::Runner would have
been very difficult to 'target' from other run_context's without adding
a pointer back from the RunContext to the Runner and that feels like the
wrong object model.  The RunContext is now responsible for all of its
notification state, while the Runner is responsible for wiring up
the notifications across different run_contexts.

Note that it will not be possible to send a notification to a
run_context which has already been converged.  That seems to make sense
to me and the search API on the resource collection does not support
returning resources from run_contexts that are children, only parents
(and we don't actually hold onto pointers to child run_contexts and
they may be garbage collected).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is similar to poise's approach but has a few differences.

Similarly to poise, the base behavior of notifications and find() and
lookup() on the resource collection is changed to be 'recursive' and
to search in outer contexts for resources and will return them by
default.

There are find_local() and lookup_local() methods added to allow for
bypassing the recursion and making sure to throw exceptions if the
current run_context does not have any matching resources.

The CHEF-3694 resource cloning code has been modified to call the
lookup_local() API and not to be recursive because we believe that
nobody in their right mind would want that behavior (and resource
cloning should eventually be removed).  So the behavior of resource
cloning should remain unchanged.

The behavior of delayed notifications to resources outside of the current
run_context is slightly different than what Poise has been implementing.
The delayed notification will run in the run_context of the resource
that is being notified.  I think Poise tends to bubble up to the nextmost
wrapping resource context (as opposed to Poise's subcontext_block or
notifying_block contexts).  This code I think is conceptually simpler to
reason about, and I think it gets the use case right where if you're
notifying a service resource in the outermost run_context from within
multiple wrapping resources that it correctly bubbles out to the
outermost run context and will notify with all the other delayed
notifications at the end of the chef client run.

Another useful feature of the delayed notification behavior is that if
we do implement notifying_block or subcontext_block that each block can
get its own delayed notification run and any resources that are inside
of that block can run in the delayed notification phase of that block
(while still being able to notify resources outside of the block and
having those delayed notifications run in the receiving resources
run_context).  This will let us implement an often-requested feature for
having "notifications delayed to the end of a block/recipe" instead of
having to do all notifications absolutely immediately or delayed to the
end of the chef run.

This code also cleans up the object model a little bit.  All of the
state about notification collection is now hanging off of the
run_context -- the delayed_actions have been moved from the Chef::Runner
to the Chef::RunContext.  Hanging it off of the Chef::Runner would have
been very difficult to 'target' from other run_context's without adding
a pointer back from the RunContext to the Runner and that feels like the
wrong object model.  The RunContext is now responsible for all of its
notification state, while the Runner is responsible for wiring up
the notifications across different run_contexts.

Note that it will not be possible to send a notification to a
run_context which has already been converged.  That seems to make sense
to me and the search API on the resource collection does not support
returning resources from run_contexts that are children, only parents
(and we don't actually hold onto pointers to child run_contexts and
they may be garbage collected).
</pre>
</div>
</content>
</entry>
</feed>
