GitHub Branch Source Plugin - upgrade messed up jobs

228 views
Skip to first unread message

Idan Adar

unread,
Sep 22, 2017, 1:48:22 AM9/22/17
to Jenkins Users
I had the unfortunate luck of upgrading said plug-in. Now any job fails with the error below.
The upgrade warning does say:
Warning: the new version of this plugin claims to use a different settings format than the installed version. Jobs using this plugin may need to be reconfigured, and/or you may not be able to cleanly revert to the prior version without manually restoring old settings. Consult the plugin release notes for details.

However it is not mentioned how one _can_ resolve this issue once it happened...
I downgraded back to 2.0.8 which didn't help.

java.lang.AbstractMethodError: org.jenkinsci.plugins.pipeline.modeldefinition.validator.ModelValidatorImpl.validateElement(Lorg/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTStage;Z)Z
	at org.jenkinsci.plugins.pipeline.modeldefinition.ast.ModelASTStage.validate(ModelASTStage.java:78)
	at org.jenkinsci.plugins.pipeline.modeldefinition.ast.ModelASTStages.validate(ModelASTStages.java:41)
	at org.jenkinsci.plugins.pipeline.modeldefinition.ast.ModelASTStages.validate(ModelASTStages.java:35)
	at org.jenkinsci.plugins.pipeline.modeldefinition.ast.ModelASTPipelineDef.validate(ModelASTPipelineDef.java:64)
	at org.jenkinsci.plugins.pipeline.modeldefinition.ast.ModelASTPipelineDef$validate.call(Unknown Source)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
	at org.jenkinsci.plugins.pipeline.modeldefinition.parser.ModelParser.parse(ModelParser.groovy:204)
	at org.jenkinsci.plugins.pipeline.modeldefinition.parser.ModelParser$parse.callCurrent(Unknown Source)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:166)
	at org.jenkinsci.plugins.pipeline.modeldefinition.parser.ModelParser.parse(ModelParser.groovy:91)
	at org.jenkinsci.plugins.pipeline.modeldefinition.parser.GroovyShellDecoratorImpl$1.call(GroovyShellDecoratorImpl.java:46)
	at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1053)
	at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:591)
	at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:569)
	at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:546)
	at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298)
	at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268)
	at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688)
	at groovy.lang.GroovyShell.parse(GroovyShell.java:700)
	at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.doParse(CpsGroovyShell.java:129)
	at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:123)
	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:517)
	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:480)
	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:253)
	at hudson.model.ResourceController.execute(ResourceController.java:98)
	at hudson.model.Executor.run(Executor.java:405)
Finished: FAILURE


Idan Adar

unread,
Sep 22, 2017, 1:51:05 AM9/22/17
to Jenkins Users
The plug-in author is stephen connolly, but I'm not sure how to contact him...

The plug-in release notes didn't mention info that could help me AFAICT.
I'm not sure how to manually restore old settings and what those should be...

Appreciate any help anyone could provide is this totally brings down the pipeline... :(

Stephen Connolly

unread,
Sep 22, 2017, 1:54:22 AM9/22/17
to jenkins...@googlegroups.com
That stack trace is from a different plugin.

Pipeline model definition.

Upgrading updated some other plugins, and *those* other plugins are causing the stack trace

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/0dc771fb-755f-4d7c-b759-c5313f26b5b7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Sent from my phone

Idan Adar

unread,
Sep 22, 2017, 2:08:17 AM9/22/17
to Jenkins Users
I went back to version 1.1.8 (instead of 1.2) of pipeline model definition, but that didn't help either...

Stephen, what are my options here?

Stephen Connolly

unread,
Sep 22, 2017, 2:31:39 AM9/22/17
to jenkins...@googlegroups.com
Restore the backup you were warned to take, or move plugins forward until you pick up the downstream update required by the method change in some plugin.




For more options, visit https://groups.google.com/d/optout.

Stephen Connolly

unread,
Sep 22, 2017, 2:40:50 AM9/22/17
to jenkins...@googlegroups.com
Reverting random plugins or downgrading without a corresponding backup to restore will not help you now, the data on disk has been rewritten, so whatever was affected has been affected.

So if you don’t have a backup you’ll just have to double down and upgrade all the things... though i’d advise backup of your current state *now*... that way you may be able to experiment with a partial *all the things*

At a minimum upgrade anything with “pipeline” or “scm” in the name.

Daniel Beck

unread,
Sep 22, 2017, 3:45:35 AM9/22/17
to jenkins...@googlegroups.com

> On 22. Sep 2017, at 07:48, Idan Adar <id...@adar.me> wrote:
>
> which didn't help.

This is unrelated to GHBS, rather looks like a problem in Declarative Pipeline. Possibly related to yesterday's release of version 1.2.

Daniel Beck

unread,
Sep 22, 2017, 3:45:58 AM9/22/17
to jenkins...@googlegroups.com

> On 22. Sep 2017, at 09:45, Daniel Beck <m...@beckweb.net> wrote:
>
> This is unrelated to GHBS, rather looks like a problem in Declarative Pipeline. Possibly related to yesterday's release of version 1.2.

Oops, didn't notice there were further responses. Sorry about that.

Idan Adar

unread,
Sep 22, 2017, 4:08:45 AM9/22/17
to jenkins...@googlegroups.com
I've upgraded to 2.73.1 as well as to the latest plug-in releases. the stack trace is gone, however I now get this: org.jenkinsci.plugins.credentialsbinding.impl.CredentialNotFoundException: ${JENKINSBOT_USERNAME_PASSWORD}

This, despite the credential ID and the global variable are all there and configured correctly. 

org.jenkinsci.plugins.credentialsbinding.impl.CredentialNotFoundException: ${JENKINSBOT_USERNAME_PASSWORD}
	at org.jenkinsci.plugins.pipeline.modeldefinition.model.CredentialsBindingHandler.forId(CredentialsBindingHandler.java:119)
	at org.jenkinsci.plugins.pipeline.modeldefinition.model.CredentialsBindingHandler$forId.call(Unknown Source)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
	at com.cloudbees.groovy.cps.sandbox.DefaultInvoker.methodCall(DefaultInvoker.java:19)
	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.withCredentialsBlock(jar:file:/var/jenkins_home/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:314)
	at com.cloudbees.groovy.cps.CpsDefaultGroovyMethods.callClosureForMapEntry(CpsDefaultGroovyMethods:5226)
	at com.cloudbees.groovy.cps.CpsDefaultGroovyMethods.each(CpsDefaultGroovyMethods:2107)
	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.withCredentialsBlock(jar:file:/var/jenkins_home/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:312)
	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.evaluateStage(jar:file:/var/jenkins_home/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:207)
	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.inDeclarativeAgent(jar:file:/var/jenkins_home/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:415)
	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.inDeclarativeAgent(jar:file:/var/jenkins_home/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:414)
	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.evaluateStage(jar:file:/var/jenkins_home/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:205)
	at ___cps.transform___(Native Method)
	at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:57)
	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:109)
	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:82)
	at sun.reflect.GeneratedMethodAccessor329.invoke(Unknown Source)
	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.PropertyishBlock$ContinuationImpl.get(PropertyishBlock.java:76)
	at com.cloudbees.groovy.cps.LValueBlock$GetAdapter.receive(LValueBlock.java:30)
	at com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.fixName(PropertyishBlock.java:66)
	at sun.reflect.GeneratedMethodAccessor338.invoke(Unknown Source)
	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 org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:122)
	at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:261)
	at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:163)
	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:19)
	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:35)
	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:32)
	at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:108)
	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:32)
	at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:174)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:330)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$100(CpsThreadGroup.java:82)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:242)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:230)
	at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:64)
	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:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Finished: FAILURE


--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/gs37LHzjIcQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CC2B4CB9-2D1C-4E56-802E-4328F42EE730%40beckweb.net.

For more options, visit https://groups.google.com/d/optout.



--
Idan Adar

Idan Adar

unread,
Sep 22, 2017, 4:15:15 AM9/22/17
to Jenkins Users
And yes, I do have a backup from yesterday. If all fails I'll ask to restore to yesterday...

Idan Adar

unread,
Sep 22, 2017, 5:33:01 AM9/22/17
to Jenkins Users
Okay, the problem was lines like this:

JENKINSBOT = credentials('${JENKINSBOT_USERNAME_PASSWORD}')

In v2.46 this worked.
Once I upgraded to 2.73 I had to change it to:

JENKINSBOT = credentials("${JENKINSBOT_USERNAME_PASSWORD}")




Daniel Beck

unread,
Sep 22, 2017, 5:40:37 AM9/22/17
to jenkins...@googlegroups.com

> On 22. Sep 2017, at 11:33, Idan Adar <id...@adar.me> wrote:
>
> credentials("${JENKINSBOT_USERNAME_PASSWORD}")

This is equivalent to:

credentials(JENKINSBOT_USERNAME_PASSWORD)

Idan Adar

unread,
Sep 22, 2017, 5:55:23 AM9/22/17
to Jenkins Users
Thanks Daniel.


Now that jobs can run again, I'm back to the original topic of upgrading the plugins...
I see that the job configuration looks different in multibranch pipelines and now PRs opened in GitHub are no longer automatically starting...

Idan Adar

unread,
Sep 22, 2017, 6:18:01 AM9/22/17
to Jenkins Users
Why is it saying this?

Checking pull request #215
> Submitted from origin repository, skipping

I have a repository and in this repository I have two branches: develop and master.
I created another branch, "devops", from which I make a pull request to develop.

I do want this PR discovered, and have the Jenkinsfile executed.

Stephen Connolly

unread,
Sep 22, 2017, 6:26:23 AM9/22/17
to jenkins...@googlegroups.com
What behaviours have you configured?
Inline images 1
If you didn't configure "discover from origin" then it won't discover from origin

(likely the upgrade/rollback/upgrade screwed up the auto-migration)

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/301ac6bc-4211-4bab-b4c0-b06443807d07%40googlegroups.com.

Daniel Beck

unread,
Sep 22, 2017, 6:28:36 AM9/22/17
to jenkins...@googlegroups.com
Check the options on the multibranch pipeline, PRs from origin branches may be handled differently from PRs from forks.

Idan Adar

unread,
Sep 22, 2017, 6:32:28 AM9/22/17
to Jenkins Users
Discover pull requests from origin: Merging the pull request with the current target branch revision
Filter by name (with wildcards): develop master
Discover branches: All branches

I didn't set the "..forks" option because we don't work with forks.
I have now changed "Discover branches" to match yours.

After scanning the repository it says:
Checking pull-requests...

    Checking pull request #216

  1 pull requests were processed

But there's no job starting.
Tried also closing and re-opening the PR, which typically sends a request again to Jenkins, but this also didn't trigger the job.


On Friday, September 22, 2017 at 1:26:23 PM UTC+3, Stephen Connolly wrote:
What behaviours have you configured?
Inline images 1
If you didn't configure "discover from origin" then it won't discover from origin

(likely the upgrade/rollback/upgrade screwed up the auto-migration)
On 22 September 2017 at 03:18, Idan Adar <id...@adar.me> wrote:
Why is it saying this?

Checking pull request #215
> Submitted from origin repository, skipping

I have a repository and in this repository I have two branches: develop and master.
I created another branch, "devops", from which I make a pull request to develop.

I do want this PR discovered, and have the Jenkinsfile executed.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.

Idan Adar

unread,
Sep 22, 2017, 9:00:04 AM9/22/17
to Jenkins Users
The solution was to add "PR*" to the filter list.
Reply all
Reply to author
Forward
0 new messages