[JIRA] (JENKINS-49525) Exception sync'ing global pipeline library with new project

206 views
Skip to first unread message

wbasu@perforce.com (JIRA)

unread,
May 24, 2018, 9:45:02 AM5/24/18
to jenkinsc...@googlegroups.com
W Basu updated an issue
 
Jenkins / Bug JENKINS-49525
Exception sync'ing global pipeline library with new project
Change By: W Basu
Summary: Rare exception Exception sync'ing global pipeline library with new project
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

simon.watts@bgcpartners.com (JIRA)

unread,
Jun 21, 2018, 4:57:02 AM6/21/18
to jenkinsc...@googlegroups.com
Simon Watts commented on Bug JENKINS-49525
 
Re: Exception sync'ing global pipeline library with new project

This issue is endemic when rescanning a multibranch project.  This project is held in GIT, the extension library (bgcc2-jenkins) is in Perforce.

P4 Task: reverting all pending and shelved revisions.
... p4 revert /var/lib/jenkins/workspace/BRANCH-1-GAFQCT573WQMGSBML7___ +
ERROR: P4JAVA: Error(s):
Path '/var/lib/jenkins/workspace/BRANCH-1-GAFQCT573WQMGSBML7R37GK3WADSCORFBC2467UU4GSCQZTSWGGQ%40libs/bgc2-jenkins/...' is not under client's root '/var/lib/jenkins/workspace/BRANCH-2-FYEJFRRKPOT6CMEXIOQQ6W4RHD2EEZUQ6PS2JLHAT46TN6ZAZYAA%40libs/bgc2-jenkins'.

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
WorkflowScript: Loading libraries failed

1 error

	at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310)
	at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1085)
	at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:603)
	at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:581)
	at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:558)
	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:131)
	at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:125)
	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:560)
	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:521)
	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:325)
	at hudson.model.ResourceController.execute(ResourceController.java:97)
	at hudson.model.Executor.run(Executor.java:429)
Finished: FAILURE

simon.watts@bgcpartners.com (JIRA)

unread,
Jun 21, 2018, 6:23:02 AM6/21/18
to jenkinsc...@googlegroups.com

To follow up from this...

I noticed that the libraries where configured to use the "Legacy SCM" method in Jenkins global configuration.  When set up I didn't realized that "Helix" is an alias for Perforce.

So I have now tried changing to "Modern SCM" method, using "now" as the version (successfully identified by Jenkins).

However I now get a different error when the implicit library is loaded:

 

Obtained Jenkinsfile from af39698113dd5a786c3f362f93c33eacb0b455ca
Running in Durability level: MAX_SURVIVABILITY
Loading library bgc2-jenkins@now
... p4 changes -m1 //DistributedDevelopment/generic/jenkins/libs/bgc2-jenkins-1.0/.../.___ +
... p4 client -o jenkins-library.DistributedDevelopment.generic.jenkins.libs.bgc2-jenki___ +
P4: Unable to use Workspace: com.perforce.p4java.exception.RequestException: Wildcards (*, %%%%x, ...) not allowed in 'jenkins-library.DistributedDevelopment.generic.jenkins.libs.bgc2-jenkins-1.0....'.

... p4 info +
... p4 client -o jenkins-library.DistributedDevelopment.generic.jenkins.libs.bgc2-jenki___ +
P4: Unable to setup workspace: com.perforce.p4java.exception.RequestException: Wildcards (*, %%%%x, ...) not allowed in 'jenkins-library.DistributedDevelopment.generic.jenkins.libs.bgc2-jenkins-1.0....'.

ERROR: P4: Unable to setup workspace: com.perforce.p4java.exception.RequestException: Wildcards (*, %%%%x, ...) not allowed in 'jenkins-library.DistributedDevelopment.generic.jenkins.libs.bgc2-jenkins-1.0....'.

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
WorkflowScript: Loading libraries failed

1 error

	at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310)
	at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1085)
	at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:603)
	at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:581)
	at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:558)
	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:131)
	at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:125)
	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:560)
	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:521)
	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:325)
	at hudson.model.ResourceController.execute(ResourceController.java:97)
	at hudson.model.Executor.run(Executor.java:429)
Finished: FAILURE

Again, the Jenkins extension library is held in Perforce – while the project being built is held in GIT.  However I see the same error when building another project also hosted in Perforce.

Configuration of the shared library is as follows:

  • Name = bgc2-jenkins
  • Default version = now (currently maps to revision 4171459)
  • Load implicitly = true
  • Allow default version to be overridden = true
  • Include @Library changes in the job recent changes = true
  • Retrieval method = Modern SCM:
    • Helix Library
    • Perforce Credentials = (same as used for source code)
    • Character Set = none
    • Library Depot Path = //DistributedDevelopment/generic/jenkins/libs/bgc2-jenkins-1.0/...

 

 

simon.watts@bgcpartners.com (JIRA)

unread,
Jun 21, 2018, 6:30:04 AM6/21/18
to jenkinsc...@googlegroups.com
Simon Watts edited a comment on Bug JENKINS-49525
To follow up from this...

I noticed that the libraries where configured to use the _"Legacy SCM"_ method in Jenkins global configuration.  When set up I didn't realized that "Helix" is an alias for Perforce.


So I have now tried changing to "Modern SCM" method, using "now" as the version (successfully identified by Jenkins).

