Hi Jesse,

Thanks for the swift response.
I've commented on a few of your remarks below.
Also - I see that you've merged pull #8 for the plugin - are you updating 
the docker image demo file to reflect the new changes?

Thanks,
Sagi
 

> > How can I dynamically run a function/closure with different parameters 
> in parallel? 
> > 
> > o   BuildFlow Example: 
> > 
> > parallel ( (1..maxValue).collect { ctr -> someClosureUsing_ctr} ) 
>
> Untested but probably something like: 
>
> parallel((1..maxValue).collect {ctr -> ctr: {-> doSomethingWith(ctr)}}) 
>
> (The ‘parallel’ step in Workflow takes “thread names” as the parameter 
> keys and closures as values.) 
>

Tried this - didn't work!

> Console Output prints are not synced with actual run making it 
> > almost impossible to read. 
>
> Not sure what you mean. 
>

Please see attached file (3_parallel_test.txt) - it contains a flow of 3 
parallel tests.
Notice that the ending prints of the flow (prefixed with timestamp) precede 
the prints of the actual threads it invoked.
Once you have more parallel executions this becomes even more difficult to 
read.
 

> > java.lang.UnsupportedOperationException hangs the build. 
> > 
> > o   Example: 
> > 
> > println a[0]  // doesn't like [] 

Not sure I follow what is going on there (what is ‘a’?), but if you 
> have a reproducible bug please file it in the ‘workflow’ component. 
>
this was a simple example of Groovy syntax that doesn't work:
def a=[1,2,3]
println a[0] // [] for some reason is not supported and triggers the above 
exception which hangs the build
 

> > There are no line numbers in the Groovy CPS DSL Script text box. 
> > So when compilation/run-time errors are received, it's hard to find the 
> > right erroneous line. 
>
> Of course. This falls into the same discussion as reusing script code, 
> since we would not expect authors of complex flows to be writing 
> anything much in the Script text box except a request to load the real 
> script from elsewhere. 
>
 
I believe that this should be implemented for simple flows as well.
It's a win-win for all users :-)

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.
Running: Allocate node : Start
Running on local3 in /tmp/local3/workspace/test
Running: Allocate node : Body : Start
20:08:38.977: Executing on local3 =  testFlow
20:08:38.982: Executing testFlow  = test(1) || test(2) || test(3) - should 
randomly Pass/Fail
Running: Allocate node : Body : Start
Running: Allocate node : Body : Start
Running: Allocate node : Body : Start
Running: Test
Entering stage Test
Proceeding
Running: TestFlow
Entering stage TestFlow
Proceeding
Running: Execute sub-workflows in parallel : Start
Running: Parallel branch: flow3
Running: Parallel branch: flow2
Running: Parallel branch: flow1
Running: Allocate node : Start
Running on local1 in /tmp/local1/workspace/test
Running: Allocate node : Start
Running on local1 in /tmp/local1/workspace/test@2
Running: Allocate node : Start
Running on local2 in /tmp/local2/workspace/test
Running: Shell Script
[test@2] $ nohup sh -c "'/tmp/local1/workspace/test@2/.47699937/script.sh' > 
'/tmp/local1/workspace/test@2/.47699937/jenkins-log.txt' 2>&1; echo $? > 
'/tmp/local1/workspace/test@2/.47699937/jenkins-result.txt'"
Running: Shell Script
[test] $ nohup sh -c "'/tmp/local2/workspace/test/.67ca8cf5/script.sh' > 
'/tmp/local2/workspace/test/.67ca8cf5/jenkins-log.txt' 2>&1; echo $? > 
'/tmp/local2/workspace/test/.67ca8cf5/jenkins-result.txt'"
Running: Shell Script
[test] $ nohup sh -c "'/tmp/local1/workspace/test/.f909532e/script.sh' > 
'/tmp/local1/workspace/test/.f909532e/jenkins-log.txt' 2>&1; echo $? > 
'/tmp/local1/workspace/test/.f909532e/jenkins-result.txt'"
+ echo Test #2 started (t = 5)
Test #2 started (t = 5)
+ echo Test #1 started (t = 8)
Test #1 started (t = 8)
+ echo Test #3 started (t = 1)
Test #3 started (t = 1)
Running: Shell Script
[test@2] $ nohup sh -c "'/tmp/local1/workspace/test@2/.1d0e2a99/script.sh' > 
'/tmp/local1/workspace/test@2/.1d0e2a99/jenkins-log.txt' 2>&1; echo $? > 
'/tmp/local1/workspace/test@2/.1d0e2a99/jenkins-result.txt'"
+ echo Test #2 finished - Result: true
Test #2 finished - Result: true
Running: Shell Script
[test] $ nohup sh -c "'/tmp/local2/workspace/test/.a155d813/script.sh' > 
'/tmp/local2/workspace/test/.a155d813/jenkins-log.txt' 2>&1; echo $? > 
'/tmp/local2/workspace/test/.a155d813/jenkins-result.txt'"
Running: Shell Script
[test] $ nohup sh -c "'/tmp/local1/workspace/test/.d1641470/script.sh' > 
'/tmp/local1/workspace/test/.d1641470/jenkins-log.txt' 2>&1; echo $? > 
'/tmp/local1/workspace/test/.d1641470/jenkins-result.txt'"
Running: Allocate node : Body : End
Running: Allocate node : End
Running: Execute sub-workflows in parallel : Body : End
20:08:58.239: Executed testFlow - Result: false
20:08:58.240: Executed on local3
+ echo Test #1 finished - Result: false
Test #1 finished - Result: false
+ echo Test #3 finished - Result: true
Test #3 finished - Result: true
Running: Allocate node : Body : End
Running: Allocate node : End
Running: Allocate node : Body : End
Running: Allocate node : End
Running: Execute sub-workflows in parallel : Body : End
Running: Execute sub-workflows in parallel : Body : End
Running: Execute sub-workflows in parallel : End
Running: Allocate node : Body : End
Running: Allocate node : End
Running: End of Workflow
Finished: SUCCESS

Reply via email to