Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Experimental lazy resource block mode #8500
Instead of instance_exec'ing the block for a resource when it is parsed in the DSL, hang the block off of the resource. When it comes time to execute an action, apply the block (and set the block to nil so it never gets reapplied). That would have the effect of lazying the entire
Flag this so it is experimental and opt-in with different scopes:
Also have the flag be usable as an opt-out should the default Chef::Config value ever get tweaked.
And I'd prefer to nuke compile/converge from orbit, but I've never come up with a solution that does away with the compile/converge phase for the outer recipe scope without being overly disruptive to the way that everyone has designed their accumulators, so I don't see that ever completely going away, even if we ever turned off compile/converge mode for custom resources. So I think we'd want this anyway.