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

build_result/oridinal doesn't seem to be reliable

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • influxdb-plugin
    • None

      I'm finding this metric to be slightly unreliable.  It seems to flip between SUCCESS and ?.  For the oridinal I seem to only ever get 0 or 5.

      I'm not sure 100% sure, but the unreliable data seems to come from pipeline builds, running something from a cmd script for example seems ok.

      Key part of the code appears to be:

      // Build is not finished when running with pipelines. Set build status as unknown and ordinal
      // as something not predefined
      String result;
      int ordinal;
      Result buildResult = build.getResult();
      if (buildResult == null) {
         result = "?";
         ordinal = 5;
      } else {
         result = buildResult.toString();
         ordinal = buildResult.ordinal;
      }
      

      Inside jenkinsci.plugins.influxdb.generators.JenkinsBasePointGenerator.

      Does it mean we cannot get reliable metrics on a pipeline based job?

       

            aleksisimell Aleksi Simell
            richardcole Richard Cole
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: