[JIRA] (JENKINS-42024) Silent error : UnsupportedOperationExceptions are not raised when using each/find
Title: Message Title Jesse Glick commented on JENKINS-42024 Re: Silent error : UnsupportedOperationExceptions are not raised when using each/find See JENKINS-33925. Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- 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. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-42024) Silent error : UnsupportedOperationExceptions are not raised when using each/find
Title: Message Title Lucas Cimon commented on JENKINS-42024 Re: Silent error : UnsupportedOperationExceptions are not raised when using each/find Based on this doc: https://github.com/cloudbees/groovy-cps/blob/master/doc/sandbox.md it seems it could be possible to write an alternative groovy intepreter (maybe taking inspiration from this code: https://github.com/jenkinsci/workflow-cps-plugin/blob/master/src/main/java/org/jenkinsci/plugins/workflow/cps/CpsGroovyShellFactory.java) that would make it possible to exacute Groovy scripts on the CLI in the same manner as in Jenkins pipeline plugin. Does this plan sounds feasible to you ? Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- 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. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-42024) Silent error : UnsupportedOperationExceptions are not raised when using each/find
Title: Message Title Jesse Glick commented on JENKINS-42024 Re: Silent error : UnsupportedOperationExceptions are not raised when using each/find when and where is the sandbox mode "ON" ? Whenever a Jenkinsfile in executed ? For standalone Pipeline jobs with inline script, this is a configuration option. For jobs with a script loaded from SCM, currently it is always on (filed separately). For branch projects, it is always on. For folder-scoped libraries, it is on. For global libraries, it is off. is it possible to detect this outside Jenkins, in a "static code analysis" phase Afraid not. Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- 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. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-42024) Silent error : UnsupportedOperationExceptions are not raised when using each/find
Title: Message Title Lucas Cimon commented on JENKINS-42024 Re: Silent error : UnsupportedOperationExceptions are not raised when using each/find OK. Thanks for your answer. I have some questions: when and where is the sandbox mode "ON" ? Whenever a Jenkinsfile in executed ? Only when you "Replay" it ? is it possible to detect this outside Jenkins, in a "static code analysis" phase, or maybe when running unit tests ? Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- 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. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-42024) Silent error : UnsupportedOperationExceptions are not raised when using each/find
Title: Message Title Jesse Glick updated an issue Jenkins / JENKINS-42024 Silent error : UnsupportedOperationExceptions are not raised when using each/find Change By: Jesse Glick Labels: diagnostics Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- 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. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-42024) Silent error : UnsupportedOperationExceptions are not raised when using each/find
Title: Message Title Jesse Glick updated an issue Jenkins / JENKINS-42024 Silent error : UnsupportedOperationExceptions are not raised when using each/find Such code is illegal, but the automatic detection of it is only straightforward in sandbox mode. (Nothing to do with libraries per se.) Change By: Jesse Glick Issue Type: Bug Improvement Component/s: workflow-cps-plugin Component/s: workflow-cps-global-lib-plugin Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
[JIRA] (JENKINS-42024) Silent error : UnsupportedOperationExceptions are not raised when using each/find
Title: Message Title Lucas Cimon updated an issue Jenkins / JENKINS-42024 Silent error : UnsupportedOperationExceptions are not raised when using each/find Change By: Lucas Cimon Currently, putting the following code in a Jenkinsfile will raise a {{UnsupportedOperationException: Calling public static java.util.List org.codehaus.groovy.runtime.DefaultGroovyMethods.find(java.util.List,groovy.lang.Closure) on a CPS-transformed closure is not yet supported (JENKINS-26481); encapsulate in a @NonCPS method, or use Java-style loops}}{code}node {tmp = [ 'A', 'B' ].find { it == 'B' }echo tmp}{code} Howerver However , if this code is used without {{@NonCPS}} in a shared library, it will fail silently and {{tmp}} will be {{false}}. Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- 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
[JIRA] (JENKINS-42024) Silent error : UnsupportedOperationExceptions are not raised when using each/find
Title: Message Title Lucas Cimon created an issue Jenkins / JENKINS-42024 Silent error : UnsupportedOperationExceptions are not raised when using each/find Issue Type: Bug Assignee: Unassigned Components: workflow-cps-global-lib-plugin Created: 2017/Feb/14 3:20 PM Priority: Major Reporter: Lucas Cimon Currently, putting the following code in a Jenkinsfile will raise a UnsupportedOperationException: Calling public static java.util.List org.codehaus.groovy.runtime.DefaultGroovyMethods.find(java.util.List,groovy.lang.Closure) on a CPS-transformed closure is not yet supported (JENKINS-26481); encapsulate in a @NonCPS method, or use Java-style loops node { tmp = [ 'A', 'B' ].find { it == 'B' } echo tmp } Howerver, if this code is used without @NonCPS in a shared library, it will fail silently and tmp will be false. Add Comment