New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lazy doesn't work with 'action' attribute #3615
Comments
Action is not actually an attribute, but 👍 for this being supported anyway. |
Forgive me if my commentary may seem ignorant I am new to both Chef and Ruby Encountered this issue as well recently, at first glance my naive assumption was that I could modify action in chef/lib/chef/resource.rb to pass arg through set_or_return would unwind the DelayedEvaluator as I assumed is the purpose in other resource definition that accept lazy such as chef/lib/chef/resource/template.rb variables. Then pass it to the rest of the function code but that @docwhat what version/commit are you running? |
This was in chef 12.4.0. |
Fixes chef#3615 Addressed by checking the action param of self.action for Resource for a response to :call. If found, action.call.to_sym is used instead of the original action.to_sym which doesn't work on a proc.
This is still true today with version 15.1.36. |
Their CLA nonsense prevented me from getting the fix merged. We just have it in our base cookbook. Since this issue was created, chef has basically become the red headed step child of devops. We still use actively, but vendors like IBM and their own stepchild, redhat back the "declarative" modalities stating that IT people are too stupid to write actual code (seriously). Meanwhile no corp wants to sign that cla mess either, pay for silly addons only needed because the platform can't be expanded with these functions via FOSS, meaning so many community fixes and improvements don't hit master. In the history books of comp sci, chef will be a sad allegory about the lawyers leading the horse to a desert in search of water for fear of rain. |
@sempervictus is there a way to implement it via a gem which would extends Chef? @lamont-granquist why did you closed that issue? |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This recipe code doesn't work:
The code in the
{}
is just random code for the example. I know it is useless.I expected it to work, but instead I get:
The text was updated successfully, but these errors were encountered: