Re: Build flow plugin serialization

2015-06-24 Thread jan_lut
update:

Diving into stack trace has revealed the suspision that the line

myDSL.build.setDisplayName(params["PARAMETER"]) 

Caused the issue. The exact same syntax used in other jobs worked fine and
continued to work fine after the updates (or maybe just a coincidence?), but
for some reason refused to work in this particular job. It is worth being
mentioned that even job configs are relatively similar. Just out of pure
curiosity would be interesting what can cause this behavior. Anyone has got
an idea?

//Jan



--
View this message in context: 
http://jenkins-ci.361315.n4.nabble.com/Build-flow-plugin-serialization-tp4756393p4756402.html
Sent from the Jenkins users mailing list archive at Nabble.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/1434723468894-4756402.post%40n4.nabble.com.
For more options, visit https://groups.google.com/d/optout.


Build flow plugin serialization

2015-06-24 Thread jan_lut
Hi,

After upgrading  Build Flow Plugin
   from 0.14
to 0.18 
and installing  Claim Plugin
   I'm getting an
error when running fairly simple build flow dsl script:

import static hudson.model.Result.FAILURE
import static hudson.model.Result.SUCCESS

class test_trigger_arm_stub {

  def myDSL;

  def do_test_trigger(dsl, params) {
out.println "do_test_trigger started"
myDSL = dsl

myDSL.build.setDisplayName(params["PARAMETER"])

myDSL.retry 2, { myDSL.build("test",
  PARAMETER: params["PARAMETER"])}

out.println "do_test_trigger done"
  }
}


Any ideas what went wrong here? Downgrading the build flow plugin from 0.18
to 0.17 and then 0.14 didn't resolve the issue. Also, other dsl scripts seem
to execute just fine. Only this job fails. Jenkins core is 1580.3 and it
looks to be ok for these plugins.

ERROR: Failed to run DSL Script java.lang.RuntimeException: Failed to
serialize hudson.model.Actionable#actions for class
com.cloudbees.plugins.flow.FlowRun  at
hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:214)
 
at
hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:182)
 
at
com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
 
at
hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:167)
 
at
hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:108)
 
at
com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
 
at
com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
 
at
com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
 
at
com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:82) 
at
com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37)
 
at com.thoughtworks.xstream.XStream.marshal(XStream.java:1026)  at
com.thoughtworks.xstream.XStream.marshal(XStream.java:1015) at
com.thoughtworks.xstream.XStream.toXML(XStream.java:988)at
hudson.XmlFile.write(XmlFile.java:178)  at
hudson.model.Run.save(Run.java:1915)at
hudson.model.Run.setDisplayName(Run.java:782)   at
hudson.model.Run$setDisplayName.call(Unknown Source)at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
 
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
 
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
 
at
test_trigger_arm_stub.do_test_trigger_arm_stub(test_trigger_yb_arm_stub.groovy:13)
 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 
at java.lang.reflect.Method.invoke(Method.java:606) at
org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at
org.codehaus.groovy.runtime.metaclass.MixinInstanceMetaMethod.invoke(MixinInstanceMetaMethod.java:53)
 
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)   at
groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1079) at
groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1106)   at
groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:903)  at
groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:723)  at
com.cloudbees.plugins.flow.FlowDelegate.invokeMethod(FlowDSL.groovy)at
hudson.util.spring.ClosureScript.invokeMethod(ClosureScript.java:83)at
org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:72)
 
at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46)
 
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
 
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:145)
 
at Script1.run(Script1.groovy:3)at Script1$run.call(Unknown Source) 
at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
 
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
 
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
 
at com.cloudbees.plugins.flow.FlowDSL.executeFlowScript(FlowDSL.groovy:84) 
at
com.cloudbees.plugins.flow.FlowRun$FlyweightTaskRunnerImpl.run(FlowRun.java:219)
 
at hudson.model.Run.execute(Run.java:1745)  at
com.cloudbees.plugins.flow.FlowRun.run(FlowRun.java:155)at
hudson.model.ResourceController.execute(ResourceController.java:89) at
hudson.model.Executor.run(Executor.java:240)at
huds