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

project_name tag set incorrectly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • influxdb-plugin
    • None
    • Operating System: Windows 7
      Oracle JRE - 1.8.0_201
      Jenkins - 2.164.2
      InfluxDB plugin - 1.17
      Chrome web browser
    • 1.23

      Since upgrading from InfluxDB plugin version 1.14 to 1.17 the jenkins_data measurement is now prefixing the project_name tag with an underscore.  From a quick look at the source code it appears that when the "replaceDashWithUnderscore" parameter is false (which is the default) then the code assumes you must have a custom prefix and prepends the project_name tag with customPrefix + "_".  If your Jenkins job doesn't have a custom prefix you end up with an underscore prefixed to the project name.  Looks like the code needs to be changed to something like:

       

      String projectTagName;

      if (this.replaceDashWithUnderscore)

      {             projectTagName = renderedProjectName;        }

      else if (customPrefix != null)

      {             projectTagName = customPrefix + "_" + build.getParent().getName();        }

      else

      {         projectTagName = build.getParent().getName();        }

       

            aleksisimell Aleksi Simell
            mandyjprescott Mandy Prescott-Courville
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: