Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-51389

Publishing customDataMap to influxdb fails after update from 1.14 to 1.15

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: influxdb-plugin
    • Labels:
      None
    • Environment:
      Jenkins version 2.107.3
      Influxdb-plugin version 1.15
    • Similar Issues:

      Description

      I use influxdb-plugin in some jobs to publish custom data maps to an influxdb database.

      With version 1.14, I used to do :

      step([$class: 'InfluxDbPublisher', target: 'influx',
            customDataMap: [
                myMeasurement: [ 
                  status: myStatus
                ]
            ]
      ])

       

      But after upgrading to 1.15, this doesn't work anymore. I get the following logs in my console output:

      [InfluxDB Plugin] Publishing data to: [url=******, description=influx, username=******, password=*****, database=myDb]
      [InfluxDB Plugin] Custom data map found. Writing to InfluxDB...
      [InfluxDB Plugin] Failed to collect data. Ignoring Exception:java.lang.NullPointerException
      [InfluxDB Plugin] Completed.

       

      I need to explicitly pass an empty customDataMapTags in order to make it work :

      step([$class: 'InfluxDbPublisher', target: 'influx',
            customDataMap: [
                myMeasurement: [ 
                  status: myStatus
                ]
            ],
            customDataMapTags: [:]
      ])

        Attachments

          Activity

          Hide
          aleksisimell Aleksi Simell added a comment -

          Added a check to see if customdatamaps are null.

          Show
          aleksisimell Aleksi Simell added a comment - Added a check to see if customdatamaps are null.

            People

            Assignee:
            aleksisimell Aleksi Simell
            Reporter:
            i351654 Tom Marcuzzi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: