[JIRA] [workflow-plugin] (JENKINS-33629) `checkout scm` surprisingly fails when multibranch plugin is not installed

19 views
Skip to first unread message

c089@java.net (JIRA)

unread,
Mar 17, 2016, 12:36:02 PM3/17/16
to jenkinsc...@googlegroups.com
c089 created an issue
 
Jenkins / Bug JENKINS-33629
`checkout scm` surprisingly fails when multibranch plugin is not installed
Issue Type: Bug Bug
Assignee: Jesse Glick
Components: workflow-plugin
Created: 2016/Mar/17 4:35 PM
Labels: workflow
Priority: Minor Minor
Reporter: c089

Since

JENKINS-31386 we can use `checkout scm` to get SCM sources using the values configured for the "Pipeline script from SCM" job. However, this only works if the multibranch plugin is installed, otherwise it fails (see stack trace below). I only realised that after finding the mentioned issue and looking at the diff of the commit.

monospace
groovy.lang.MissingPropertyException: No such property: scm for class: groovy.lang.Binding
at groovy.lang.Binding.getVariable(Binding.java:62)
at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onGetProperty(SandboxInterceptor.java:185)
at org.kohsuke.groovy.sandbox.impl.Checker$4.call(Checker.java:241)
at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:238)
at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:221)
at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:221)
at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.getProperty(SandboxInvoker.java:23)
at com.cloudbees.groovy.cps.impl.PropertyAccessBlock.rawGet(PropertyAccessBlock.java:17)
at WorkflowScript.run(WorkflowScript:16)
at __cps.transform__(Native Method)
at com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.get(PropertyishBlock.java:62)
at com.cloudbees.groovy.cps.LValueBlock$GetAdapter.receive(LValueBlock.java:30)
at com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.fixName(PropertyishBlock.java:54)
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:497)
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:58)
at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:154)
at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:19)
at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:33)
at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:30)
at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:106)
at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:30)
at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:164)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:277)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$000(CpsThreadGroup.java:77)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:186)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:184)
at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:47)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)
at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
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:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
monospace

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

c089@java.net (JIRA)

unread,
Mar 17, 2016, 1:58:02 PM3/17/16
to jenkinsc...@googlegroups.com
c089 updated an issue
Change By: c089
Since JENKINS-31386 we can use `checkout scm` to get SCM sources using the values configured for the "Pipeline script from SCM" job. However, this only works if the multibranch plugin is installed, otherwise it fails (see stack trace below). I only realised that after finding the mentioned issue and looking at the diff of the commit.

{{
monospace}}
groovy.lang.MissingPropertyException: No such property: scm for class: groovy.lang.Binding
    at groovy.lang.Binding.getVariable(Binding.java:62)
    at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onGetProperty(SandboxInterceptor.java:185)
    at org.kohsuke.groovy.sandbox.impl.Checker$4.call(Checker.java:241)
    at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:238)
    at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:221)
    at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:221)
    at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.getProperty(SandboxInvoker.java:23)
    at com.cloudbees.groovy.cps.impl.PropertyAccessBlock.rawGet(PropertyAccessBlock.java:17)
    at WorkflowScript.run(WorkflowScript:16)
    at ___cps.transform___(Native Method)

{{monospace
}}

c089@java.net (JIRA)

unread,
Mar 17, 2016, 1:59:01 PM3/17/16
to jenkinsc...@googlegroups.com
c089 updated an issue
Since JENKINS-31386 we can use `checkout scm` to get SCM sources using the values configured for the "Pipeline script from SCM" job. However, this only works if the multibranch plugin is installed, otherwise it fails (see stack trace below). I only realised that after finding the mentioned issue and looking at the diff of the commit.

{ { code}

{code
} }

jglick@cloudbees.com (JIRA)

unread,
Jun 1, 2016, 3:51:03 PM6/1/16
to jenkinsc...@googlegroups.com
Jesse Glick resolved as Won't Fix
 

So don’t do that then.

Change By: Jesse Glick
Status: Open Resolved
Resolution: Won't Fix

kk@kohsuke.org (JIRA)

unread,
Jun 2, 2016, 12:40:01 PM6/2/16
to jenkinsc...@googlegroups.com
Kohsuke Kawaguchi commented on Bug JENKINS-33629
 
Re: `checkout scm` surprisingly fails when multibranch plugin is not installed

I think Jesse misunderstood this ticket to be "xyz doesn't work and there's already a ticket for that but I'm filing another one."

IMO what's really reported here is usability issues. The error message is cryptic, and it doesn't point people to the solution. It required the reporter to dig through Google, JIRA, and the source code of the plugin (gasp!) to get here. Clearly we don't expect our typical users to do that much to overcome one issue!

I filed JENKINS-35308 and JENKINS-35309 as two usability issues that I got out of this. I want to thank c089 for bringing this issue to our attention.

jglick@cloudbees.com (JIRA)

unread,
Jun 2, 2016, 5:03:01 PM6/2/16
to jenkinsc...@googlegroups.com

I think Jesse misunderstood this ticket to be

Not sure what that means. I just meant, do not uninstall workflow-multibranch. It is in the default set of Pipeline plugins.

Will look at linked tickets to see if they are feasible.

Reply all
Reply to author
Forward
0 new messages