-
Notifications
You must be signed in to change notification settings - Fork 140
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
feat: lazy timer commands #242
feat: lazy timer commands #242
Conversation
Before this commit, it was not possible to lazily declare an fb_timers entry that utilized a node attribute inside the command. After this commit, specifying a Proc for `command` or entries in `commands` will cause fb_timers to evaluate the proc when rendering the service template.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is definitely the preferred way to do these things.
Thanks @jaymzh! I think the |
yeah kitchen tests have been broken a while, and no one has had time to go fix them. @joshuamiller01 or @dafyddcrosby or someone will pull this in internally to run against extra internal tests and then merge if there's no issues. |
Cherry-pick of facebook#242.
@dafyddcrosby has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Test Plan: Ran Chef, confirmed no timer changes seen Differential Revision: D65891069 fbshipit-source-id: 0ef9be602dc170682fd228c0e916a4038996fe28
Merged in 183ef44 |
Before this commit, it was not possible to lazily declare an
fb_timers
entry that utilized a node attribute inside the command.After this commit, specifying a
Proc
forcommand
or entries incommands
will causefb_timers
to evaluate the proc when rendering the service template.This is related to #233. I can't exactly recall where we landed on whether it was acceptable to add
Proc
support to cookbooks, but this particular example has come up enough times that I feel that it's worth enabling.(I couldn't run these tests locally, so I might need to iterate a bit if I made a mistake)