Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Duplicate
    • Component/s: pipeline
    • Labels:
      None
    • Similar Issues:

      Description

      Hi,

      The following workflow will just hang forever:

      node {
        parallel([:])
      }
      

      Log:

      Started by user anonymous
      Running: Allocate node : Start
      Running on master in /home/ehencae/src/workflow-plugin/aggregator/work/jobs/test1/workspace@2
      Running: Allocate node : Body : Start
      Running: Execute sub-workflows in parallel : Start
      Aborted by anonymous
      Aborted by anonymous
      Aborted by anonymous
      Resuming build
      

      After that it is not possible to abort it, not even by restart. The workaround in JENKINS-25550 did the trick. Parallel should not just hang when executed with a empty map. Even though it's easy to workaround in the flow so that it isn't called for empty maps.

      Possible to recreate in:

      org.jenkinsci.plugins.workflow.steps.parallel.ParallelStepTest
          @Test
          public void parallelEmptyMap() {
              story.addStep(new Statement() {
                  @Override public void evaluate() throws Throwable {
                      p = jenkins().createProject(WorkflowJob.class, "demo");
                      p.setDefinition(new CpsFlowDefinition(join(
                              "node {\n" +
                                      "    parallel([:])\n" +
                                      "}\n"
                      )));
      
                      startBuilding().get();
                      assertBuildCompletedSuccessfully();
                  }
              });
          }
      

      Log:

      ...
      === Starting parallelEmptyMap(org.jenkinsci.plugins.workflow.steps.parallel.ParallelStepTest)
      [demo #1] Started
      [demo #1] Running: Allocate node : Start
      [demo #1] Running on master in /tmp/junit1594929993299071723/junit5524096835654718071/workspace/demo
      [demo #1] Running: Allocate node : Body : Start
      [demo #1] Running: Execute sub-workflows in parallel : Start
      

        Attachments

          Issue Links

            Activity

            Hide
            ceej Chris Hillery added a comment -

            This should be closed as a duplicate of JENKINS-29413.

            Show
            ceej Chris Hillery added a comment - This should be closed as a duplicate of JENKINS-29413 .

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                henrikcaesar Henrik Caesar
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: