[JIRA] (JENKINS-42895) Pipeline stage view is not showing the stages visually

2017-03-28 Thread alexander.olofs...@liu.se (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alexander Olofsson edited a comment on  JENKINS-42895  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Pipeline stage view is not showing the stages visually   
 

  
 
 
 
 

 
 Ran into this issue as well,Jenkins ver. 2.52, CentOS 7.3.1611, OpenJDK 1.8.0_121The GET for https://jenkins.fqdn/job/.../wfapi/runs?fullStages=true&_=1490691857430 fails with a 500 error and the following stack trace;{code}java.lang.IllegalStateException: Hit a BlockStartNode with no record of the start! at org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner.hitParallelStart(ForkScanner.java:554) at org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner.next(ForkScanner.java:584) at org.jenkinsci.plugins.workflow.graphanalysis.AbstractFlowScanner.next(AbstractFlowScanner.java:212) at org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner.next(ForkScanner.java:566) at org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner.visitSimpleChunks(ForkScanner.java:764) at org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner.visitSimpleChunks(ForkScanner.java:635) at com.cloudbees.workflow.rest.external.RunExt.createNew(RunExt.java:318) at com.cloudbees.workflow.rest.external.RunExt.create(RunExt.java:306) at com.cloudbees.workflow.rest.external.JobExt.create(JobExt.java:131) at com.cloudbees.workflow.rest.endpoints.JobAPI.doRuns(JobAPI.java:72) at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627) at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343)Caused: java.lang.reflect.InvocationTargetException at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:347) at com.cloudbees.workflow.util.ServeJson$Processor.invoke(ServeJson.java:30)Caused: java.lang.RuntimeException: Unexpected exception while serving JSON at com.cloudbees.workflow.util.ServeJson$Processor.invoke(ServeJson.java:34) at org.kohsuke.stapler.PreInvokeInterceptedFunction.invoke(PreInvokeInterceptedFunction.java:26)...{code} I discovered a way to replicate this as well, just run the following pipeline and this will break;{code:groovy}// Worksstage('Stage A') {echo "A"}// Worksstage('Stage B') {parallel a: {echo "B.A"}, b: {echo "B.B"}}// Breaksstage('Stage C') {def steps = [:]// Empty mapparallel steps}{code}  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

[JIRA] (JENKINS-42895) Pipeline stage view is not showing the stages visually

2017-03-28 Thread alexander.olofs...@liu.se (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alexander Olofsson edited a comment on  JENKINS-42895  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Pipeline stage view is not showing the stages visually   
 

  
 
 
 
 

 
 Ran into this issue as well,Jenkins ver. 2.52, CentOS 7.3.1611, OpenJDK 1.8.0_121The GET for https://jenkins.fqdn/job/.../wfapi/runs?fullStages=true&_=1490691857430 fails with a 500 error and the following stack trace;{code}java.lang.IllegalStateException: Hit a BlockStartNode with no record of the start! at org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner.hitParallelStart(ForkScanner.java:554) at org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner.next(ForkScanner.java:584) at org.jenkinsci.plugins.workflow.graphanalysis.AbstractFlowScanner.next(AbstractFlowScanner.java:212) at org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner.next(ForkScanner.java:566) at org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner.visitSimpleChunks(ForkScanner.java:764) at org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner.visitSimpleChunks(ForkScanner.java:635) at com.cloudbees.workflow.rest.external.RunExt.createNew(RunExt.java:318) at com.cloudbees.workflow.rest.external.RunExt.create(RunExt.java:306) at com.cloudbees.workflow.rest.external.JobExt.create(JobExt.java:131) at com.cloudbees.workflow.rest.endpoints.JobAPI.doRuns(JobAPI.java:72) at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627) at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343)Caused: java.lang.reflect.InvocationTargetException at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:347) at com.cloudbees.workflow.util.ServeJson$Processor.invoke(ServeJson.java:30)Caused: java.lang.RuntimeException: Unexpected exception while serving JSON at com.cloudbees.workflow.util.ServeJson$Processor.invoke(ServeJson.java:34) at org.kohsuke.stapler.PreInvokeInterceptedFunction.invoke(PreInvokeInterceptedFunction.java:26)...{code}I discovered a way to replicate this as well, just run the following pipeline and this will break;{code :groovy }// Worksstage('Stage A') {echo "A"}// Worksstage('Stage B') {parallel a: {echo "B.A"}, b: {echo "B.B"}}// Breaksstage('Stage C') {def steps = [:]// Empty mapparallel steps}{code}  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 
   

[JIRA] (JENKINS-42895) Pipeline stage view is not showing the stages visually

2017-03-28 Thread alexander.olofs...@liu.se (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alexander Olofsson commented on  JENKINS-42895  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Pipeline stage view is not showing the stages visually   
 

  
 
 
 
 

 
 Ran into this issue as well, Jenkins ver. 2.52, CentOS 7.3.1611, OpenJDK 1.8.0_121 The GET for https://jenkins.fqdn/job/.../wfapi/runs?fullStages=true&_=1490691857430 fails with a 500 error and the following stack trace; 

 

java.lang.IllegalStateException: Hit a BlockStartNode with no record of the start!
	at org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner.hitParallelStart(ForkScanner.java:554)
	at org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner.next(ForkScanner.java:584)
	at org.jenkinsci.plugins.workflow.graphanalysis.AbstractFlowScanner.next(AbstractFlowScanner.java:212)
	at org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner.next(ForkScanner.java:566)
	at org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner.visitSimpleChunks(ForkScanner.java:764)
	at org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner.visitSimpleChunks(ForkScanner.java:635)
	at com.cloudbees.workflow.rest.external.RunExt.createNew(RunExt.java:318)
	at com.cloudbees.workflow.rest.external.RunExt.create(RunExt.java:306)
	at com.cloudbees.workflow.rest.external.JobExt.create(JobExt.java:131)
	at com.cloudbees.workflow.rest.endpoints.JobAPI.doRuns(JobAPI.java:72)
	at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
	at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343)
Caused: java.lang.reflect.InvocationTargetException
	at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:347)
	at com.cloudbees.workflow.util.ServeJson$Processor.invoke(ServeJson.java:30)
Caused: java.lang.RuntimeException: Unexpected exception while serving JSON
	at com.cloudbees.workflow.util.ServeJson$Processor.invoke(ServeJson.java:34)
	at org.kohsuke.stapler.PreInvokeInterceptedFunction.invoke(PreInvokeInterceptedFunction.java:26)
...
 

  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 

[JIRA] (JENKINS-38268) Parallel step and closure scope

2016-10-25 Thread alexander.olofs...@liu.se (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alexander Olofsson commented on  JENKINS-38268  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Parallel step and closure scope   
 

  
 
 
 
 

 
 To be honest, currying was just a good way to showcase the issue. Anything that embeds a value into the closure seems to be lost in parallelisation, so even wrapping the closure into another one that feeds it the value as a static parameter doesn't work. (file30 and file31 in the example) Ran into this when trying to create a list of parallel steps out of files from a folder, to spread out a series of fixed-time workloads onto many executors so that the build step wouldn't take as much time. Tried everything I could think of to work around the problem, not even rolling my own closure class to store the value worked.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-38268) Parallel step and closure scope

2016-10-25 Thread alexander.olofs...@liu.se (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alexander Olofsson commented on  JENKINS-38268  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Parallel step and closure scope   
 

  
 
 
 
 

 
 Been able to replicate this consistently without having to add a node block, in fact I still haven't found a way to not replicate it. Composited closures also seem to be even more unhappy about being parallelized. Script: 

 

def heavyweight_task = { fn->
println "Doing heavy work on ${fn}..."
}

def work = [
file10: heavyweight_task.curry('file10'),
file11: heavyweight_task.curry('file11'),
file20: ({'file20'} >> heavyweight_task),
file21: ({'file21'} >> heavyweight_task),
file30: { heavyweight_task.call('file30') },
file31: { heavyweight_task.call('file31') },
file40: heavyweight_task.clone().curry('file40'),
file41: heavyweight_task.clone().curry('file41'),
file50: heavyweight_task.dehydrate().curry('file50'),
file51: heavyweight_task.dehydrate().curry('file51'),
]

parallel(work)
 

 output: 

 

[Pipeline] parallel
[Pipeline] [file10] { (Branch: file10)
[Pipeline] [file11] { (Branch: file11)
[Pipeline] [file20] { (Branch: file20)
[Pipeline] [file21] { (Branch: file21)
[Pipeline] [file30] { (Branch: file30)
[Pipeline] [file31] { (Branch: file31)
[Pipeline] [file40] { (Branch: file40)
[Pipeline] [file41] { (Branch: file41)
[Pipeline] [file50] { (Branch: file50)
[Pipeline] [file51] { (Branch: file51)
[Pipeline] [file10] echo
[file10] Doing heavy work on file51...
[Pipeline] [file10] }
[Pipeline] [file11] echo
[file11] Doing heavy work on file51...
[Pipeline] [file11] }
[Pipeline] [file20] }
[Pipeline] [file21] }
[Pipeline] [file40] echo
[file40] Doing heavy work on file31...
[Pipeline] [file40] }
[Pipeline] [file41] echo
[file41] Doing heavy work on file31...
[Pipeline] [file41] }
[Pipeline] [file50] echo
[file50] Doing heavy work on file31...
[Pipeline] [file50] }
[Pipeline] [file51] echo
[file51] Doing heavy work on file31...
[Pipeline] [file51] }
[Pipeline] [file30] echo
[file30] Doing heavy work on file31...
[Pipeline] [file30] }
[Pipeline] [file31] echo
[file31] Doing heavy work on file31...
[Pipeline] [file31] }
[Pipeline] // parallel
[Pipeline] End of Pipeline
 

  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment