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

Violations plugin reports its own failures as build failures

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major Major
    • violations-plugin
    • None

      Violations will cause a build to be marked as failed due to build configuration problems - for example if the coverage.py HTML path is empty or incorrect, the build will inaccurately be reported as failing and spam innocent committers. It should be marked as aborted or some other state indicating that the tests actually passed but there was something wrong within the Jenkins environment.

      ERROR: failed to find coverage HTML reports
      Build step 'Publish coverage.py HTML reports' changed build result to FAILURE
      

          [JENKINS-12645] Violations plugin reports its own failures as build failures

          acdha added a comment - - edited

          I found a more annoying variant when something when wrong parsing our JSLint output:

          ERROR: Publisher hudson.plugins.violations.ViolationsPublisher aborted due to exception
          java.io.EOFException: input contained no data
          	at org.xmlpull.mxp1.MXParser.fillBuf(MXParser.java:3003)
          	at org.xmlpull.mxp1.MXParser.more(MXParser.java:3046)
          	at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1410)
          	at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395)
          	at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)
          	at hudson.plugins.violations.parse.AbstractParser.expectNextTag(AbstractParser.java:262)
          	at hudson.plugins.violations.types.jslint.JsLintParser.execute(JsLintParser.java:25)
          	at hudson.plugins.violations.parse.AbstractTypeParser.parse(AbstractTypeParser.java:57)
          	at hudson.plugins.violations.ViolationsCollector.doType(ViolationsCollector.java:187)
          	at hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:114)
          	at hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:25)
          	at hudson.FilePath.act(FilePath.java:788)
          	at hudson.FilePath.act(FilePath.java:770)
          	at hudson.plugins.violations.ViolationsPublisher.perform(ViolationsPublisher.java:74)
          	at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
          	at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:700)
          	at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:675)
          	at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:653)
          	at hudson.model.Build$RunnerImpl.post2(Build.java:162)
          	at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:622)
          	at hudson.model.Run.run(Run.java:1434)
          	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
          	at hudson.model.ResourceController.execute(ResourceController.java:88)
          	at hudson.model.Executor.run(Executor.java:238)
          Build did not succeed and the project is configured to only push after a successful build, so no pushing will occur.
          

          acdha added a comment - - edited I found a more annoying variant when something when wrong parsing our JSLint output: ERROR: Publisher hudson.plugins.violations.ViolationsPublisher aborted due to exception java.io.EOFException: input contained no data at org.xmlpull.mxp1.MXParser.fillBuf(MXParser.java:3003) at org.xmlpull.mxp1.MXParser.more(MXParser.java:3046) at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1410) at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395) at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093) at hudson.plugins.violations.parse.AbstractParser.expectNextTag(AbstractParser.java:262) at hudson.plugins.violations.types.jslint.JsLintParser.execute(JsLintParser.java:25) at hudson.plugins.violations.parse.AbstractTypeParser.parse(AbstractTypeParser.java:57) at hudson.plugins.violations.ViolationsCollector.doType(ViolationsCollector.java:187) at hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:114) at hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:25) at hudson.FilePath.act(FilePath.java:788) at hudson.FilePath.act(FilePath.java:770) at hudson.plugins.violations.ViolationsPublisher.perform(ViolationsPublisher.java:74) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:700) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:675) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:653) at hudson.model.Build$RunnerImpl.post2(Build.java:162) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:622) at hudson.model.Run.run(Run.java:1434) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:238) Build did not succeed and the project is configured to only push after a successful build, so no pushing will occur.

          acdha added a comment -

          A common trigger for this is that the acceptable values for the directory name are completely undocumented and not relative to the workspace. Using something like {**/coverage} will work but simply {{

          {coverage}

          }} will not.

          acdha added a comment - A common trigger for this is that the acceptable values for the directory name are completely undocumented and not relative to the workspace. Using something like { **/coverage } will work but simply {{ {coverage} }} will not.

          Mark Waite added a comment -

          The violations plugin is deprecated. It has an unresolved security vulnerability. The last commit to the source code repository was over 7 years ago. Closing the issue as "Won't fix"

          Mark Waite added a comment - The violations plugin is deprecated. It has an unresolved security vulnerability. The last commit to the source code repository was over 7 years ago. Closing the issue as "Won't fix"

            peterkittreilly peterkittreilly
            acdha acdha
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: