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

workflow plugin does not provide console to warnings plugin, sleep required

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Won't Fix
    • Component/s: warnings-plugin
    • Labels:
    • Environment:
      workflow-plugin 1.12
      warnings plugin 4.51
      jenkins 1.641
    • Similar Issues:

      Description

      I came up with the following workflow script brooken.groovy, which
      compiles a file with clang, and then invokes the warnings plugin.

      In the console log, there are warnings, but the warnings plugin detects zero warnings.

      I modified the script slightly (fixed.groovy) by inserting a sleep statement before calling the warnings plugin. I re-ran the script and the warnings plugin detected the warnings.

      It looks like the workflow-plugin is not providing the console to the warnings plugin when it needs it? Maybe a flush is missing?

        Attachments

          Issue Links

            Activity

            Hide
            jglick Jesse Glick added a comment -

            what is the error on your machine?

            $ git show
            commit a86b5bac02267b30609c548ae838839945a84370 (HEAD -> master, origin/master, origin/HEAD)
            Author: Ulli Hafner <ullrich.hafner@gmail.com>
            Date:   Tue Mar 5 15:23:30 2019 +0100
            
                Revert "Do not wait for console log flush anymore."
                
                This reverts commit d7de3c70228ce89f81dc055bc7126081c5f285ea.
            
            diff --git a/src/main/java/io/jenkins/plugins/analysis/core/model/ReportScanningTool.java b/src/main/java/io/jenkins/plugins/analysis/core/model/ReportScanningTool.java
            index e19ab7aa..8362b241 100644
            --- a/src/main/java/io/jenkins/plugins/analysis/core/model/ReportScanningTool.java
            +++ b/src/main/java/io/jenkins/plugins/analysis/core/model/ReportScanningTool.java
            @@ -163,6 +163,8 @@ public abstract class ReportScanningTool extends Tool {
                             "Static analysis tool %s cannot scan console log output, please define a file pattern",
                             getActualName());
             
            +        waitForConsoleToFlush(logger);
            +
                     Report consoleReport = new Report();
                     consoleReport.logInfo("Parsing console log (workspace: '%s')", workspace);
                     logger.log(consoleReport);
            $ git status
            On branch master
            Your branch is up to date with 'origin/master'.
            
            nothing to commit, working tree clean
            $ mvn validate
            [INFO] Scanning for projects...
            [INFO] 
            [INFO] -------------------< io.jenkins.plugins:warnings-ng >-------------------
            [INFO] Building Warnings Next Generation Plugin 4.0.0-SNAPSHOT
            [INFO] --------------------------------[ hpi ]---------------------------------
            [INFO] 
            [INFO] --- maven-hpi-plugin:2.7:validate (default-validate) @ warnings-ng ---
            [INFO] 
            [INFO] --- maven-enforcer-plugin:3.0.0-M1:display-info (display-info) @ warnings-ng ---
            [INFO] Maven Version: 3.6.0
            [INFO] JDK Version: 1.8.0_191 normalized as: 1.8.0-191
            [INFO] OS Info: Arch: amd64 Family: unix Name: linux Version: 4.18.0-15-generic
            [INFO] 
            [INFO] --- maven-enforcer-plugin:3.0.0-M1:enforce (display-info) @ warnings-ng ---
            [INFO] Adding ignore: module-info
            [INFO] Adding ignore: **/ModuleUtils*
            [WARNING] Rule 4: org.apache.maven.plugins.enforcer.RequireUpperBoundDeps failed with message:
            Failed while enforcing RequireUpperBoundDeps. The error(s) are [
            Require upper bound dependencies error for org.jenkins-ci.plugins.workflow:workflow-step-api:2.13 paths to dependency are:
            +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT
              +-org.jenkins-ci.plugins.workflow:workflow-step-api:2.13
            and
            +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT
              +-org.jenkins-ci.plugins.workflow:workflow-job:2.16
                +-org.jenkins-ci.plugins.workflow:workflow-step-api:2.13
            and
            +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT
              +-org.jenkins-ci.plugins:token-macro:2.5
                +-org.jenkins-ci.plugins.workflow:workflow-step-api:2.7
            and
            +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT
              +-org.jenkins-ci.plugins:git:3.9.1
                +-org.jenkins-ci.plugins.workflow:workflow-step-api:2.16
            and
            +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT
              +-org.jenkins-ci.plugins.workflow:workflow-cps:2.42
                +-org.jenkins-ci.plugins.workflow:workflow-step-api:2.13
            and
            +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT
              +-org.jenkins-ci.plugins:pipeline-stage-step:2.3
                +-org.jenkins-ci.plugins.workflow:workflow-step-api:2.11
            and
            +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT
              +-org.jenkins-ci.plugins.workflow:workflow-durable-task-step:2.16
                +-org.jenkins-ci.plugins.workflow:workflow-step-api:2.11
            and
            +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT
              +-org.jenkins-ci.plugins.workflow:workflow-basic-steps:2.7
                +-org.jenkins-ci.plugins.workflow:workflow-step-api:2.13
            and
            +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT
              +-org.jenkins-ci.plugins.workflow:workflow-job:2.16
                +-org.jenkins-ci.plugins.workflow:workflow-api:2.22
                  +-org.jenkins-ci.plugins.workflow:workflow-step-api:2.10
            and
            +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT
              +-org.jenkins-ci.plugins.workflow:workflow-job:2.16
                +-org.jenkins-ci.plugins.workflow:workflow-support:2.16
                  +-org.jenkins-ci.plugins.workflow:workflow-step-api:2.13
            and
            +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT
              +-org.jenkins-ci.plugins:git:3.9.1
                +-org.jenkins-ci.plugins.workflow:workflow-scm-step:2.7
                  +-org.jenkins-ci.plugins.workflow:workflow-step-api:2.9
            , 
            Require upper bound dependencies error for org.jenkins-ci.plugins:structs:1.10 paths to dependency are:
            +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT
              +-org.jenkins-ci.plugins:structs:1.10
            and
            +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT
              +-org.jenkins-ci.plugins.workflow:workflow-step-api:2.13
                +-org.jenkins-ci.plugins:structs:1.5
            and
            +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT
              +-org.jenkins-ci.plugins:git:3.9.1
                +-org.jenkins-ci.plugins:structs:1.17
            and
            +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT
              +-org.jenkins-ci.plugins.workflow:workflow-cps:2.42
                +-org.jenkins-ci.plugins:structs:1.7
            and
            +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT
              +-org.jenkins-ci.plugins:pipeline-stage-step:2.3
                +-org.jenkins-ci.plugins:structs:1.6
            and
            +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT
              +-org.jenkins-ci.plugins.workflow:workflow-basic-steps:2.7
                +-org.jenkins-ci.plugins:structs:1.6
            and
            +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT
              +-org.jenkins-ci.plugins.workflow:workflow-job:2.16
                +-org.jenkins-ci.plugins.workflow:workflow-api:2.22
                  +-org.jenkins-ci.plugins:structs:1.7
            and
            +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT
              +-org.jenkins-ci.plugins:matrix-project:1.13
                +-org.jenkins-ci.plugins:junit:1.20
                  +-org.jenkins-ci.plugins:structs:1.2
            and
            +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT
              +-org.jenkins-ci.plugins:git:3.9.1
                +-org.jenkins-ci.plugins:git-client:2.7.3
                  +-org.jenkins-ci.plugins:structs:1.9
            and
            +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT
              +-org.jenkins-ci.plugins:git:3.9.1
                +-org.jenkins-ci.plugins:credentials:2.1.18
                  +-org.jenkins-ci.plugins:structs:1.7
            and
            +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT
              +-org.jenkins-ci.plugins:git:3.9.1
                +-org.jenkins-ci.plugins:scm-api:2.2.0
                  +-org.jenkins-ci.plugins:structs:1.9
            , 
            Require upper bound dependencies error for org.jenkins-ci.plugins:scm-api:2.2.0 paths to dependency are:
            +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT
              +-org.jenkins-ci.plugins:git:3.9.1
                +-org.jenkins-ci.plugins:scm-api:2.2.0
            and
            +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT
              +-org.jenkins-ci.plugins.workflow:workflow-cps:2.42
                +-org.jenkins-ci.plugins:scm-api:2.2.0 (managed) <-- org.jenkins-ci.plugins:scm-api:2.0.8
            and
            +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT
              +-org.jenkins-ci.plugins:pipeline-stage-step:2.3
                +-org.jenkins-ci.plugins:scm-api:2.2.0 (managed) <-- org.jenkins-ci.plugins:scm-api:2.0.7
            and
            +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT
              +-org.jenkins-ci.plugins.workflow:workflow-job:2.16
                +-org.jenkins-ci.plugins.workflow:workflow-api:2.22
                  +-org.jenkins-ci.plugins:scm-api:2.2.0 (managed) <-- org.jenkins-ci.plugins:scm-api:2.2.8
            and
            +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT
              +-org.jenkins-ci.plugins.workflow:workflow-job:2.16
                +-org.jenkins-ci.plugins.workflow:workflow-support:2.16
                  +-org.jenkins-ci.plugins:scm-api:2.2.0 (managed) <-- org.jenkins-ci.plugins:scm-api:2.0.8
            , 
            Require upper bound dependencies error for org.jenkins-ci.plugins:mailer:1.18 paths to dependency are:
            +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT
              +-org.jenkins-ci.plugins:git:3.9.1
                +-org.jenkins-ci.plugins:mailer:1.18 (managed) <-- org.jenkins-ci.plugins:mailer:1.21
            and
            +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT
              +-org.jenkins-ci.main:maven-plugin:3.1.2
                +-org.jenkins-ci.plugins:mailer:1.18 (managed) <-- org.jenkins-ci.plugins:mailer:1.7
            and
            +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT
              +-org.jenkins-ci.plugins.workflow:workflow-basic-steps:2.7
                +-org.jenkins-ci.plugins:mailer:1.18 (managed) <-- org.jenkins-ci.plugins:mailer:1.7
            ]
            [INFO] ------------------------------------------------------------------------
            [INFO] BUILD FAILURE
            …
            

            Not sure how it could be working in CI. That there are bad deps is backed up by:

            $ mvn -Denforcer.skip -Dtest=InjectedTest clean test
            …
            Mar 05, 2019 1:51:33 PM jenkins.InitReactorRunner$1 onAttained
            INFO: Listed all plugins
            Mar 05, 2019 1:51:33 PM jenkins.InitReactorRunner$1 onTaskFailed
            SEVERE: Failed Loading plugin JDK Tool Plugin v1.1 (jdk-tool)
            java.io.IOException: JDK Tool Plugin v1.1 failed to load.
             - You must update Jenkins from v2.89.1 to v2.112 or later to run this plugin.
            	at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:626)
            	at hudson.PluginManager$2$1$1.run(PluginManager.java:513)
            	at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
            	at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
            	at jenkins.model.Jenkins$5.runTask(Jenkins.java:1065)
            	at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
            	at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
            	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
            	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
            	at java.lang.Thread.run(Thread.java:748)
            
            Mar 05, 2019 1:51:33 PM jenkins.InitReactorRunner$1 onTaskFailed
            SEVERE: Failed Loading plugin Jenkins Git plugin v3.9.1 (git)
            java.io.IOException: Jenkins Git plugin v3.9.1 failed to load.
             - You must update Jenkins from v2.89.1 to v2.138.3-cb-2 or later to run this plugin.
             - Pipeline: Step API v2.13 is older than required. To fix, install v2.16 or later.
             - JDK Tool Plugin v1.1 failed to load. Fix this plugin first.
            	at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:626)
            	at hudson.PluginManager$2$1$1.run(PluginManager.java:513)
            	at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
            	at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
            	at jenkins.model.Jenkins$5.runTask(Jenkins.java:1065)
            	at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
            	at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
            	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
            	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
            	at java.lang.Thread.run(Thread.java:748)
            
            Mar 05, 2019 1:51:36 PM jenkins.InitReactorRunner$1 onAttained
            INFO: Prepared all plugins
            …
            [ERROR] Tests run: 107, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 18.044 s <<< FAILURE! - in TestSuite with 107 tests [example: org.jvnet.hudson.test.JellyTestSuiteBuilder$JellyTestSuite@4f25b795]
            [ERROR] testPluginActive  Time elapsed: 0.013 s  <<< ERROR!
            java.lang.Error: Plugin jdk-tool failed to start
            	at org.jvnet.hudson.test.PluginAutomaticTestBuilder$OtherTests.testPluginActive(PluginAutomaticTestBuilder.java:99)
            	at …
            Caused by: java.io.IOException: JDK Tool Plugin v1.1 failed to load.
             - You must update Jenkins from v2.89.1 to v2.112 or later to run this plugin.
            	at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:626)
            	at hudson.PluginManager$2$1$1.run(PluginManager.java:513)
            	at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
            	at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
            	at jenkins.model.Jenkins$5.runTask(Jenkins.java:1065)
            	at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
            	at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
            	... 3 more
            
            [INFO] 
            [INFO] Results:
            [INFO] 
            [ERROR] Errors: 
            [ERROR]   PluginAutomaticTestBuilder$OtherTests.testPluginActive:99  Plugin jdk-tool fai...
            [INFO] 
            [ERROR] Tests run: 107, Failures: 0, Errors: 1, Skipped: 0
            [INFO] 
            [INFO] ------------------------------------------------------------------------
            [INFO] BUILD FAILURE
            …
            

            Possibly the issue is something to do with the timestamped snapshot dependencies (analysis-model-api.version + analysis-model.version) malfunctioning, and the Maven build pulling in more or less random versions of stuff. I would advise you to switch to JEP-305. It is generally not hard to do and you can bypass a lot of weird issues.

            Show
            jglick Jesse Glick added a comment - what is the error on your machine? $ git show commit a86b5bac02267b30609c548ae838839945a84370 (HEAD -> master, origin/master, origin/HEAD) Author: Ulli Hafner <ullrich.hafner@gmail.com> Date: Tue Mar 5 15:23:30 2019 +0100 Revert "Do not wait for console log flush anymore." This reverts commit d7de3c70228ce89f81dc055bc7126081c5f285ea. diff --git a/src/main/java/io/jenkins/plugins/analysis/core/model/ReportScanningTool.java b/src/main/java/io/jenkins/plugins/analysis/core/model/ReportScanningTool.java index e19ab7aa..8362b241 100644 --- a/src/main/java/io/jenkins/plugins/analysis/core/model/ReportScanningTool.java +++ b/src/main/java/io/jenkins/plugins/analysis/core/model/ReportScanningTool.java @@ -163,6 +163,8 @@ public abstract class ReportScanningTool extends Tool { "Static analysis tool %s cannot scan console log output, please define a file pattern", getActualName()); + waitForConsoleToFlush(logger); + Report consoleReport = new Report(); consoleReport.logInfo("Parsing console log (workspace: '%s')", workspace); logger.log(consoleReport); $ git status On branch master Your branch is up to date with 'origin/master'. nothing to commit, working tree clean $ mvn validate [INFO] Scanning for projects... [INFO] [INFO] -------------------< io.jenkins.plugins:warnings-ng >------------------- [INFO] Building Warnings Next Generation Plugin 4.0.0-SNAPSHOT [INFO] --------------------------------[ hpi ]--------------------------------- [INFO] [INFO] --- maven-hpi-plugin:2.7:validate (default-validate) @ warnings-ng --- [INFO] [INFO] --- maven-enforcer-plugin:3.0.0-M1:display-info (display-info) @ warnings-ng --- [INFO] Maven Version: 3.6.0 [INFO] JDK Version: 1.8.0_191 normalized as: 1.8.0-191 [INFO] OS Info: Arch: amd64 Family: unix Name: linux Version: 4.18.0-15-generic [INFO] [INFO] --- maven-enforcer-plugin:3.0.0-M1:enforce (display-info) @ warnings-ng --- [INFO] Adding ignore: module-info [INFO] Adding ignore: **/ModuleUtils* [WARNING] Rule 4: org.apache.maven.plugins.enforcer.RequireUpperBoundDeps failed with message: Failed while enforcing RequireUpperBoundDeps. The error(s) are [ Require upper bound dependencies error for org.jenkins-ci.plugins.workflow:workflow-step-api:2.13 paths to dependency are: +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT +-org.jenkins-ci.plugins.workflow:workflow-step-api:2.13 and +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT +-org.jenkins-ci.plugins.workflow:workflow-job:2.16 +-org.jenkins-ci.plugins.workflow:workflow-step-api:2.13 and +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT +-org.jenkins-ci.plugins:token-macro:2.5 +-org.jenkins-ci.plugins.workflow:workflow-step-api:2.7 and +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT +-org.jenkins-ci.plugins:git:3.9.1 +-org.jenkins-ci.plugins.workflow:workflow-step-api:2.16 and +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT +-org.jenkins-ci.plugins.workflow:workflow-cps:2.42 +-org.jenkins-ci.plugins.workflow:workflow-step-api:2.13 and +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT +-org.jenkins-ci.plugins:pipeline-stage-step:2.3 +-org.jenkins-ci.plugins.workflow:workflow-step-api:2.11 and +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT +-org.jenkins-ci.plugins.workflow:workflow-durable-task-step:2.16 +-org.jenkins-ci.plugins.workflow:workflow-step-api:2.11 and +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT +-org.jenkins-ci.plugins.workflow:workflow-basic-steps:2.7 +-org.jenkins-ci.plugins.workflow:workflow-step-api:2.13 and +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT +-org.jenkins-ci.plugins.workflow:workflow-job:2.16 +-org.jenkins-ci.plugins.workflow:workflow-api:2.22 +-org.jenkins-ci.plugins.workflow:workflow-step-api:2.10 and +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT +-org.jenkins-ci.plugins.workflow:workflow-job:2.16 +-org.jenkins-ci.plugins.workflow:workflow-support:2.16 +-org.jenkins-ci.plugins.workflow:workflow-step-api:2.13 and +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT +-org.jenkins-ci.plugins:git:3.9.1 +-org.jenkins-ci.plugins.workflow:workflow-scm-step:2.7 +-org.jenkins-ci.plugins.workflow:workflow-step-api:2.9 , Require upper bound dependencies error for org.jenkins-ci.plugins:structs:1.10 paths to dependency are: +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT +-org.jenkins-ci.plugins:structs:1.10 and +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT +-org.jenkins-ci.plugins.workflow:workflow-step-api:2.13 +-org.jenkins-ci.plugins:structs:1.5 and +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT +-org.jenkins-ci.plugins:git:3.9.1 +-org.jenkins-ci.plugins:structs:1.17 and +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT +-org.jenkins-ci.plugins.workflow:workflow-cps:2.42 +-org.jenkins-ci.plugins:structs:1.7 and +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT +-org.jenkins-ci.plugins:pipeline-stage-step:2.3 +-org.jenkins-ci.plugins:structs:1.6 and +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT +-org.jenkins-ci.plugins.workflow:workflow-basic-steps:2.7 +-org.jenkins-ci.plugins:structs:1.6 and +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT +-org.jenkins-ci.plugins.workflow:workflow-job:2.16 +-org.jenkins-ci.plugins.workflow:workflow-api:2.22 +-org.jenkins-ci.plugins:structs:1.7 and +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT +-org.jenkins-ci.plugins:matrix-project:1.13 +-org.jenkins-ci.plugins:junit:1.20 +-org.jenkins-ci.plugins:structs:1.2 and +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT +-org.jenkins-ci.plugins:git:3.9.1 +-org.jenkins-ci.plugins:git-client:2.7.3 +-org.jenkins-ci.plugins:structs:1.9 and +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT +-org.jenkins-ci.plugins:git:3.9.1 +-org.jenkins-ci.plugins:credentials:2.1.18 +-org.jenkins-ci.plugins:structs:1.7 and +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT +-org.jenkins-ci.plugins:git:3.9.1 +-org.jenkins-ci.plugins:scm-api:2.2.0 +-org.jenkins-ci.plugins:structs:1.9 , Require upper bound dependencies error for org.jenkins-ci.plugins:scm-api:2.2.0 paths to dependency are: +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT +-org.jenkins-ci.plugins:git:3.9.1 +-org.jenkins-ci.plugins:scm-api:2.2.0 and +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT +-org.jenkins-ci.plugins.workflow:workflow-cps:2.42 +-org.jenkins-ci.plugins:scm-api:2.2.0 (managed) <-- org.jenkins-ci.plugins:scm-api:2.0.8 and +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT +-org.jenkins-ci.plugins:pipeline-stage-step:2.3 +-org.jenkins-ci.plugins:scm-api:2.2.0 (managed) <-- org.jenkins-ci.plugins:scm-api:2.0.7 and +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT +-org.jenkins-ci.plugins.workflow:workflow-job:2.16 +-org.jenkins-ci.plugins.workflow:workflow-api:2.22 +-org.jenkins-ci.plugins:scm-api:2.2.0 (managed) <-- org.jenkins-ci.plugins:scm-api:2.2.8 and +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT +-org.jenkins-ci.plugins.workflow:workflow-job:2.16 +-org.jenkins-ci.plugins.workflow:workflow-support:2.16 +-org.jenkins-ci.plugins:scm-api:2.2.0 (managed) <-- org.jenkins-ci.plugins:scm-api:2.0.8 , Require upper bound dependencies error for org.jenkins-ci.plugins:mailer:1.18 paths to dependency are: +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT +-org.jenkins-ci.plugins:git:3.9.1 +-org.jenkins-ci.plugins:mailer:1.18 (managed) <-- org.jenkins-ci.plugins:mailer:1.21 and +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT +-org.jenkins-ci.main:maven-plugin:3.1.2 +-org.jenkins-ci.plugins:mailer:1.18 (managed) <-- org.jenkins-ci.plugins:mailer:1.7 and +-io.jenkins.plugins:warnings-ng:4.0.0-SNAPSHOT +-org.jenkins-ci.plugins.workflow:workflow-basic-steps:2.7 +-org.jenkins-ci.plugins:mailer:1.18 (managed) <-- org.jenkins-ci.plugins:mailer:1.7 ] [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE … Not sure how it could be working in CI. That there are bad deps is backed up by: $ mvn -Denforcer.skip -Dtest=InjectedTest clean test … Mar 05, 2019 1:51:33 PM jenkins.InitReactorRunner$1 onAttained INFO: Listed all plugins Mar 05, 2019 1:51:33 PM jenkins.InitReactorRunner$1 onTaskFailed SEVERE: Failed Loading plugin JDK Tool Plugin v1.1 (jdk-tool) java.io.IOException: JDK Tool Plugin v1.1 failed to load. - You must update Jenkins from v2.89.1 to v2.112 or later to run this plugin. at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:626) at hudson.PluginManager$2$1$1.run(PluginManager.java:513) at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169) at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282) at jenkins.model.Jenkins$5.runTask(Jenkins.java:1065) at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210) at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Mar 05, 2019 1:51:33 PM jenkins.InitReactorRunner$1 onTaskFailed SEVERE: Failed Loading plugin Jenkins Git plugin v3.9.1 (git) java.io.IOException: Jenkins Git plugin v3.9.1 failed to load. - You must update Jenkins from v2.89.1 to v2.138.3-cb-2 or later to run this plugin. - Pipeline: Step API v2.13 is older than required. To fix, install v2.16 or later. - JDK Tool Plugin v1.1 failed to load. Fix this plugin first. at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:626) at hudson.PluginManager$2$1$1.run(PluginManager.java:513) at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169) at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282) at jenkins.model.Jenkins$5.runTask(Jenkins.java:1065) at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210) at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Mar 05, 2019 1:51:36 PM jenkins.InitReactorRunner$1 onAttained INFO: Prepared all plugins … [ERROR] Tests run: 107, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 18.044 s <<< FAILURE! - in TestSuite with 107 tests [example: org.jvnet.hudson.test.JellyTestSuiteBuilder$JellyTestSuite@4f25b795] [ERROR] testPluginActive Time elapsed: 0.013 s <<< ERROR! java.lang.Error: Plugin jdk-tool failed to start at org.jvnet.hudson.test.PluginAutomaticTestBuilder$OtherTests.testPluginActive(PluginAutomaticTestBuilder.java:99) at … Caused by: java.io.IOException: JDK Tool Plugin v1.1 failed to load. - You must update Jenkins from v2.89.1 to v2.112 or later to run this plugin. at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:626) at hudson.PluginManager$2$1$1.run(PluginManager.java:513) at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169) at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282) at jenkins.model.Jenkins$5.runTask(Jenkins.java:1065) at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210) at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117) ... 3 more [INFO] [INFO] Results: [INFO] [ERROR] Errors: [ERROR] PluginAutomaticTestBuilder$OtherTests.testPluginActive:99 Plugin jdk-tool fai... [INFO] [ERROR] Tests run: 107, Failures: 0, Errors: 1, Skipped: 0 [INFO] [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE … Possibly the issue is something to do with the timestamped snapshot dependencies ( analysis-model-api.version + analysis-model.version ) malfunctioning, and the Maven build pulling in more or less random versions of stuff. I would advise you to switch to JEP-305. It is generally not hard to do and you can bypass a lot of weird issues.
            Hide
            drulli Ulli Hafner added a comment -

            I added a 5sec sleep before I am scanning the console log quite some time ago. Since nobody mentioned that bug again, I think it is save to close this issue even though only a workaround has been applied.

            Show
            drulli Ulli Hafner added a comment - I added a 5sec sleep before I am scanning the console log quite some time ago. Since nobody mentioned that bug again, I think it is save to close this issue even though only a workaround has been applied.
            Hide
            jglick Jesse Glick added a comment -

            FTR the workaround for the workaround is to not rely on console scanning, but rather to use the report file syntax and be explicit about what it is you wish to scan:

            tee('log.txt') {
                sh 'mvn -B -ntp -Dmaven.test.failure.ignore verify'
            }
            recordIssues(tools: [javaDoc(pattern: 'log.txt')])
            

            or

            sh 'bash -c "set -o pipefail; mvn -B -ntp -Dmaven.test.failure.ignore verify | tee log.txt"'
            recordIssues(tools: [javaDoc(pattern: 'log.txt')])
            

            This is more robust and modular anyway. A complex parallelized build might have a bunch of steps doing things only some of which make sense to scan for warnings in a given context.

            Show
            jglick Jesse Glick added a comment - FTR the workaround for the workaround is to not rely on console scanning, but rather to use the report file syntax and be explicit about what it is you wish to scan: tee( 'log.txt' ) { sh 'mvn -B -ntp -Dmaven.test.failure.ignore verify' } recordIssues(tools: [javaDoc(pattern: 'log.txt' )]) or sh 'bash -c "set -o pipefail; mvn -B -ntp -Dmaven.test.failure.ignore verify | tee log.txt" ' recordIssues(tools: [javaDoc(pattern: 'log.txt' )]) This is more robust and modular anyway. A complex parallelized build might have a bunch of steps doing things only some of which make sense to scan for warnings in a given context.
            Hide
            jglick Jesse Glick added a comment -

            I would still suggest a block-scoped step, though:

            recordingIssues(tools: [javaDoc()]) {
                sh 'mvn -B -ntp -Dmaven.test.failure.ignore verify'
            }
            
            Show
            jglick Jesse Glick added a comment - I would still suggest a block-scoped step, though: recordingIssues(tools: [javaDoc()]) { sh 'mvn -B -ntp -Dmaven.test.failure.ignore verify' }
            Hide
            drulli Ulli Hafner added a comment -

            Yes, of course. I started an implementation in the last year Hacktoberfest but never managed to finish it. Too many other open issues.

            Show
            drulli Ulli Hafner added a comment - Yes, of course. I started an implementation in the last year Hacktoberfest but never managed to finish it. Too many other open issues.

              People

              Assignee:
              drulli Ulli Hafner
              Reporter:
              rodrigc Craig Rodrigues
              Votes:
              4 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: