Skip to content

Empty values cause errors and notifications are not sent #3

@joelsdc

Description

@joelsdc

Hi,

After updating to rundeck to v3.0.8 I've noticed we are not receiving slack notifications any more.

I found this error in the logs:

2018-10-30 12:02:37.088 ERROR --- [pool-1-thread-1] rundeck.services.NotificationService     : Error sending notificat
ion: Notification{eventTrigger='onfailure', type='SlackNotification', content='{"additionalText":"","channel":"","title":"${job.Status} [${job.project}] ${job.fullName} run by ${job.username} (#${job.execid})","color":"","optionFields":
"","_includeFailedNodes":""}'}: class java.lang.NullPointerException: Cannot invoke method replaceAll() on null object

I added a quick condition to check for null, and then came up with this error:

2018-10-30 16:35:12.448 ERROR --- [eduler_Worker-1] rundeck.services.NotificationService     : Error sending notificat
ion: Notification{eventTrigger='onsuccess', type='SlackNotification', content='{"channel":"","optionFields":"","additionalText":"","color":"","title":"${job.Status} [${job.project}] ${job.fullName} run by ${job.username} (#${job.execid}
)","_includeFailedNodes":""}'}: class java.lang.NullPointerException: Cannot invoke method tokenize() on null object

Added another condition and I have slack notifications again.

I have no idea of groovy or how the plugin works, I just applied basic logic, so my workaround can be completely wrong.

Let me know what you think!

Thanks!!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions