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

Mark build as stable/unstable if there are no new warning compared to the last stable/unstable build.

    Details

    • Similar Issues:

      Description

      When setting the new threshold to 1, if there are new warnings, the plugin marks the build as failure. If the next build will not have any new warnings (even without any change to any file) the status will be change back because the last new warnings are not consider new anymore.
      There is another option to set the total threshold. The problem with this way is that whenever a warning is fixed, someone will need to change this threshold manually.

      Comparing the total number of warnings with the total number of warnings in the last stable/unstable build might not be enough because someone can commit a change which will fix a warning but will add a new one.

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in hudson
            User: : drulli
            Path:
            trunk/hudson/plugins/analysis-collector/src/main/java/hudson/plugins/analysis/collector/AnalysisPublisher.java
            trunk/hudson/plugins/analysis-core/src/main/java/hudson/plugins/analysis/core/BuildResultEvaluator.java
            trunk/hudson/plugins/analysis-core/src/main/java/hudson/plugins/analysis/core/HealthAwarePublisher.java
            trunk/hudson/plugins/analysis-core/src/main/resources/util/thresholds.jelly
            trunk/hudson/plugins/checkstyle/src/main/java/hudson/plugins/checkstyle/CheckStylePublisher.java
            trunk/hudson/plugins/dry/src/main/java/hudson/plugins/dry/DryPublisher.java
            trunk/hudson/plugins/findbugs/plugin/src/main/java/hudson/plugins/findbugs/FindBugsPublisher.java
            trunk/hudson/plugins/pmd/src/main/java/hudson/plugins/pmd/PmdPublisher.java
            trunk/hudson/plugins/tasks/src/main/java/hudson/plugins/tasks/TasksPublisher.java
            trunk/hudson/plugins/warnings/.classpath
            trunk/hudson/plugins/warnings/.settings/org.maven.ide.eclipse.prefs
            trunk/hudson/plugins/warnings/src/main/java/hudson/plugins/warnings/WarningsPublisher.java
            http://jenkins-ci.org/commit/28482
            Log:
            JENKINS-5147: Added new property to use the delta rather than the set difference of the annotations to compute the number of new warnings.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : drulli Path: trunk/hudson/plugins/analysis-collector/src/main/java/hudson/plugins/analysis/collector/AnalysisPublisher.java trunk/hudson/plugins/analysis-core/src/main/java/hudson/plugins/analysis/core/BuildResultEvaluator.java trunk/hudson/plugins/analysis-core/src/main/java/hudson/plugins/analysis/core/HealthAwarePublisher.java trunk/hudson/plugins/analysis-core/src/main/resources/util/thresholds.jelly trunk/hudson/plugins/checkstyle/src/main/java/hudson/plugins/checkstyle/CheckStylePublisher.java trunk/hudson/plugins/dry/src/main/java/hudson/plugins/dry/DryPublisher.java trunk/hudson/plugins/findbugs/plugin/src/main/java/hudson/plugins/findbugs/FindBugsPublisher.java trunk/hudson/plugins/pmd/src/main/java/hudson/plugins/pmd/PmdPublisher.java trunk/hudson/plugins/tasks/src/main/java/hudson/plugins/tasks/TasksPublisher.java trunk/hudson/plugins/warnings/.classpath trunk/hudson/plugins/warnings/.settings/org.maven.ide.eclipse.prefs trunk/hudson/plugins/warnings/src/main/java/hudson/plugins/warnings/WarningsPublisher.java http://jenkins-ci.org/commit/28482 Log: JENKINS-5147 : Added new property to use the delta rather than the set difference of the annotations to compute the number of new warnings.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in hudson
            User: : drulli
            Path:
            trunk/hudson/plugins/analysis-core/src/main/java/hudson/plugins/analysis/core/HealthAwarePublisher.java
            trunk/hudson/plugins/analysis-core/src/main/resources/util/thresholds.jelly
            trunk/hudson/plugins/analysis-core/src/main/resources/util/thresholds.properties
            trunk/hudson/plugins/analysis-core/src/main/resources/util/thresholds_de.properties
            trunk/hudson/plugins/analysis-test/src/main/java/hudson/plugins/analysis/test/BuildResultTest.java
            http://jenkins-ci.org/commit/28519
            Log:
            [FIXED JENKINS-5147]: Improved documentation of useDeltaValues field.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : drulli Path: trunk/hudson/plugins/analysis-core/src/main/java/hudson/plugins/analysis/core/HealthAwarePublisher.java trunk/hudson/plugins/analysis-core/src/main/resources/util/thresholds.jelly trunk/hudson/plugins/analysis-core/src/main/resources/util/thresholds.properties trunk/hudson/plugins/analysis-core/src/main/resources/util/thresholds_de.properties trunk/hudson/plugins/analysis-test/src/main/java/hudson/plugins/analysis/test/BuildResultTest.java http://jenkins-ci.org/commit/28519 Log: [FIXED JENKINS-5147] : Improved documentation of useDeltaValues field.
            Hide
            myron0815 Myron0815 added a comment -

            hmmm.. i have some problems/question with this implementation:

            > use delta for new warnings:
            > If set then the number of new warnings is calculated by subtracting the total number of warnings of the current build from the reference build

            I have 9 unstable builds in my history, and 1 very old successful one (Hudson seems to keep the last successful build forever)
            Regardless of the changes, the "new warnings" seem always calculated from the old successful build.
            So i deleted that one, and now my new warnings dropped to zero; correctly calculating from last unstable build

            So is there some priority in getting the reference build?
            Whats the definition for reference build? (i expected always the last one as reference)
            Is this a bug or a feature i miss to understand?!

            Show
            myron0815 Myron0815 added a comment - hmmm.. i have some problems/question with this implementation: > use delta for new warnings: > If set then the number of new warnings is calculated by subtracting the total number of warnings of the current build from the reference build I have 9 unstable builds in my history, and 1 very old successful one (Hudson seems to keep the last successful build forever) Regardless of the changes, the "new warnings" seem always calculated from the old successful build. So i deleted that one, and now my new warnings dropped to zero; correctly calculating from last unstable build So is there some priority in getting the reference build? Whats the definition for reference build? (i expected always the last one as reference) Is this a bug or a feature i miss to understand?!
            Hide
            drulli Ulli Hafner added a comment -

            The reference build is the last build that has a plugin-status of success. I don't have the code here right now so I don't know how I implemented the fallback if there is no such build.

            Show
            drulli Ulli Hafner added a comment - The reference build is the last build that has a plugin-status of success. I don't have the code here right now so I don't know how I implemented the fallback if there is no such build.
            Hide
            myron0815 Myron0815 added a comment - - edited

            wrote some b/s... rethinking my issue
            seems to work

            .

            Nevertheless, thanks for your hard work on these nice plugins - much appreciated

            Show
            myron0815 Myron0815 added a comment - - edited wrote some b/s... rethinking my issue seems to work . Nevertheless, thanks for your hard work on these nice plugins - much appreciated

              People

              • Assignee:
                drulli Ulli Hafner
                Reporter:
                shimik shimik
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: