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
Convert actions in Chef::Resource::Notification to symbols to prevent double notification #6515
Conversation
Signed-off-by: dmitrys <dmitrys@northernlight.com>
@thommay I believe CI failures are not connected to code changes. Actually, lately travis-ci runs fail and pass on the same code base sporadically. |
action.to_sym | ||
else | ||
action | ||
end |
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.
you can just call action.to_sym here. Symbol#to_sym is just a no-op
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.
That's what I first did. Then some unit tests failed because action was set to nil in some of them. So I decided to check if value of action actually supports to_sym
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.
You can use action&.to_sym
.
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.
Oh, thank you. Will do.
Signed-off-by: Dmitry Shestoperov <dmitry@shestoperov.info>
@dimsh99 can you rebase this to pull in some CI fixes we've rolled out |
@tas50 thank you. Travis tests passed. There are still some AppVeyor's failures though. |
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. |
Signed-off-by: dmitrys dmitrys@northernlight.com
Description
Prevents notifying resources twice if notifications are created with action as String and as Symbol
Issues Resolved
#6242
Check List