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

Setting build status to FAILURE for new error when errors were fixed

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      It seems the functionality to mark builds as failed for "new errors" uses the total number of errors in the new result data, rather than the delta of errors.
      Currently, if one of two errors is fixed, the build will be marked as failed with a new error threshold of 1.

      Noticed with new error threshold of 1,
      having 6 errors,
      then checking in a new build with the result of 4 errors and 26 style warnings.
      > [Cppcheck] Setting build status to FAILURE since total number of new errors exceeds the threshold value '1'.

      Jenkins 1.554.1, CPPCheck plugin 1.16

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Michal Turek
            Path:
            src/main/java/org/jenkinsci/plugins/cppcheck/util/CppcheckBuildResultEvaluator.java
            http://jenkins-ci.org/commit/cppcheck-plugin/cb4e2040c7a92ac16f8fca293d8e19f313b96fcc
            Log:
            JENKINS-23185 Setting build status to FAILURE for new error when errors were fixed

            • CppcheckBuildResultEvaluator.isErrorCountExceeded() used comparison count > threshold but users expect count >= threshold.
            • For example the threshold had to be set to 0 to change build status on 1 new issue. Setting 1 in threshold configuration to detect 1 issue is much better.
            • Information in build log extended to contain also the value that exceeded the threshold. Word "errors" replaced by "issues".
            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Michal Turek Path: src/main/java/org/jenkinsci/plugins/cppcheck/util/CppcheckBuildResultEvaluator.java http://jenkins-ci.org/commit/cppcheck-plugin/cb4e2040c7a92ac16f8fca293d8e19f313b96fcc Log: JENKINS-23185 Setting build status to FAILURE for new error when errors were fixed CppcheckBuildResultEvaluator.isErrorCountExceeded() used comparison count > threshold but users expect count >= threshold. For example the threshold had to be set to 0 to change build status on 1 new issue. Setting 1 in threshold configuration to detect 1 issue is much better. Information in build log extended to contain also the value that exceeded the threshold. Word "errors" replaced by "issues".
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Michal Turek
            Path:
            src/main/java/org/jenkinsci/plugins/cppcheck/util/CppcheckBuildResultEvaluator.java
            http://jenkins-ci.org/commit/cppcheck-plugin/87401a045be16953d82178c189ddff52d5154407
            Log:
            Merge pull request #20 from mixalturek/master

            JENKINS-23185 Setting build status to FAILURE for new error when error...

            Compare: https://github.com/jenkinsci/cppcheck-plugin/compare/a49002550cbd...87401a045be1

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Michal Turek Path: src/main/java/org/jenkinsci/plugins/cppcheck/util/CppcheckBuildResultEvaluator.java http://jenkins-ci.org/commit/cppcheck-plugin/87401a045be16953d82178c189ddff52d5154407 Log: Merge pull request #20 from mixalturek/master JENKINS-23185 Setting build status to FAILURE for new error when error... Compare: https://github.com/jenkinsci/cppcheck-plugin/compare/a49002550cbd...87401a045be1
            Hide
            mixalturek Michal Turek added a comment -

            Fixed, will be released in version 1.19.

            Show
            mixalturek Michal Turek added a comment - Fixed, will be released in version 1.19.
            Hide
            jk Jan Klass added a comment -

            Thank you very much Michal!

            Show
            jk Jan Klass added a comment - Thank you very much Michal!
            Hide
            mixalturek Michal Turek added a comment -

            You are welcome

            Show
            mixalturek Michal Turek added a comment - You are welcome

              People

              • Assignee:
                mixalturek Michal Turek
                Reporter:
                jk Jan Klass
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: