• Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • analysis-core-plugin
    • None
    • Jenkins 2.107.1 LTS
    • 5.0.0-beta2

      Jenkins uses a trend graph to display things like failed unit tests or compilation warnings as a function of build number. Recommend an option to suppress only the first build OR to limit the height of the y-axis.
       
      Potential workflow

      • create a copy of a Jenkins job for your particular branch
      • Build the branch without changes. This gives a baseline for the # of warnings in the code (it has very old code, so there are a LOT)
      • The branch then automatically builds daily. New warnings introduced by the developer show up in the Trend Graph.

      The Trend Graph is configured to show only new or fixed warnings.
      The problem is that the 1st build introduces a ton of "new" warnings. This pushes the +Y-axis max value to >1000. Any warnings fixed/introduced after that are not visible.

      Solution
      If we could somehow suppress showing just that first build, while still showing all subsequent builds, this would be fixed. Alternatively, if the +Y-axis could be limited to show numbers from 0-100, this would be fixed.
       
      The first option may be easier to implement. For people who want existing functionality, you could add a checkbox in "Configure the trend graph":
      Option: Suppress reference build
      Description: If set warnings for the reference build are not displayed as 'new' for the graph type 'Distribution of new and fixed warnings'.
       
      Or you could change the default and make the current behavior optional, which probably makes more sense:
      Option: Display reference build
       

          [JENKINS-50551] Trend Graph: Suppress First, Reference Build

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          src/main/java/io/jenkins/plugins/analysis/core/model/AnalysisResult.java
          http://jenkins-ci.org/commit/analysis-core-plugin/48bfcde2ea562a70149efe576f4ba8292009c22c
          Log:
          [FIXED JENKINS-50551] The first build should not produce new issues.

          *NOTE:* This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

          Functionality will be removed from GitHub.com on January 31st, 2019.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: src/main/java/io/jenkins/plugins/analysis/core/model/AnalysisResult.java http://jenkins-ci.org/commit/analysis-core-plugin/48bfcde2ea562a70149efe576f4ba8292009c22c Log: [FIXED JENKINS-50551] The first build should not produce new issues. * NOTE: * This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/ Functionality will be removed from GitHub.com on January 31st, 2019.

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          src/test/java/io/jenkins/plugins/analysis/warnings/IssuesRecorderITest.java
          http://jenkins-ci.org/commit/warnings-plugin/a4cb31a6e67ab189b6b94eb1441f5e0944804bd3
          Log:
          [FIXED JENKINS-50551] The first build should not produce new issues.

          *NOTE:* This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

          Functionality will be removed from GitHub.com on January 31st, 2019.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: src/test/java/io/jenkins/plugins/analysis/warnings/IssuesRecorderITest.java http://jenkins-ci.org/commit/warnings-plugin/a4cb31a6e67ab189b6b94eb1441f5e0944804bd3 Log: [FIXED JENKINS-50551] The first build should not produce new issues. * NOTE: * This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/ Functionality will be removed from GitHub.com on January 31st, 2019.

          Ulli Hafner added a comment -

          Released in 5.0.0-beta2.

          Ulli Hafner added a comment - Released in 5.0.0-beta2.

            drulli Ulli Hafner
            tcdjenkins tcdan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: