-
Bug
-
Resolution: Duplicate
-
Minor
-
None
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
- duplicates
-
JENKINS-29413 Parallel with an empty map will run forever
-
- Resolved
-