- From: Noah Kantrowitz <
>
- To: Chef Dev <
>
- Subject: [chef-dev] What is Resource#declared_key?
- Date: Tue, 15 Sep 2015 16:44:06 -0700
So I've been digging through the notifications code and found a weird
pattern:
https://github.com/chef/chef/blob/master/lib/chef/run_context.rb#L178-L182
That "if is resource use .name else use .declared_key" is repeated in a bunch
of notification methods, and as far as I can tell it is pure cruft. Does
anyone remember what that was supposed to be for? declared_key itself is a
method on Resource, so I'm pretty sure the else branch can't ever succeed.
Nothing outside of the the notification code seems to use declared_key, so
I'm pretty sure we can just delete all of this. If no one has a good reason
for this to exist I'll make a PR to nuke it.
--Noah
Attachment:
signature.asc
Description: Message signed with OpenPGP using GPGMail
- [chef-dev] What is Resource#declared_key?, Noah Kantrowitz, 09/15/2015
Archive powered by MHonArc 2.6.16.