Re: Compatability with parallel
On Mon, Sep 26, 2016 at 11:53 AM, wrote: > I can't seem to pinpoint the exact issue when it crashes Without at least some information about the step you are writing and the script you are trying to demonstrate it with, it is hard to help. Narrow it down to a minimal reproducible test case. BTW you seem to be using deprecated non-block-scoped `stage`, and doing it inside `parallel` which was never supported. -- 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 jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr1d-R54QgMS-C6hw472BKGjfVsykJVeLom%2BR%3DKZRZeFmg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: Compatability with parallel
Thanks! Yes, I still can't trace the source, I need to inspect threads more carefully to try to catch it. Are there any methods that i need to look into - given the below exceptions? PM org.jenkinsci.plugins.workflow.cps.CpsStepContext onFailure WARNING: already completed CpsStepContext[30]:Owner[new pipe test/5:new pipe test #5] java.lang.IllegalStateException: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException at org.jenkinsci.plugins.workflow.cps.CpsStepContext.onFailure(CpsStepContext.java:325) at org.jenkinsci.plugins.workflow.steps.BodyExecutionCallback$Wrapper.onFailure(BodyExecutionCallback.java:89) at org.jenkinsci.plugins.workflow.cps.CpsBodyExecution$FailureAdapter.receive(CpsBodyExecution.java:278) at com.cloudbees.groovy.cps.impl.ThrowBlock$1.receive(ThrowBlock.java:68) at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21) at com.cloudbees.groovy.cps.Next.step(Next.java:58) at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:154) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:33) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:30) at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:108) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:30) at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:163) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:324) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$100(CpsThreadGroup.java:78) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:236) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:224) at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:63) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112) at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException at org.jenkinsci.plugins.workflow.cps.CpsStepContext$2.onSuccess(CpsStepContext.java:382) at org.jenkinsci.plugins.workflow.cps.CpsStepContext$2.onSuccess(CpsStepContext.java:362) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$4$1.run(CpsFlowExecution.java:627) at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.run(CpsVmExecutorService.java:35) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ... 8 more Caused by: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException at org.jenkinsci.plugins.workflow.cps.CpsBodyExecution.cancel(CpsBodyExecution.java:189) at org.jenkinsci.plugins.workflow.steps.BodyExecution.cancel(BodyExecution.java:76) at org.jenkinsci.plugins.workflow.cps.steps.ParallelStepExecution.stop(ParallelStepExecution.java:66) at org.jenkinsci.plugins.workflow.cps.steps.ParallelStep$ResultHandler$Callback.checkAllDone(ParallelStep.java:144) at org.jenkinsci.plugins.workflow.cps.steps.ParallelStep$ResultHandler$Callback.onFailure(ParallelStep.java:131) at org.jenkinsci.plugins.workflow.cps.CpsBodyExecution$FailureAdapter.receive(CpsBodyExecution.java:278) at com.cloudbees.groovy.cps.impl.ThrowBlock$1.receive(ThrowBlock.java:68) at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21) at com.cloudbees.groovy.cps.Next.step(Next.java:58) at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:154) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:33) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:30) at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:108) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:30) at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:163) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:324) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$100
Re: Compatability with parallel
Thanks for the answer! Currently, I can't seem to pinpoint the exact issue when it crashes and I'm still thinking of the appropriate way to debug it. Maybe it's due to the fact that I'm using Abstract Sync non block step? instead of the ASync one? although I don't see that as an issue. PM org.jenkinsci.plugins.workflow.cps.CpsStepContext onFailure WARNING: already completed CpsStepContext[30]:Owner[new pipe test/5:new pipe test #5] java.lang.IllegalStateException: org.jenkinsci.plugins.workflow.steps. FlowInterruptedException at org.jenkinsci.plugins.workflow.cps.CpsStepContext.onFailure( CpsStepContext.java:325) at org.jenkinsci.plugins.workflow.steps.BodyExecutionCallback$Wrapper. onFailure(BodyExecutionCallback.java:89) at org.jenkinsci.plugins.workflow.cps.CpsBodyExecution$FailureAdapter. receive(CpsBodyExecution.java:278) at com.cloudbees.groovy.cps.impl.ThrowBlock$1.receive(ThrowBlock.java:68 ) at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java: 21) at com.cloudbees.groovy.cps.Next.step(Next.java:58) at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:154) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001( SandboxContinuable.java:18) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call( SandboxContinuable.java:33) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call( SandboxContinuable.java:30) at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox. runInSandbox(GroovySandbox.java:108) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0( SandboxContinuable.java:30) at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread. java:163) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup. java:324) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$100( CpsThreadGroup.java:78) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call( CpsThreadGroup.java:236) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call( CpsThreadGroup.java:224) at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call( CpsVmExecutorService.java:63) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at hudson.remoting.SingleLaneExecutorService$1.run( SingleLaneExecutorService.java:112) at jenkins.util.ContextResettingExecutorService$1.run( ContextResettingExecutorService.java:28) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java: 511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor. java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor .java:617) at java.lang.Thread.run(Thread.java:745) Caused by: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException at org.jenkinsci.plugins.workflow.cps.CpsStepContext$2.onSuccess( CpsStepContext.java:382) at org.jenkinsci.plugins.workflow.cps.CpsStepContext$2.onSuccess( CpsStepContext.java:362) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$4$1.run( CpsFlowExecution.java:627) at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.run( CpsVmExecutorService.java:35) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java: 511) ... 8 more Caused by: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException at org.jenkinsci.plugins.workflow.cps.CpsBodyExecution.cancel( CpsBodyExecution.java:189) at org.jenkinsci.plugins.workflow.steps.BodyExecution.cancel( BodyExecution.java:76) at org.jenkinsci.plugins.workflow.cps.steps.ParallelStepExecution.stop( ParallelStepExecution.java:66) at org.jenkinsci.plugins.workflow.cps.steps. ParallelStep$ResultHandler$Callback.checkAllDone(ParallelStep.java:144) at org.jenkinsci.plugins.workflow.cps.steps. ParallelStep$ResultHandler$Callback.onFailure(ParallelStep.java:131) at org.jenkinsci.plugins.workflow.cps.CpsBodyExecution$FailureAdapter. receive(CpsBodyExecution.java:278) at com.cloudbees.groovy.cps.impl.ThrowBlock$1.receive(ThrowBlock.java:68 ) at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java: 21) at com.cloudbees.groovy.cps.Next.step(Next.java:58) at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:154) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001( SandboxContinuable.java:18) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call( SandboxContinuable.java:33) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call( SandboxContinuable.java:30) at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox. runInSandbox(GroovySandbox.java:108) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0( SandboxContinuable.java:30) at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread. java:163) at org.jenkinsci.plugins.workflow.cps.CpsThrea
Re: Compatability with parallel
On Wed, Sep 21, 2016 at 8:03 AM, wrote: > I'd like our plugin to support the parallel step (in pipelines). > I haven't found any documentation on what steps / methods i should implement > to ensure our support. There is nothing specific you need to implement. Does it currently work in a Pipeline build that is not using `parallel` but fail in one that is? If so, how? The Pipeline APIs are designed to allow access to contextual objects using dynamic scopes; each step accepting a block argument potentially introduces a scope with added/overridden context, and each step may access a context. For example, in parallel linux: { node('linux') { sh 'make' } }, windows: { node('windows') { bat 'msbuild' } } the `sh` and `bat` steps each get access to various API objects such as a `FilePath` and `Launcher`, supplied by the enclosing `node`. One thing to note: if a script sets environment variables using the syntax env.SOME_SERVICE_URL = 'https://someservice.corp/' that setting takes effect for the remainder of the build, regardless of scopes. (Such variables also get exposed via the REST API and to upstream builds using the `build` step, so they can be used to “export” simple data from a build.) Any variables that might need to vary by machine or operating system should generally be set using the `withEnv` step so they scope properly: parallel linux: { node('linux') { withEnv(["PATH=${tool 'gnumake'}/bin:${env.PATH}"]) { sh 'make' } } }, windows: { node('windows') { // uses default %Path% bat 'msbuild' } } (Various other block-scoped steps such as `withCredentials` also set environment variables contextually.) -- 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 jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr2zbYF%3Di%3D7TtDrEhtWiMAvZT3CyhhaHgQ0vnqRGY1XD5g%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.