-
Bug
-
Resolution: Fixed
-
Major
-
None
-
workflow-cps:2.7.1
-
-
workflow-cps 2.73
I currently work on a plugin ([Templating Engine Plugin|https://plugins.jenkins.io/templating-engine]) that relies on being able to leverage metaprogramming techniques such as using snippets like:
InvokerHelper.getMetaClass(impl).invokeMethod(impl, methodName, args)
or methodMissing to control program flow.
The introduction of logging CPS mismatched method names has resulted in continuously logging these occurrences.
Is there a way to work around the CPS mismatch logs for instances such as leveraging methodMissing or the InvokerHelper to dynamically execute methods?
methodMissing log:
expected to call org.boozallen.plugins.jte.binding.injectors.StepWrapper.doThing but wound up catching org.boozallen.plugins.jte.binding.injectors.StepWrapper.methodMissing; see: https://jenkins.io/redirect/pipeline-cps-method-mismatches/ expected to call org.boozallen.plugins.jte.hooks.Hooks.invoke but wound up catching script15632181891161818312862.call; see: https://jenkins.io/redirect/pipeline-cps-method-mismatches/
InvokerHelper log:
expected to call groovy.lang.ExpandoMetaClass.invokeMethod but wound up catching script1563218188258613791966.doThing; see: https://jenkins.io/redirect/pipeline-cps-method-mismatches/
Simplest example to reproduce:
import org.codehaus.groovy.runtime.InvokerHelper c = { println "doing a thing" } InvokerHelper.getMetaClass(c).invokeMethod(c, "call", null)
- is caused by
-
JENKINS-31314 Running asynchronous code inside a @NonCPS method should fail cleanly
- Resolved
- links to