[JIRA] (JENKINS-60552) Fail to call a script method stored as a class attribute/field

2019-12-20 Thread dicom...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dicom J commented on  JENKINS-60552  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Fail to call a script method stored as a class attribute/field   
 

  
 
 
 
 

 
 Thanks Jesse Glick, I really appreciate your replies! Yes, workaround would work. Regarding JFR - here, you're right as well. Actually we use both, JFR to develop pipelines locally and Jenkins run production mode. So we try to keep codebase same for JFR and regular Jenkins, IOW we try to avoid "if (JFR)" statements.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.203658.1576835641000.14275.1576856940121%40Atlassian.JIRA.


[JIRA] (JENKINS-60552) Fail to call a script method stored as a class attribute/field

2019-12-20 Thread dicom...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dicom J commented on  JENKINS-60552  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Fail to call a script method stored as a class attribute/field   
 

  
 
 
 
 

 
 same as https://issues.jenkins-ci.org/browse/JENKINS-58407    
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.203658.1576835641000.14043.1576838580102%40Atlassian.JIRA.


[JIRA] (JENKINS-60552) Fail to call a script method stored as a class attribute/field

2019-12-20 Thread dicom...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dicom J commented on  JENKINS-60552  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Fail to call a script method stored as a class attribute/field   
 

  
 
 
 
 

 
 cc: Jesse Glick  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.203658.1576835641000.13987.1576835760172%40Atlassian.JIRA.


[JIRA] (JENKINS-60552) Fail to call a script method stored as a class attribute/field

2019-12-20 Thread dicom...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dicom J updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-60552  
 
 
  Fail to call a script method stored as a class attribute/field   
 

  
 
 
 
 

 
Change By: 
 Dicom J  
 

  
 
 
 
 

 
 Similar case to [https://wiki.jenkins.io/display/JENKINS/Pipeline+CPS+method+mismatches#PipelineCPSmethodmismatches-Directinvocationofclosuresstoredinobjectfieldsormaps]But instead of Closure,  but  this time the method from loaded script is called, what could be simulated right now even in a single Jenkins file.{code:java}def scriptMethod() {    println 'passed'}class Test {  def fn}node {    def object = new Test()    object.fn = this.    object.fn.call()} {code}Got an exception:{code:java}java.lang.IllegalStateException: expected to call org.codehaus.groovy.runtime.MethodClosure.call but wound up catching WorkflowScript.scriptMethod; see: https://jenkins.io/redirect/pipeline-cps-method-mismatches/at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService.handleMismatch(CpsVmExecutorService.java:123) at com.cloudbees.groovy.cps.impl.CpsCallableInvocation.checkMismatch(CpsCallableInvocation.java:98)  {code}  btw, Closure case works fine now. But this is critical as it doesn't allow to break a single Jenkinsfile into a couple of smaller modules (scripts).    
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   

[JIRA] (JENKINS-60552) Fail to call a script method stored as a class attribute/field

2019-12-20 Thread dicom...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dicom J created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-60552  
 
 
  Fail to call a script method stored as a class attribute/field   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Andrew Bayer  
 
 
Components: 
 groovy-plugin, workflow-cps-plugin  
 
 
Created: 
 2019-12-20 09:54  
 
 
Priority: 
  Blocker  
 
 
Reporter: 
 Dicom J  
 

  
 
 
 
 

 
 Similar case to  https://wiki.jenkins.io/display/JENKINS/Pipeline+CPS+method+mismatches#PipelineCPSmethodmismatches-Directinvocationofclosuresstoredinobjectfieldsormaps But instead of Closure, but this time the method from loaded script is called, what could be simulated right now even in a single Jenkins file. 

 

def scriptMethod() {
    println 'passed'
}


class Test {
  def fn
}


node {
    def object = new Test()
    object.fn = this.
    object.fn.call()
}  

 Got an exception: 

 

java.lang.IllegalStateException: expected to call org.codehaus.groovy.runtime.MethodClosure.call but wound up catching WorkflowScript.scriptMethod; see: https://jenkins.io/redirect/pipe
line-cps-method-mismatches/
at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService.handleMismatch(CpsVmExecutorService.java:123) at com.cloudbees.groovy.cps.impl.CpsCallableInvocation.checkMismatch(CpsCallableInvocation.java:98)   

 btw, Closure case works fine now. But this is critical as it doesn't allow to break a single Jenkinsfile into a couple of smaller modules (scripts).  
 
  

[JIRA] (JENKINS-60166) Need a simple(regular) way to control version of Jenkins & plugins built into JFR

2019-11-14 Thread dicom...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dicom J created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-60166  
 
 
  Need a simple(regular) way to control version of Jenkins & plugins built into JFR   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Oleg Nenashev  
 
 
Components: 
 jenkinsfile-runner  
 
 
Created: 
 2019-11-14 08:23  
 
 
Priority: 
  Blocker  
 
 
Reporter: 
 Dicom J  
 

  
 
 
 
 

 
 The following document describes a way to set Jenkins version & plugins via JENKINS_VERSION docker argument & plugins.txt correspondingly: https://github.com/jenkinsci/jenkinsfile-runner/blob/master/DOCKER.md#building-the-vanilla-image Seem's like this option no longer available and there's a discrepancy between document and implementation. It there're a way to preserve this option and having pom originated dependencies handled by some other dockerfile, like Docker-pom-deps ?  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  

[JIRA] (JENKINS-58407) Fail to call a Closure stored as a class attribute/field

2019-10-31 Thread dicom...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dicom J commented on  JENKINS-58407  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Fail to call a Closure stored as a class attribute/field   
 

  
 
 
 
 

 
 Thanks, Devin Nusbaum, for very good news, I've been waiting a while for this cut... Thanks a lot all of you, participated in getting it done!  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.200534.1562691597000.6473.1572554640425%40Atlassian.JIRA.


[JIRA] (JENKINS-59676) `java.lang.ClassNotFoundException: org.kohsuke.putty.PuTTYKey` on scm step

2019-10-06 Thread dicom...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dicom J edited a comment on  JENKINS-59676  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: `java.lang.ClassNotFoundException: org.kohsuke.putty.PuTTYKey` on scm step   
 

  
 
 
 
 

 
 [~markewaite], thanks, I'm fine  as I figured out it right away that explicitly adding trilead-api plugin would resolve the issues. the one you see in Environment section is "trilead-api:1.0.5 - []" is my explicit addition to the latest, git-client and the rest plugins depend on "trilead-api (1.0.4) optional" what it's optional dependency and  wast  was  not installed in my case.So I run into this when I did everything from stretch and "by the book" rom GA repos, without adding "trilead-api" as I din't even know about  it  and none of the plugins installed it. So if I ran into this, there's a chance that somebody else would. So I just decided to let you guys know. That's it.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.202369.157027011.1862.1570383960184%40Atlassian.JIRA.


[JIRA] (JENKINS-59676) `java.lang.ClassNotFoundException: org.kohsuke.putty.PuTTYKey` on scm step

2019-10-06 Thread dicom...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dicom J commented on  JENKINS-59676  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: `java.lang.ClassNotFoundException: org.kohsuke.putty.PuTTYKey` on scm step   
 

  
 
 
 
 

 
 Installed to resolve the problem  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.202369.157027011.1858.1570383780141%40Atlassian.JIRA.


[JIRA] (JENKINS-59667) CpsCallableInvocation.checkMismatch with @NonCPS method calling simple groovy getter (not any step)

2019-10-06 Thread dicom...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dicom J commented on  JENKINS-59667  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: CpsCallableInvocation.checkMismatch with @NonCPS method calling simple groovy getter (not any step)   
 

  
 
 
 
 

 
 Jesse Glick, I figured this out and even put that into description: > Obviously it's possible to put in @NonCPS for getFullName but that simply means that almost all methods by default must be @NonCPS, and only those that call steps must be CPS ones. Anyways, thanks, it's good to know, I was just wondering as it was working before a new implementation of checkMismatch which doesn't complain about CPS itself but about mismatch of calls which is quite not that obvious but it gives good reference to the page describing all that.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.202359.1570215155000.1723.1570367820123%40Atlassian.JIRA.


[JIRA] (JENKINS-59676) `java.lang.ClassNotFoundException: org.kohsuke.putty.PuTTYKey` on scm step

2019-10-06 Thread dicom...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dicom J commented on  JENKINS-59676  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: `java.lang.ClassNotFoundException: org.kohsuke.putty.PuTTYKey` on scm step   
 

  
 
 
 
 

 
 Mark Waite, thanks, I'm fine  as I figured out it right away that explicitly adding trilead-api plugin would resolve the issues. the one you see in Environment section is "trilead-api:1.0.5 - []" is my explicit addition to the latest, git-client and the rest plugins depend on "trilead-api (1.0.4) optional" what it's optional dependency and wast not installed in my case. So I run into this when I did everything from stretch and "by the book" rom GA repos, without adding "trilead-api" as I din't even know about and none of the plugins installed it. So if I ran into this, there's a chance that somebody else would. So I just decided to let you guys know. That's it.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.202369.157027011.1721.1570365900243%40Atlassian.JIRA.


[JIRA] (JENKINS-59676) `java.lang.ClassNotFoundException: org.kohsuke.putty.PuTTYKey` on scm step

2019-10-06 Thread dicom...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dicom J commented on  JENKINS-59676  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: `java.lang.ClassNotFoundException: org.kohsuke.putty.PuTTYKey` on scm step   
 

  
 
 
 
 

 
 Mark Waite, this "pre-release" build (I hope you meant plugin) is installed as the "latest" along with Jenkins Version 2.190.1, which appears on LTS list https://jenkins.io/changelog-stable/...  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.202369.157027011.1677.1570363440177%40Atlassian.JIRA.


[JIRA] (JENKINS-59667) CpsCallableInvocation.checkMismatch with @NonCPS method calling simple groovy getter (not any step)

2019-10-05 Thread dicom...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dicom J commented on  JENKINS-59667  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: CpsCallableInvocation.checkMismatch with @NonCPS method calling simple groovy getter (not any step)   
 

  
 
 
 
 

 
 CC: Jesse Glick  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.202359.1570215155000.1650.1570318980136%40Atlassian.JIRA.


[JIRA] (JENKINS-43610) Split Trilead out from Core

2019-10-05 Thread dicom...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dicom J commented on  JENKINS-43610  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Split Trilead out from Core   
 

  
 
 
 
 

 
 Ivan Fernandez Calvo, you've got it https://issues.jenkins-ci.org/browse/JENKINS-59676. Please find "Environment" section for the details about Jenkins version, plugins and theirs dependencies in square brackets.   
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.181011.1492247358000.1481.1570270501050%40Atlassian.JIRA.


[JIRA] (JENKINS-43610) Split Trilead out from Core

2019-10-05 Thread dicom...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dicom J updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-43610  
 
 
  Split Trilead out from Core   
 

  
 
 
 
 

 
Change By: 
 Dicom J  
 
 
Comment: 
 [~oleg_nenashev], with that amount of plugins {code:java}configuration-as-code-support:latestconfiguration-as-code:latestcredentials-binding:latestdocker-workflow:latestfilesystem_scm:latestgit:latestpipeline-model-definition:latestpipeline-utility-steps:latestssh-agent:latestssh-steps:latestworkflow-cps:latestws-cleanup:latest{code}all having latest, today I've got something like`java.lang.ClassNotFoundException: org.kohsuke.putty.PuTTYKey` on scm step{code:java}java.lang.ClassNotFoundException: org.kohsuke.putty.PuTTYKey        at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1383)        at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1336)        at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1083)        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)Caused: java.lang.NoClassDefFoundError: org/kohsuke/putty/PuTTYKey        at com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey.getPrivateKeys(BasicSSHUserPrivateKey.java:174)        at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.createSshKeyFile(CliGitAPIImpl.java:1878)        at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1793)        at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$500(CliGitAPIImpl.java:78)        at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:545)        at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:758)        at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1152)        at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1192)        at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:124)        at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:93)        at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:80)        at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)        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:1149)        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)        at java.lang.Thread.run(Thread.java:748) {code}After explicitly adding trilead-api:latest to the list of plugins issue's gone. So something's wrong with dependencies ?   
 

  
 
 
 
 

 
 
 


[JIRA] (JENKINS-59676) `java.lang.ClassNotFoundException: org.kohsuke.putty.PuTTYKey` on scm step

2019-10-05 Thread dicom...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dicom J created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-59676  
 
 
  `java.lang.ClassNotFoundException: org.kohsuke.putty.PuTTYKey` on scm step   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Ivan Fernandez Calvo  
 
 
Components: 
 trilead-api-plugin  
 
 
Created: 
 2019-10-05 10:08  
 
 
Environment: 
 Jenkins Version 2.190.1   ace-editor:1.1 - [bouncycastle-api (2.16.0) optional, trilead-api (1.0.4) optional]  allure-jenkins-plugin:2.28.1 - [script-security (1.25), matrix-project (1.11), structs (1.5) optional, workflow-step-api (2.4) optional, bouncycastle-api (2.16.0) optional, trilead-api (1.0.4) optional]  apache-httpcomponents-client-4-api:4.5.10-1.0 - [trilead-api (1.0.4) optional]  authentication-tokens:1.3 - [credentials (1.22), bouncycastle-api (2.16.0) optional, trilead-api (1.0.4) optional]  bouncycastle-api:2.17 - [trilead-api (1.0.4) optional]  branch-api:2.5.4 - [cloudbees-folder (6.9), scm-api (2.4.1), structs (1.18), trilead-api (1.0.4) optional]  cloudbees-folder:6.9 - [credentials (2.1.11) optional, trilead-api (1.0.4) optional]  configuration-as-code-support:1.18 - [trilead-api (1.0.4) optional]  configuration-as-code:1.31 - [trilead-api (1.0.4) optional]  credentials-binding:1.20 - [workflow-step-api (2.20), credentials (2.2.0), plain-credentials (1.3), ssh-credentials (1.17.1), structs (1.19), trilead-api (1.0.4) optional]  credentials:2.3.0 - [structs (1.19), configuration-as-code (1.14) optional, trilead-api (1.0.4) optional]  display-url-api:2.3.2 - [trilead-api (1.0.4) optional]  docker-commons:1.15 - [authentication-tokens (1.3), credentials-binding (1.18), credentials (2.1.18), pipeline-model-extensions (1.3.8) optional, trilead-api (1.0.4) optional]  docker-workflow:1.19 - [workflow-api (2.8), workflow-basic-steps (2.3), workflow-cps (2.25), workflow-durable-task-step (2.8), workflow-step-api (2.18), workflow-support (2.12), docker-commons (1.14), script-security (1.25), trilead-api (1.0.4) optional]  durable-task:1.30 - [bouncycastle-api (2.16.0) optional, trilead-api (1.0.4) optional]  filesystem_scm:2.1 - [structs (1.5), bouncycastle-api (2.16.0) optional, trilead-api (1.0.4) optional]  git-client:2.8.6 - [apache-httpcomponents-client-4-api (4.5.3-2.0), credentials (2.1.13), jsch (0.1.54.1), ssh-credentials (1.13), structs (1.9), trilead-api (1.0.4) optional]  git-server:1.8 - [git-client (2.7.6), trilead-api (1.0.4) optional]  git:3.12.1 - [workflow-scm-step (2.7), workflow-step-api (2.20), credentials (2.1.18), git-client (2.7.7), mailer (1.18), matrix-project (1.7.1), scm-api (2.6.3), ssh-credentials (1.13), structs (1.19), trilead-api (1.0.4) optional]  jackson2-api:2.9.10 - [trilead-api (1.0.4) optional]  

[JIRA] (JENKINS-59667) CpsCallableInvocation.checkMismatch with @NonCPS method calling simple groovy getter (not any step)

2019-10-04 Thread dicom...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dicom J updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-59667  
 
 
  CpsCallableInvocation.checkMismatch with @NonCPS method calling simple groovy getter (not any step)   
 

  
 
 
 
 

 
Change By: 
 Dicom J  
 
 
Summary: 
 CpsCallableInvocation.checkMismatch with @NonCPS method calling  simply  simple  groovy getter (not  steps  any step )  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.202359.1570215155000.1331.1570215600231%40Atlassian.JIRA.


[JIRA] (JENKINS-59667) CpsCallableInvocation.checkMismatch with @NonCPS method calling simply groovy getter (not steps)

2019-10-04 Thread dicom...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dicom J created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-59667  
 
 
  CpsCallableInvocation.checkMismatch with @NonCPS method calling simply groovy getter (not steps)   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Andrew Bayer  
 
 
Components: 
 workflow-cps-plugin  
 
 
Created: 
 2019-10-04 18:52  
 
 
Priority: 
  Minor  
 
 
Reporter: 
 Dicom J  
 

  
 
 
 
 

 
 The following document provides an example how to handle native NonCPS methods like toString. https://wiki.jenkins.io/display/JENKINS/Pipeline+CPS+method+mismatches#PipelineCPSmethodmismatches-Overridesofnon-CPS-transformedmethods 

 

class Test {
  @Override
  public String toString() {
return "Test"
  }
}
def builder = new StringBuilder()
builder.append(new Test())
echo(builder.toString())  

   But this example is way to trivial, as toString in 99,99% returns variable information usually provided by a couple of handy methods of the class, like in this case with CPS getFullName method 

 

class Test {
String name

Test(String name) {
this.name = name
}

String getFullName() {
return 'some prefix ' + name
}

@NonCPS
@Override
public String toString() {
return this.fullName
}

}

def builder = new StringBuilder()
builder.append(new Test('foobar'))
echo(builder.toString()) 

 Previously this code worked as it doesn't call any steps as the document suggest, but now it started to raise  
 

[JIRA] (JENKINS-58407) Fail to call a Closure stored as a class attribute/field

2019-10-04 Thread dicom...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dicom J commented on  JENKINS-58407  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Fail to call a Closure stored as a class attribute/field   
 

  
 
 
 
 

 
 Andrew Bayer, your fix https://github.com/cloudbees/groovy-cps/commit/93c916d482b63bf5ed46a84d56cb934401be2020#diff-1c76c1813ed2b2b2ac87244e44c14641 is incorporated into groovy-cps-1.31, but the latest workflow-cps-2.74 still uses previous groovy-cps-1.30, https://github.com/jenkinsci/workflow-cps-plugin/blob/workflow-cps-2.74/pom.xml#L74 without the fix and so having that described here https://wiki.jenkins.io/display/JENKINS/Pipeline+CPS+method+mismatches#PipelineCPSmethodmismatches-Directinvocationofclosuresstoredinobjectfieldsormaps doesn't help much to solve the issue, as workaround (explicit call) is not in GA. So does anyone know when we may have the next cut of workflow-cps-2.75 with your fix? Thanks for any information.    
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.200534.1562691597000.1260.1570212180286%40Atlassian.JIRA.


[JIRA] (JENKINS-43610) Split Trilead out from Core

2019-10-04 Thread dicom...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dicom J commented on  JENKINS-43610  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Split Trilead out from Core   
 

  
 
 
 
 

 
 Oleg Nenashev, with that amount of plugins  

 

configuration-as-code-support:latest
configuration-as-code:latest
credentials-binding:latest
docker-workflow:latest
filesystem_scm:latest
git:latest
pipeline-model-definition:latest
pipeline-utility-steps:latest
ssh-agent:latest
ssh-steps:latest
workflow-cps:latest
ws-cleanup:latest 

 all having latest, today I've got something like `java.lang.ClassNotFoundException: org.kohsuke.putty.PuTTYKey` on scm step 

 

java.lang.ClassNotFoundException: org.kohsuke.putty.PuTTYKey
        at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1383)
        at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1336)
        at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1083)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
Caused: java.lang.NoClassDefFoundError: org/kohsuke/putty/PuTTYKey
        at com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey.getPrivateKeys(BasicSSHUserPrivateKey.java:174)
        at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.createSshKeyFile(CliGitAPIImpl.java:1878)
        at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1793)
        at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$500(CliGitAPIImpl.java:78)
        at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:545)
        at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:758)
        at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1152)
        at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1192)
        at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:124)
        at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:93)
        at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:80)
        at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
        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:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)  

 After explicitly adding trilead-api:latest to the list of plugins issue's gone. So something's wrong with dependencies ?    
 

  
 
 
 
 

 
 

[JIRA] (JENKINS-58407) Fail to call a Closure stored as a class attribute/field

2019-10-04 Thread dicom...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dicom J updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-58407  
 
 
  Fail to call a Closure stored as a class attribute/field   
 

  
 
 
 
 

 
Change By: 
 Dicom J  
 
 
Comment: 
 [~abayer], when is this going to be out [https://github.com/cloudbees/groovy-cps/commit/93c916d482b63bf5ed46a84d56cb934401be2020]  ?As I still get such errors on 2.190.1 (LTS){code:java}# Jenkins filedef fn() {echo "foobar"}def map = [fn: this.]map.fn.call() {code}{code:java}java.lang.IllegalStateException: expected to call org.codehaus.groovy.runtime.MethodClosure.call but wound up catching WorkflowScript.fn; see: https://jenkins.io/redirect/pipeline-cps-method-mismatches/        at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService.handleMismatch(CpsVmExecutorService.java:117)        at com.cloudbees.groovy.cps.impl.CpsCallableInvocation.checkMismatch(CpsCallableInvocation.java:74) {code}but I do believe this is because the fix is not incorporated yet, right ? Or this workaround[https://wiki.jenkins.io/display/JENKINS/Pipeline+CPS+method+mismatches#PipelineCPSmethodmismatches-Directinvocationofclosuresstoredinobjectfieldsormaps]is irrelevant to my case (a pointer to script method) ? Thanks in advance!  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   

[JIRA] (JENKINS-58407) Fail to call a Closure stored as a class attribute/field

2019-10-04 Thread dicom...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dicom J commented on  JENKINS-58407  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Fail to call a Closure stored as a class attribute/field   
 

  
 
 
 
 

 
 Andrew Bayer, when is this going to be out https://github.com/cloudbees/groovy-cps/commit/93c916d482b63bf5ed46a84d56cb934401be2020  ? As I still get such errors on 2.190.1 (LTS) 

 

# Jenkins file

def fn() {
echo "foobar"
}
def map = [fn: this.]
map.fn.call()
  

 

 

java.lang.IllegalStateException: expected to call org.codehaus.groovy.runtime.MethodClosure.call but wound up catching WorkflowScript.fn; see: https://jenkins.io/redirect/pipeline-cps-method-mismatches/
        at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService.handleMismatch(CpsVmExecutorService.java:117)
        at com.cloudbees.groovy.cps.impl.CpsCallableInvocation.checkMismatch(CpsCallableInvocation.java:74)  

 but I do believe this is because the fix is not incorporated yet, right ? Or this workaround https://wiki.jenkins.io/display/JENKINS/Pipeline+CPS+method+mismatches#PipelineCPSmethodmismatches-Directinvocationofclosuresstoredinobjectfieldsormaps is irrelevant to my case (a pointer to script method) ?   Thanks in advance!  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 


[JIRA] (JENKINS-59575) Setting ConsoleLogFilter implementation from library by withContext step results into "java.lang.IllegalArgumentException: Unable to locate class file for class" on slave node

2019-09-30 Thread dicom...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dicom J commented on  JENKINS-59575  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Setting ConsoleLogFilter implementation from library by withContext step results into "java.lang.IllegalArgumentException: Unable to locate class file for class" on slave node   
 

  
 
 
 
 

 
 Jesse Glick, It's very valuable intel ! At least, we have it documented, as I see people try to do such things and I tried myself as writing +1 groovy module distributed as a part of library looked much easier to me than developing full fledged plugin. Anyways, thanks for clarification!  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.202215.1569750751000.8013.1569860340169%40Atlassian.JIRA.


[JIRA] (JENKINS-59575) Setting ConsoleLogFilter implementation from library by withContext step results into "java.lang.IllegalArgumentException: Unable to locate class file for class" on slave node

2019-09-29 Thread dicom...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dicom J updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-59575  
 
 
  Setting ConsoleLogFilter implementation from library by withContext step results into "java.lang.IllegalArgumentException: Unable to locate class file for class" on slave node   
 

  
 
 
 
 

 
Change By: 
 Dicom J  
 

  
 
 
 
 

 
 Note, ConsoleLogFilter is a simple proxy without any logic inside. vars/withLogFilter.groovy        # From library{code:java}class LogFilter extends hudson.console.ConsoleLogFilter implements Serializable {    @NonCPSjava.io.OutputStream decorateLogger(Run build, java.io.OutputStream logger) throws IOException, InterruptedException { return logger }}}def call(Closure closure) {  this.withContext(new LogFilter()) {closure.call()  }} {code}Jenkinsfile{code:java}library('demo')// node('master') { // Works! so it's not a duplicate of JENKINS-53151node('slave') {  withLogFilter {sh "pwd"  // triggers serialization as using just 'echo' step works fineecho "foobar"  }} {code}Results into the following error on slave  node  (on master works fine as class is resolved there, I suppose):{code:java}java.lang.IllegalArgumentException: Unable to locate class file for class LogFilter{code}Please find detailed stack trace here:{code:java}  Running on slave in /home/centos/workspace/pipeline[Pipeline] {[Pipeline] withContext[Pipeline] {[Pipeline] sh[Pipeline] }[Pipeline] // withContext[Pipeline] }[Pipeline] // node[Pipeline] End of PipelineAlso:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to channel  at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1743)  at hudson.remoting.Request.call(Request.java:202)  at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:286)  at com.sun.proxy.$Proxy5.fetch3(Unknown Source)  at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:209)  at java.lang.ClassLoader.loadClass(ClassLoader.java:424)  at java.lang.ClassLoader.loadClass(ClassLoader.java:357)  at java.lang.Class.forName0(Native Method)  at java.lang.Class.forName(Class.java:348)  at hudson.remoting.MultiClassLoaderSerializer$Input.resolveClass(MultiClassLoaderSerializer.java:134)  at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1867)  at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1750)  at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2041)  at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1572)  at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2286)  at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2210)  at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2068)  at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1572)  at java.io.ObjectInputStream.readObject(ObjectInputStream.java:430)  at java.util.ArrayList.readObject(ArrayList.java:797)  at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)  at 

[JIRA] (JENKINS-59575) Setting ConsoleLogFilter implementation from library by withContext step results into "java.lang.IllegalArgumentException: Unable to locate class file for class" on slave node

2019-09-29 Thread dicom...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dicom J commented on  JENKINS-59575  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Setting ConsoleLogFilter implementation from library by withContext step results into "java.lang.IllegalArgumentException: Unable to locate class file for class" on slave node   
 

  
 
 
 
 

 
 Jesse Glick, could you please address this one by assigning to the right person, etc. Thanks!  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.202215.1569750751000.7485.1569750960190%40Atlassian.JIRA.


[JIRA] (JENKINS-59575) Setting ConsoleLogFilter implementation from library by withContext step results into "java.lang.IllegalArgumentException: Unable to locate class file for class" on slave node

2019-09-29 Thread dicom...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dicom J created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-59575  
 
 
  Setting ConsoleLogFilter implementation from library by withContext step results into "java.lang.IllegalArgumentException: Unable to locate class file for class" on slave node   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Jesse Glick  
 
 
Components: 
 workflow-cps-plugin  
 
 
Created: 
 2019-09-29 09:52  
 
 
Priority: 
  Minor  
 
 
Reporter: 
 Dicom J  
 

  
 
 
 
 

 
 Note, ConsoleLogFilter is a simple proxy without any logic inside.   vars/withLogFilter.groovy        # From library 

 

class LogFilter extends hudson.console.ConsoleLogFilter implements Serializable {
    @NonCPS
java.io.OutputStream decorateLogger(Run build, java.io.OutputStream logger) throws IOException, InterruptedException { return logger }
}
}

def call(Closure closure) {
  this.withContext(new LogFilter()) {
closure.call()
  }
}  

 Jenkinsfile 

 

library('demo')

// node('master') { // Works! so it's not a duplicate of JENKINS-53151
node('slave') {
  withLogFilter {
sh "pwd"  // triggers serialization as using just 'echo' step works fine
echo "foobar"
  }
}  

 Results into the following error on slave (on master works fine as class is resolved there, I suppose): 

 

java.lang.IllegalArgumentException: Unable 

[JIRA] (JENKINS-56117) SCP Style Git URI on Pipeline Library breaks Plugin

2019-07-17 Thread dicom...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dicom J commented on  JENKINS-56117  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: SCP Style Git URI on Pipeline Library breaks Plugin   
 

  
 
 
 
 

 
 This happens because git scp-like syntax for "URL" (which technically and according to specification it not an URL, Torvalds simply confused stuff, as man packages for scp never even mention URL word) is not compatible with URI syntax, so it's not safe to just blindly wrap that string into java.net.URI, as again it could be either git scp-like "URL" (scp path) or true URL, which are incompatible cases and java.net.URI strictly follows just URI spec and so it fails for "git scp-like "URLs" (scp pathes)"  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.197552.1550038396000.14863.1563400920196%40Atlassian.JIRA.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-58414) Property of object, which extends Map, couldn't be accessed

2019-07-10 Thread dicom...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dicom J edited a comment on  JENKINS-58414  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Property of object, which extends Map, couldn't be accessed   
 

  
 
 
 
 

 
 [~jglick], @ notation works, both internally  as  `def myFooBar() \{ this.@foobar }` and externally as `m.@foobar`.Again, thanks a lot!!!  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.200541.1562704486000.7637.1562785740131%40Atlassian.JIRA.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-58414) Property of object, which extends Map, couldn't be accessed

2019-07-10 Thread dicom...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dicom J commented on  JENKINS-58414  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Property of object, which extends Map, couldn't be accessed   
 

  
 
 
 
 

 
 Jesse Glick, @ notation works, both internally `def myFooBar() { this.@foobar }` and externally as `m.@foobar`. Again, thanks a lot!!!  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.200541.1562704486000.7635.1562785680175%40Atlassian.JIRA.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-58414) Property of object, which extends Map, couldn't be accessed

2019-07-10 Thread dicom...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dicom J edited a comment on  JENKINS-58414  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Property of object, which extends Map, couldn't be accessed   
 

  
 
 
 
 

 
 [~jglick], thanks , will try  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.200541.1562704486000.7626.1562784900310%40Atlassian.JIRA.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-58414) Property of object, which extends Map, couldn't be accessed

2019-07-10 Thread dicom...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dicom J commented on  JENKINS-58414  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Property of object, which extends Map, couldn't be accessed   
 

  
 
 
 
 

 
 Jesse Glick, thanks  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.200541.1562704486000.7611.1562784420172%40Atlassian.JIRA.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-58407) Fail to call a Closure stored as a class attribute/field

2019-07-10 Thread dicom...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dicom J commented on  JENKINS-58407  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Fail to call a Closure stored as a class attribute/field   
 

  
 
 
 
 

 
 Jesse Glick, I have never said that I have enabled sandbox anywhere. Actually I have it disabled, but still from time to time face security (sandbox) related exceptions and I suspect (sorry, I shouldn't do that, it's not my business) that the root cause of all these strange Groovy behaviors are due to the fact that at some point sandbox has been plugged in. maybe my suspicions are wrong, again it's not my business, but as I said I have to deal with it. Regarding JFR, I found it as very useful tool in development of pipelines and shared libraries as: 1. Many people run it locally from docker against theirs local codebases of the same project/product. Everybody has it's own Jenkins running without interfering with others. 2. I personally can run it from command line, actually from my vim's command line, it's how I've got used to do actual programming. 3. I personally, don't like to deal with UIs. Also my/our Jenkinsfile comprises just 1 line of code to call the code from shared library, which loads source code base for target project from scm and then looks for *.groovy cicd related modules within that code base and dynamically loads them, looks for required interface inside, and plug them in, in which way actual pipeline is built dynamically (where closures are heavily used). So I really like that JFR exists, in many other products headless part goes first and UI is just an extension of UX. So many thanks to those who've come up with JFR...  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
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.
To view this discussion on the web visit 

[JIRA] (JENKINS-58407) Fail to call a Closure stored as a class attribute/field

2019-07-10 Thread dicom...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dicom J commented on  JENKINS-58407  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Fail to call a Closure stored as a class attribute/field   
 

  
 
 
 
 

 
 Jesse Glick, thanks for explicit workaround, will follow that  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.200534.1562691597000.7458.1562776500247%40Atlassian.JIRA.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-58407) Fail to call a Closure stored as a class attribute/field

2019-07-10 Thread dicom...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dicom J commented on  JENKINS-58407  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Fail to call a Closure stored as a class attribute/field   
 

  
 
 
 
 

 
 Devin Nusbaum, exactly, and I'm perfectly fine with that. regarding sandboxes and security in general, IMHO, it's almost nobody needs feature which costs a lot, since it breaks a lot of things. As it lames groovy (just opened another fundamental bug https://issues.jenkins-ci.org/browse/JENKINS-58414, most likely related to your case in bullet #1, Jesse Glick I think this one would be interesting for you) what doesn't allow me to do actual programming job on my CICD pipeline, then at the end I'll have nothing to secure (put in that sandbox), what's the point ? the real value of pipelines for me is actual ability to program pipelines, put common part into share library etc, not secure it, as there're a lot of means for that, e.g. private networks with vpn access, etc. I'm not in Jenkins As A Service business, not sure what are actual selling points for sandboxes. But again if simple groovy stuff doesn't work for me then all other 1K plugins and features are useless/irrelevant and I'd rather go and find other means to fulfill my CI/CD requirements...  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.200534.1562691597000.7454.1562775960215%40Atlassian.JIRA.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-58407) Fail to call a Closure stored as a class attribute/field

2019-07-10 Thread dicom...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dicom J commented on  JENKINS-58407  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Fail to call a Closure stored as a class attribute/field   
 

  
 
 
 
 

 
 Devin Nusbaum, I can live with that message, as you qualified that code as safe to use  , since it's a fundamental thing (storing this closure to be called a bit further) around which entire pipeline is built...  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.200534.1562691597000.7237.1562774460132%40Atlassian.JIRA.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-58407) Fail to call a Closure stored as a class attribute/field

2019-07-10 Thread dicom...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dicom J commented on  JENKINS-58407  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Fail to call a Closure stored as a class attribute/field   
 

  
 
 
 
 

 
 Oleg Nenashev, you guys can figure out your self. Just I'd like to mention that I have tried to apply Main.isUnitTest = false in that place Devin Nusbaum pointed out, it helped, so it works (doesn't throw any exceptions) but anyways it prints that warning, not sure it entirely helped and so only this opt-in flag could mitigate such behavior ...  java.lang.IllegalStateException: expected to call SomeStruct.aPointerToClosure but wound up catching org.jenkinsci.plugins.workflow.cps.CpsClosure2.call; see: https://jenkins.io/redirect/pipeline-cps-method-mismatches/ But as I said, you are the smart ones here...  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.200534.1562691597000.7218.1562773620276%40Atlassian.JIRA.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-58407) Fail to call a Closure stored as a class attribute/field

2019-07-10 Thread dicom...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dicom J commented on  JENKINS-58407  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Fail to call a Closure stored as a class attribute/field   
 

  
 
 
 
 

 
 Yes I see (it's hard coded), I just tried to make silly suggestions, but seems like you don't need them (have better ones in mind). Also it looks like it might be just an intermediate solution introduced by the following commit https://github.com/jenkinsci/jenkinsfile-runner/commit/f72641df3f31588c750226ea33c4a4178d8ed39a "JENKINS-54424 - Remove Jenkins Test Harness Dependency & replace by local code". Maybe an owner of that code (Oleg Nenashev), had something in mind, but it's never properly followed up since then, never mind... Anyways, thank you very much, seems like I've blindly picked the right person. I'm really impressed about you taking care of it on so short notice...  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.200534.1562691597000.7113.1562770680109%40Atlassian.JIRA.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-58407) Fail to call a Closure stored as a class attribute/field

2019-07-10 Thread dicom...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dicom J commented on  JENKINS-58407  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Fail to call a Closure stored as a class attribute/field   
 

  
 
 
 
 

 
 Devin Nusbaum, Can this value Main.isUnitTest = true for runner come and so be controlled from some external configuration or at least environment variable ?  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.200534.1562691597000.7094.1562769601829%40Atlassian.JIRA.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-58407) Fail to call a Closure stored as a class attribute/field

2019-07-10 Thread dicom...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dicom J commented on  JENKINS-58407  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Fail to call a Closure stored as a class attribute/field   
 

  
 
 
 
 

 
 Ok, so how do I make jenkinsfile-runner not to set this into true, as I can see it's hardcoded in there ? since runner doc (https://github.com/jenkinsci/jenkinsfile-runner#jenkinsfile-runner) states that it could be used for 
 
Use Jenkins in Function-as-a-Service context 
 My goal is to use it as a function and not mixing with testing of Jenkins itself...  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.200534.1562691597000.7079.1562769300291%40Atlassian.JIRA.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-58407) Fail to call a Closure stored as a class attribute/field

2019-07-10 Thread dicom...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dicom J commented on  JENKINS-58407  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Fail to call a Closure stored as a class attribute/field   
 

  
 
 
 
 

 
 Devin Nusbaum, you can compose a Jenkinsfile with exact code from my example, it's how a I tested, the only difference might be that I'm running this Jenkinsfile with https://github.com/jenkinsci/jenkinsfile-runner But my understanding is that it shouldn't affect in any way. Just make sure you have Groovy Plugin version 2.71. Thanks for such prompt reply  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.200534.1562691597000.6925.1562767860153%40Atlassian.JIRA.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-58407) Fail to call a Closure stored as a class attribute/field

2019-07-10 Thread dicom...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dicom J commented on  JENKINS-58407  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Fail to call a Closure stored as a class attribute/field   
 

  
 
 
 
 

 
 Devin Nusbaum, assigning this to you as you are the one reported in  https://issues.jenkins-ci.org/browse/JENKINS-31314 that most likely this what I consider as a bug (which I think has been introduces as a part of what you think is a fix for something else (JENKINS-31314)) was released in Groovy Plugin version 2.71. Could you please properly address this, and ASAP since it's breaks fundamental things...  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.200534.1562691597000.6860.1562764920273%40Atlassian.JIRA.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-58407) Fail to call a Closure stored as a class attribute/field

2019-07-10 Thread dicom...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dicom J assigned an issue to Devin Nusbaum  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-58407  
 
 
  Fail to call a Closure stored as a class attribute/field   
 

  
 
 
 
 

 
Change By: 
 Dicom J  
 
 
Assignee: 
 Devin Nusbaum  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.200534.1562691597000.6849.1562764620204%40Atlassian.JIRA.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-58414) Property of object, which extends Map, couldn't be accessed

2019-07-09 Thread dicom...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dicom J created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-58414  
 
 
  Property of object, which extends Map, couldn't be accessed   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Unassigned  
 
 
Components: 
 workflow-cps-plugin  
 
 
Created: 
 2019-07-09 20:34  
 
 
Priority: 
  Blocker  
 
 
Reporter: 
 Dicom J  
 

  
 
 
 
 

 
 Code (also used within library): 

 

class MyMap extends java.util.LinkedHashMap {
public final String foobar

MyMap(Map map) {
super(map)
this.foobar = 'foobar'
}

def myFooBar() {
return this.foobar
}
}

node {
def m = new MyMap([foo: 'bar', bar: 'foo'])
print "bar=${m.bar}"
print "foo=${m.foo}"
print "foobar=${m.foobar}"
print "foobar=${m.myFooBar()}"
}  

 Result: 

 

[Pipeline] node
Running on Jenkins in /build/workspace
[Pipeline] {
[Pipeline] echo
bar=foo
[Pipeline] echo
foo=bar
[Pipeline] echo
foobar=null
[Pipeline] echo
foobar=null
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
Finished: SUCCESS  

   Expected: 'foobar' value printed Conceptually and most likely overloaded getProperty(name) method has a bug...  
 

  
 
 
 
 


[JIRA] (JENKINS-58407) Fail to call a Closure stored as a class attribute/field

2019-07-09 Thread dicom...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dicom J updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-58407  
 
 
  Fail to call a Closure stored as a class attribute/field   
 

  
 
 
 
 

 
Change By: 
 Dicom J  
 

  
 
 
 
 

 
 simple groovy code, like this{code:java}class SomeStruct {def aPointerToClosure}node {def st = new SomeStruct()st.aPointerToClosure = { println 'foobar' }st.aPointerToClosure()} {code}and even within groovy library, started yelling the following exception:{code:java}java.lang.IllegalStateException: expected to call SomeStruct.aPointerToClosure but wound up catching org.jenkinsci.plugins.workflow.cps.CpsClosure2.call; see: https://jenkins.io/redirect/pipeline-cps-method-mismatches/ at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService.handleMismatch(CpsVmExecutorService.java:117) at {code}The issue's appears as of 2.71 (05 Jul 2019), with 2.70 works properly.[ [ Changelog ](https://plugins.jenkins.io/workflow-cps) | [ https://plugins.jenkins.io/workflow-cps] ] , among other things, states the following:Improvement: Print detailed warnings to the build log when CPS-transformed code is called in a non-CPS context where possible. The warnings link to [https://jenkins.io/redirect/pipeline-cps-method-mismatches/] which gives additional context and some examples of how to fix common issues. (JENKINS-31314) Most likely, this is that "nice improvement"...Whole Stack Trace:{code:java}  11.906 [id=48] WARNING o.j.p.w.cps.CpsVmExecutorService#reportProblem: Unexpected exception in CPS VM thread: CpsFlowExecution[Owner[job/1:job #1]]  11.906 [id=48] WARNING o.j.p.w.cps.CpsVmExecutorService#reportProblem: Unexpected exception in CPS VM thread: CpsFlowExecution[Owner[job/1:job #1]]java.lang.IllegalStateException: expected to call SomeStruct.aPointerToClosure but wound up catching org.jenkinsci.plugins.workflow.cps.CpsClosure2.call; see: https://jenkins.io/redirect/pipeline-cps-method-mismatches/ at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService.handleMismatch(CpsVmExecutorService.java:117) at com.cloudbees.groovy.cps.impl.CpsCallableInvocation.checkMismatch(CpsCallableInvocation.java:63) at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:94) at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:113) at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixName(FunctionCallBlock.java:78) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72) at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21) at com.cloudbees.groovy.cps.Next.step(Next.java:83) at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:174) at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:163) at 

[JIRA] (JENKINS-58407) Fail to call a Closure stored as a class attribute/field

2019-07-09 Thread dicom...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dicom J created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-58407  
 
 
  Fail to call a Closure stored as a class attribute/field   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Unassigned  
 
 
Components: 
 workflow-cps-plugin  
 
 
Created: 
 2019-07-09 16:59  
 
 
Priority: 
  Blocker  
 
 
Reporter: 
 Dicom J  
 

  
 
 
 
 

 
 simple groovy code, like this 

 

class SomeStruct {
def aPointerToClosure
}

node {
def st = new SomeStruct()
st.aPointerToClosure = { println 'foobar' }
st.aPointerToClosure()
}  

 and even within groovy library, started yelling the following exception: 

 

java.lang.IllegalStateException: expected to call SomeStruct.aPointerToClosure but wound up catching org.jenkinsci.plugins.workflow.cps.CpsClosure2.call; see: https://jenkins.io/redirect/pipeline-cps-method-mismatches/ at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService.handleMismatch(CpsVmExecutorService.java:117) at  

 The issue's appears as of 2.71 (05 Jul 2019), with 2.70 works properly. [Changelog|https://plugins.jenkins.io/workflow-cps], among other things, states the following: Improvement: Print detailed warnings to the build log when CPS-transformed code is called in a non-CPS context where possible. The warnings link to https://jenkins.io/redirect/pipeline-cps-method-mismatches/ which gives additional context and some examples of how to fix common issues. (JENKINS-31314)   Most likely, this is that "nice improvement"... Whole Stack Trace: