Open stewartwebb opened 5 years ago
I think that makes sense, this would technically be a breaking change and would need to be done as a major release; which is perfectly ok we just want to avoid surprises for people in minor release versions. We follow semver and a major vs a minor bump indicates nothing more than there was a breaking change. It is meant to convey the safety of upgrades to the consumer. I would try to look at making the changes look something like this:
@event['check']['notification'] ||
from https://github.com/dunpyl/sensu-plugins-slack/blob/c527e90c319320c69dc786b8a7204b0c9da736fe/bin/handler-slack.rb#L91elsif
statement here in between the existing if
and else
to account for @event['check']['notification']
I think this would roughly achieve the behavior you are looking for, let me know if I am way off.
I'm trying to use a
message_template
. On upgrade from 1.0.0 to 1.1.1, some of my slack messages were "truncated". It was only showing the notification. I investigated and I think it is due to a fix in 1.1.0: https://github.com/sensu-plugins/sensu-plugins-slack/pull/25. I set thenotification
field in some my checks and in the event where it is set the handler is ignoring mymessage_template
in favour of the raw notification. I think the fix was correct but I'm not sure if the behaviour is correct?The line that I think is suspicious.
https://github.com/dunpyl/sensu-plugins-slack/blob/c527e90c319320c69dc786b8a7204b0c9da736fe/bin/handler-slack.rb#L89-L96
How the logic should work in my head is something like this: