Rundeck: NotificationPlugin not receiving correct state for Job-Reference steps on fail or success

Created on 30 Aug 2018  路  4Comments  路  Source: rundeck/rundeck

Describe the bug
Seemingly related to Issue #3791. While using a Groovy Slack notification plugin: https://github.com/bdclark/rundeck-slack-notification, notifications for succeeded or failed job-reference step executions have a status of "Started" even though they have completed.

My Rundeck detail

  • Rundeck version: Rundeck 3.0.5-20180828
  • install type: deb
  • OS Name/version: ubuntu 16.04

To Reproduce
Steps to reproduce the behavior:

  1. Install the https://github.com/bdclark/rundeck-slack-notification plugin
  2. Configure a webhook to receive slack messages from the plugin
  3. Run a job which contains steps that are references to other jobs
  4. See "Started" slack messages in the channel after the job reference steps have completed and message should read "Failed" or "Succeeded".

Expected behavior
After the change related to #3791 I would expect to see a success/failed status for each job reference step and not just once the parent job has completed.

Screenshots
I modified the plugin Groovy script to print the execution state that the plugin receives during an onfailure event to be the following:

  onfailure { Map executionData, Map configuration ->
    System.out.println("ON FAIL EXECUTION MAP: "+executionData)
      triggerMessage(executionData, configuration, 'danger')
      true
  }

See in this screenshot that the onfailure event is received but the status within the execution details passed into the plugin lists the state as running

screen shot 2018-08-30 at 1 51 15 pm

Desktop (please complete the following information):

  • OS: MacOS
  • Browser: Chrome
bug

All 4 comments

Hello,
The same issue appears in:

  • Rundeck version: Rundeck 3.0.6-20180917
  • install type: rpm
  • OS Name/version: CentOS 7.5.1804

I can confirm I am seeing the same behavior with https://github.com/higanworks/rundeck-slack-incoming-webhook-plugin

Besided the wrong status, it appears dateEnded, failedNodeListString or succeededNodeListString are missing as well. This used to work with RD 2.x. Thanks for looking into this.

p.s.: I've tried looking into the code but it's quite a lot to process :-)

Also to add - this is occurring for a simple job with no job references. Using the MinimalNotificationPlugin.groovy from https://rundeck.org/docs/developer/notification-plugin.html#example

We get the following logged on a success:

success: data [id:1641, href:https://localhost:4443/project/demo/execution/follow/1641, status:running, user:rdadmin, dateStarted:2018-10-24 11:29:00.053, dateStartedUnixtime:1540380540053, dateStartedW3c:2018-10-24T11:29:00Z, description:, argstring:null, project:Excalibur, failedNodeListString:null, failedNodeList:null, succeededNodeListString:null, succeededNodeList:null, loglevel:INFO, abortedby:null, nodestatus:[succeeded:0, failed:0, total:0],...

And similar for failure notifications

Notice that the status is showing as running

  • Rundeck version: Rundeck 3.0.7-20181008
  • install type: rpm
  • OS Name/version: CentOS 7.5.1804

I have added a Pull request with a proposed fix for this issue.

Was this page helpful?
0 / 5 - 0 ratings