However I now get a different error when the implicit library is loaded:

 
{noformat}
Finished: FAILURE{noformat}

Again, the Jenkins extension library is held in Perforce – while the project being built is held in GIT.  However I see the same error when building another project also hosted in Perforce.

Configuration of the shared library is as follows:
* *Name* = bgc2-jenkins
* *Default version* = now (currently maps to revision 4171459)
* *Load implicitly* = true
* *Allow default version to be overridden* = true
* *Include @Library changes in the job recent changes* = true
* *Retrieval method* = Modern SCM:
** *Helix Library*
** *Perforce Credentials* = (same as used for source code)
** *Character Set* = none
** *Library Depot Path* = {{//DistributedDevelopment/generic/jenkins/libs/bgc2-jenkins-1.0/...}}

 
----
 


{color:#ff0000}*UPDATE:*{color}

The issue was with the "Library Depot Path".  This should not include the trailing '/...' wildcard!

The help associated with this time in the interface *does* include the '/...' in the example however (which is why I had entered it as such).  {color:#ff0000}*BUG*{color}

The example in the P4 plugin source does not include the wildcard.

simon.watts@bgcpartners.com (JIRA)

unread,
Jun 21, 2018, 6:30:04 AM6/21/18
to jenkinsc...@googlegroups.com
** *Library Depot Path* = {{//DistributedDevelopment/generic/jenkins/libs/bgc2-jenkins-1.0 {color:#ff0000}* /... *{color }} }

 
----
 

{color:#ff0000}*UPDATE:*{color}

The issue was with the "Library Depot Path".  This should not include the trailing '/...' wildcard!

The help associated with this time in the interface *does* include the '/...' in the example however (which is why I had entered it as such).  {color:#ff0000}*BUG*{color}

The example in the P4 plugin source does not include the wildcard.

simon.watts@bgcpartners.com (JIRA)

unread,
Jun 27, 2018, 5:21:03 AM6/27/18
to jenkinsc...@googlegroups.com

Spoke too soon.

Now using the "Modern SCM" to sync the extension library from Perforce; this works in singular cases, but we are still getting errors with concurrent jobs.  In this case, when the Multibranch Plugin rescans branches in a GIT hosted Java project.

Sample error from logs:

P4 Task: establishing connection.
... server: perforce.xxxx.com:5500
... node: xxxx

P4 Task: reverting all pending and shelved revisions.
... p4 revert /var/lib/jenkins/workspace/x_System_Build_MATCHBOX-411-EFMJRDIAGFDTWBE32H___ +ERROR: P4JAVA: Error(s):
Path '/var/lib/jenkins/workspace/x_System_Build_MATCHBOX-411-EFMJRDIAGFDTWBE32HH3RZLDFDWRVAG5TKEI2E3VLRA5ENPUEFUA%40libs/bgc2-jenkins/...' is not under client's root '/var/lib/jenkins/workspace/7-3-state-price-vis-4-state-4DR53P4IMDYIWKA3QKG6AIEBT3DF7X3K4AFR4SLWS6JUMLMNB5AA%40libs/bgc2-jenkins'.

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
WorkflowScript: Loading libraries failed

1 error

	at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310)
	at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1085)
	at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:603)
	at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:581)
	at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:558)
	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:131)
	at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:125)
	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:560)
	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:521)
	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:325)
	at hudson.model.ResourceController.execute(ResourceController.java:97)
	at hudson.model.Executor.run(Executor.java:429)
Finished: FAILURE

Jenkins version 2.107.2, plugins up-to-date at time of build (2018-06-26).

This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)

emilydeleff@gmail.com (JIRA)

unread,
Jul 11, 2018, 3:22:02 PM7/11/18
to jenkinsc...@googlegroups.com

I am experiencing the same issue with concurrent builds. This works as expected in isolation but any case with multiple jobs being triggered at the same time will result in failure. The first job succeeds while the second one running at the same time fails because the root on the jenkins-libarary workspace is still set to the first one.

The failed cases have been triggered by either polling or periodic trigger.

ERROR: P4 Task: failed: com.perforce.p4java.exception.P4JavaException: com.perforce.p4java.exception.P4JavaException: hudson.AbortException: P4JAVA: Error(s):
Path 'jenkins/workspace-Job_02/lib/...' is not under client's root 'jenkins/workspace-Job_01/lib/...'.

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
WorkflowScript: Loading libraries failed

1 error	
        at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310)
	at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1085)
	at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:603)
	at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:581)
	at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:558)
	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:131)
	at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:125)
	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:560)
	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:521)
	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:329)
	at hudson.model.ResourceController.execute(ResourceController.java:97)
	at hudson.model.Executor.run(Executor.java:429)
Finished: FAILURE

I am running Jenkins 2.130 and P4 1.8.10. 

pallen@perforce.com (JIRA)

unread,
Jul 25, 2018, 6:06:46 AM7/25/18
to jenkinsc...@googlegroups.com
Paul Allen started work on Bug JENKINS-49525
 
Change By: Paul Allen
Status: Open In Progress

pallen@perforce.com (JIRA)

unread,
Jul 25, 2018, 6:08:35 AM7/25/18
to jenkinsc...@googlegroups.com
Paul Allen closed an issue as Fixed
 

Resolved in 1.8.12

Related to JENKINS-50975

Change By: Paul Allen
Status: In Progress Closed
Resolution: Fixed
Reply all
Reply to author
Forward
0 new messages