Details

    • Similar Issues:
    • Released As:
      workflow-job 2.33

      Description

      java.lang.AssertionError: 
      Expected: a string containing "Finished: ABORTED"
           but: was "Started
      [Pipeline] unkillable
      Aborted by unknown
      [Pipeline] End of Pipeline
      "
      	at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
      	at org.junit.Assert.assertThat(Assert.java:956)
      	at org.junit.Assert.assertThat(Assert.java:923)
      	at org.jvnet.hudson.test.JenkinsRule.assertLogContains(JenkinsRule.java:1215)
      	at org.jvnet.hudson.test.JenkinsRule.waitForMessage(JenkinsRule.java:1263)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadTest.stop(CpsThreadTest.java:70)
      

      As noted in sources, WorkflowRun.isBuilding() can go to false before .finish has completed.

        Attachments

          Issue Links

            Activity

            Hide
            jglick Jesse Glick added a comment -

            Reproducible with

            diff --git a/pom.xml b/pom.xml
            index 3e1b3830..41948296 100644
            --- a/pom.xml
            +++ b/pom.xml
            @@ -84,7 +84,7 @@
                     <dependency>
                         <groupId>org.jenkins-ci.plugins.workflow</groupId>
                         <artifactId>workflow-api</artifactId>
            -            <version>2.30</version>
            +            <version>2.32</version>
                     </dependency>
                     <dependency>
                         <groupId>org.jenkins-ci.plugins.workflow</groupId>
            @@ -152,7 +152,7 @@
                     <dependency>
                         <groupId>org.jenkins-ci.plugins.workflow</groupId>
                         <artifactId>workflow-job</artifactId>
            -            <version>2.26</version>
            +            <version>2.33-SNAPSHOT</version>
                         <scope>test</scope>
                     </dependency>
                     <dependency>
            

            picking up

            diff --git a/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java b/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java
            index 2eaac3a..f630809 100644
            --- a/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java
            +++ b/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java
            @@ -577,6 +577,11 @@ public final class WorkflowRun extends Run<WorkflowJob,WorkflowRun> implements F
                         completed = Boolean.TRUE;
                         duration = Math.max(0, System.currentTimeMillis() - getStartTimeInMillis());
                     }
            +        try {
            +            Thread.sleep(3_000);
            +        } catch (InterruptedException x) {
            +            x.printStackTrace();
            +        }
                     try {
                         LOGGER.log(Level.INFO, "{0} completed: {1}", new Object[]{toString(), getResult()});
                         if (nullListener) {
            
            Show
            jglick Jesse Glick added a comment - Reproducible with diff --git a/pom.xml b/pom.xml index 3e1b3830..41948296 100644 --- a/pom.xml +++ b/pom.xml @@ -84,7 +84,7 @@ <dependency> <groupId> org.jenkins-ci.plugins.workflow </groupId> <artifactId> workflow-api </artifactId> - <version> 2.30 </version> + <version> 2.32 </version> </dependency> <dependency> <groupId> org.jenkins-ci.plugins.workflow </groupId> @@ -152,7 +152,7 @@ <dependency> <groupId> org.jenkins-ci.plugins.workflow </groupId> <artifactId> workflow-job </artifactId> - <version> 2.26 </version> + <version> 2.33-SNAPSHOT </version> <scope> test </scope> </dependency> <dependency> picking up diff --git a/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java b/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java index 2eaac3a..f630809 100644 --- a/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java +++ b/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java @@ -577,6 +577,11 @@ public final class WorkflowRun extends Run<WorkflowJob,WorkflowRun> implements F completed = Boolean .TRUE; duration = Math .max(0, System .currentTimeMillis() - getStartTimeInMillis()); } + try { + Thread .sleep(3_000); + } catch (InterruptedException x) { + x.printStackTrace(); + } try { LOGGER.log(Level.INFO, "{0} completed: {1}" , new Object []{toString(), getResult()}); if (nullListener) {
            Hide
            jglick Jesse Glick added a comment -

            Still one PR open, but originally reported test flake should now be addressed.

            Show
            jglick Jesse Glick added a comment - Still one PR open, but originally reported test flake should now be addressed.
            Hide
            hellspam Roy Arnon added a comment -

            Hi Jesse Glick, I believe this ticked caused an issue with our jenkins instance.

            The issue I was seeing was causing builds to be stuck forever in queue -

             

            I ran 

            Jenkins.instance.getItemByFullName(...).getBuildByNumber(..).isLogUpdated()

            On the previous build, and the result was true. I believe this was causing the blockage.

            A downgrade to workflow-job 2.32 fixed the issue for us. I can gather more information if you like and try to reproduce the issue on our test instance.

            We are using jenkins 2.176.2.

            I have attached a list of our plugins as well - plugins.txt

            Show
            hellspam Roy Arnon added a comment - Hi Jesse Glick , I believe this ticked caused an issue with our jenkins instance. The issue I was seeing was causing builds to be stuck forever in queue -   I ran  Jenkins.instance.getItemByFullName(...).getBuildByNumber(..).isLogUpdated() On the previous build, and the result was true. I believe this was causing the blockage. A downgrade to workflow-job 2.32 fixed the issue for us. I can gather more information if you like and try to reproduce the issue on our test instance. We are using jenkins 2.176.2. I have attached a list of our plugins as well -  plugins.txt
            Hide
            jglick Jesse Glick added a comment -

            Roy Arnon please file a separate issue, Link’d to this one, with the regression label, and whatever steps to reproduce you can manage to put together.

            Show
            jglick Jesse Glick added a comment - Roy Arnon please file a separate issue, Link ’d to this one, with the regression label, and whatever steps to reproduce you can manage to put together.
            Hide
            hellspam Roy Arnon added a comment -

            Jesse Glick done - JENKINS-59083

            I have also reproduced this issue on our test instance, if you need any more information please let me know.

            Show
            hellspam Roy Arnon added a comment - Jesse Glick done - JENKINS-59083 I have also reproduced this issue on our test instance, if you need any more information please let me know.

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                jglick Jesse Glick
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: