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

          i351654 Tom Marcuzzi created issue -
          i351654 Tom Marcuzzi made changes -
          Field Original Value New Value
          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 :
          {code:java}
          step([$class: 'InfluxDbPublisher', target: 'influx',
                customDataMap: [
                    myMeasurement: [
                      status: myStatus
                    ]
                ]
          ]){code}
           

          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 :
          {code:java}
          step([$class: 'InfluxDbPublisher', target: 'influx',
                customDataMap: [
                    myMeasurement: [
                      status: myStatus
                    ]
                ],
                customDataMapTags: [:]
          ]){code}
          I use influxdb-plugin in some jobs to publish custom data maps to an influxdb database.

          With version 1.14, I used to do :
          {code:java}
          step([$class: 'InfluxDbPublisher', target: 'influx',
                customDataMap: [
                    myMeasurement: [
                      status: myStatus
                    ]
                ]
          ]){code}
           

          But after upgrading to 1.15, this doesn't work anymore. I get the following logs in my console output:
          {code:java}
          [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.{code}
           

          I need to explicitly pass an empty customDataMapTags in order to make it work :
          {code:java}
          step([$class: 'InfluxDbPublisher', target: 'influx',
                customDataMap: [
                    myMeasurement: [
                      status: myStatus
                    ]
                ],
                customDataMapTags: [:]
          ]){code}
          aleksisimell Aleksi Simell made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          aleksisimell Aleksi Simell made changes -
          Status In Progress [ 3 ] Open [ 1 ]
          aleksisimell Aleksi Simell made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          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.
          aleksisimell Aleksi Simell made changes -
          Status In Progress [ 3 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]

            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: