[JIRA] (JENKINS-59492) False positive CPS mismatch warning when calling a method pointer

4 views
Skip to first unread message

roman.donchenko@intel.com (JIRA)

unread,
Sep 23, 2019, 12:32:03 PM9/23/19
to jenkinsc...@googlegroups.com
Roman Donchenko created an issue
 
Jenkins / Bug JENKINS-59492
False positive CPS mismatch warning when calling a method pointer
Issue Type: Bug Bug
Assignee: Unassigned
Components: workflow-cps-plugin
Created: 2019-09-23 16:31
Environment: Jenkins: 2.176.3
Pipeline: Groovy: 2.74
Priority: Minor Minor
Reporter: Roman Donchenko

Run this pipeline:

def hello() {
 echo 'hello'
}

(this.&hello).call()

The output is as follows:

[Pipeline] Start of Pipeline
expected to call org.kohsuke.groovy.sandbox.impl.SandboxedMethodClosure.call but wound up catching WorkflowScript.hello; see: https://jenkins.io/redirect/pipeline-cps-method-mismatches/
[Pipeline] echo
hello
[Pipeline] End of Pipeline
Finished: SUCCESS

As evidenced by the "hello" output, the hello method runs normally, so the warning is a false positive.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

vfreex@gmail.com (JIRA)

unread,
Dec 4, 2019, 10:41:03 PM12/4/19
to jenkinsc...@googlegroups.com
Yuxiang Zhu commented on Bug JENKINS-59492
 
Re: False positive CPS mismatch warning when calling a method pointer

We came across the exact same warning when calling a method via a pointer. The method is called correctly and works fine, apparently this is a false positive warning.

Pointers are assigned with https://github.com/openshift/aos-cd-jobs/pull/2053/files#diff-b89f72b7074288d1245c7ece87537d33R13-R19 and called at
https://github.com/openshift/aos-cd-jobs/pull/2053/files#diff-b89f72b7074288d1245c7ece87537d33R111

Reply all
Reply to author
Forward
0 new messages