[JIRA] (JENKINS-51552) Cannot replay pipelines - files are read-only

238 views
Skip to first unread message

gaspard.petit@eidosmontreal.com (JIRA)

unread,
May 26, 2018, 2:50:02 PM5/26/18
to jenkinsc...@googlegroups.com
Gaspard Petit created an issue
 
Jenkins / Bug JENKINS-51552
Cannot replay pipelines - files are read-only
Issue Type: Bug Bug
Assignee: Unassigned
Components: p4-plugin
Created: 2018-05-26 18:49
Priority: Major Major
Reporter: Gaspard Petit

Hello, since I recently updated, I cannot replay a pipeline. It seems like the pipeline library files are checked-out read-only and the replay tries to modify them.

In the error trace below, common.groovy is a common groovy library used by all the pipelines I use.

The library file is loaded for the multi-branch as Modern SCM/Helix Library.

 
Replacing contents of vars/common.groovy
java.nio.file.AccessDeniedException: D:\build\jobs\servlets-release-multi\project-main\builds\10\libs\jenkins_servlets\vars\common.groovy
at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:83)
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
at sun.nio.fs.WindowsFileSystemProvider.newByteChannel(WindowsFileSystemProvider.java:230)
at java.nio.file.spi.FileSystemProvider.newOutputStream(FileSystemProvider.java:434)
at java.nio.file.Files.newOutputStream(Files.java:216)
at hudson.FilePath$Write.invoke(FilePath.java:2051)
at hudson.FilePath$Write.invoke(FilePath.java:2040)
at hudson.FilePath.act(FilePath.java:1047)
at hudson.FilePath.act(FilePath.java:1025)
at hudson.FilePath.write(FilePath.java:2038)
at org.jenkinsci.plugins.workflow.libs.LibraryAdder.retrieve(LibraryAdder.java:164)
at org.jenkinsci.plugins.workflow.libs.LibraryAdder.add(LibraryAdder.java:134)
at org.jenkinsci.plugins.workflow.libs.LibraryDecorator$1.call(LibraryDecorator.java:125)
at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1065)
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)
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
 

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

gaspard.petit@eidosmontreal.com (JIRA)

unread,
May 26, 2018, 2:51:02 PM5/26/18
to jenkinsc...@googlegroups.com
Gaspard Petit updated an issue
Change By: Gaspard Petit
Hello, since I recently updated, I cannot replay a pipeline. It seems like the pipeline library files are checked-out read-only and the replay tries to modify them.

In the error trace below, common.groovy is a common groovy library used by all the pipelines I use.

The library file is loaded for the multi-branch as Modern SCM/Helix Library.

 
{code:java}

{code}
 

gaspard.petit@eidosmontreal.com (JIRA)

unread,
May 26, 2018, 2:54:02 PM5/26/18
to jenkinsc...@googlegroups.com
Gaspard Petit updated an issue
Hello, since I recently updated, I cannot replay a pipeline. It seems like the pipeline library files are checked-out read-only and the replay tries to modify them.

In the error trace below, common.groovy is a common groovy library used by all the pipelines I use.

The library file is loaded for the multi-branch as Modern SCM/Helix Library.

 

This was confirmed to happen on 1.8.9 and 1.8.10 of the plugin.

 

gaspard.petit@eidosmontreal.com (JIRA)

unread,
May 26, 2018, 3:18:02 PM5/26/18
to jenkinsc...@googlegroups.com
Gaspard Petit commented on Bug JENKINS-51552
 
Re: Cannot replay pipelines - files are read-only

Further investigation showed that this issue cannot be fixed by reverting the P4-Plugin, but it can be fixed by reverting Jenkins itself.  It thus appears to be caused by a change in Jenkins, not in P4-Plugin.

 

Jenkins 2.122 and 2.124 have the issue. I currently went back to LTS 2.107.3 and it works fine.

wbasu@perforce.com (JIRA)

unread,
Jun 21, 2018, 9:49:02 AM6/21/18
to jenkinsc...@googlegroups.com
W Basu updated an issue
 
Change By: W Basu
Labels: P4_SUPPORT

mbailey@unit2games.com (JIRA)

unread,
Jul 17, 2018, 7:09:04 AM7/17/18
to jenkinsc...@googlegroups.com
Mathew Bailey commented on Bug JENKINS-51552
 
Re: Cannot replay pipelines - files are read-only

Hi,

I've just run into this issue when our Jenkins server was updated (including the p4 plugin). Are you aware of any progress on identifying or fixing the issue on the Jenkins side of things?

 

Cheers,

Mat

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

erez@arbell.co.il (JIRA)

unread,
Sep 3, 2018, 7:29:02 AM9/3/18
to jenkinsc...@googlegroups.com
Erez Arbell updated an issue
 
Change By: Erez Arbell
Labels: P4_SUPPORT jenkins pipeline replay
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

erez@arbell.co.il (JIRA)

unread,
Sep 3, 2018, 7:29:02 AM9/3/18
to jenkinsc...@googlegroups.com
Erez Arbell updated an issue

kwirth@perforce.com (JIRA)

unread,
Sep 4, 2018, 8:21:02 AM9/4/18
to jenkinsc...@googlegroups.com
Karl Wirth commented on Bug JENKINS-51552
 
Re: Cannot replay pipelines - files are read-only

Working with Mathew Bailey on this.

Vanilla tests with free Jenkins Jenkins ver. 2.89.3  and the latest plugin (1.8.15) don't show the bug which seem to confirm that something changed in Jenkins.

kwirth@perforce.com (JIRA)

unread,
Sep 6, 2018, 6:28:02 AM9/6/18
to jenkinsc...@googlegroups.com

Reproduced on Jenkins 2.121.3 using same jenkinsfiles, libraries, Perforce server and P4-Plugin (1.8.15) as above. Confirm that this is a Jenkins server version problem. The file is readonly in the workspace:

-r--r--r-- 1 jenkins jenkins 1845 Sep  6 11:12 lib.groovy

And the error is:

P4 Task: saving built changes.
No previous build found...
... p4 client -o jenkins-library-master-StreamMultiBranchWithLibrary-main +
... p4 info +
... done

Replacing contents of src/org/foo/lib.groovy
java.nio.file.AccessDeniedException: /filestore/logtemp/jobs/StreamMultiBranchWithLibrary/branches/main/builds/3/libs/my-shared-library/src/org/foo/lib.groovy
	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
	at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
	at java.nio.file.spi.FileSystemProvider.newOutputStream(FileSystemProvider.java:434)
	at java.nio.file.Files.newOutputStream(Files.java:216)
	at hudson.FilePath$Write.invoke(FilePath.java:2046)
	at hudson.FilePath$Write.invoke(FilePath.java:2035)
	at hudson.FilePath.act(FilePath.java:1042)
	at hudson.FilePath.act(FilePath.java:1025)
	at hudson.FilePath.write(FilePath.java:2033)
	at org.jenkinsci.plugins.workflow.libs.LibraryAdder.retrieve(LibraryAdder.java:167)
	at org.jenkinsci.plugins.workflow.libs.LibraryAdder.add(LibraryAdder.java:137)
	at org.jenkinsci.plugins.workflow.libs.LibraryDecorator$1.call(LibraryDecorator.java:125)
	at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1065)
	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:330)
	at hudson.model.ResourceController.execute(ResourceController.java:97)
	at hudson.model.Executor.run(Executor.java:429)
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
WorkflowScript: Loading libraries failed

Note that there is no '@lib' in the workspace directory name which suggests these files are not being saved using the library specific code.

 

kwirth@perforce.com (JIRA)

unread,
Sep 6, 2018, 6:29:03 AM9/6/18
to jenkinsc...@googlegroups.com
Karl Wirth updated an issue
 
Change By: Karl Wirth
Labels: P4_SUPPORT P4_VERIFY pipeline replay

gaspard.petit@eidosmontreal.com (JIRA)

unread,
Sep 23, 2018, 9:04:02 PM9/23/18
to jenkinsc...@googlegroups.com
Gaspard Petit commented on Bug JENKINS-51552
 
Re: Cannot replay pipelines - files are read-only

I can confirm this is still happening in 2.138.1 (LTS)

pallen@perforce.com (JIRA)

unread,
Sep 27, 2018, 9:56:03 AM9/27/18
to jenkinsc...@googlegroups.com
Paul Allen updated an issue
 
Jenkins / New Feature JENKINS-51552
Change By: Paul Allen
Issue Type: Bug New Feature

pallen@perforce.com (JIRA)

unread,
Sep 27, 2018, 10:01:04 AM9/27/18
to jenkinsc...@googlegroups.com
Paul Allen updated an issue
Change By: Paul Allen
Issue Type: New Feature Bug

pallen@perforce.com (JIRA)

unread,
Sep 27, 2018, 10:02:03 AM9/27/18
to jenkinsc...@googlegroups.com
Paul Allen updated an issue
Change By: Paul Allen
Labels: P4_VERIFY P4_B pipeline replay

erez@arbell.co.il (JIRA)

unread,
Oct 28, 2018, 5:37:02 AM10/28/18
to jenkinsc...@googlegroups.com
Erez Arbell updated an issue
Change By: Erez Arbell
Component/s: core
Component/s: p4-plugin

erez@arbell.co.il (JIRA)

unread,
Oct 28, 2018, 5:39:01 AM10/28/18
to jenkinsc...@googlegroups.com
Erez Arbell commented on Bug JENKINS-51552
 
Re: Cannot replay pipelines - files are read-only

It is still happening on latest (2.148) 

How can this issue remain un-handled?
I am not upgrading from 2.107.3 since I use the replay feature a lot.
Is the replay feature not used by most of the community?
Who can help with this issue?

Following the comments above I am changing the issue's component from "p4-plugin" to "core".

 

erez@arbell.co.il (JIRA)

unread,
Jun 19, 2019, 5:54:02 AM6/19/19
to jenkinsc...@googlegroups.com
Erez Arbell updated an issue
Change By: Erez Arbell
Priority: Major Critical

kwirth@perforce.com (JIRA)

unread,
Jun 20, 2019, 8:27:02 AM6/20/19
to jenkinsc...@googlegroups.com
Karl Wirth commented on Bug JENKINS-51552
 
Re: Cannot replay pipelines - files are read-only

Hi Erez Arbell - I just tested this on P4-Plugin 1.10.0 and Jenkins 2.138.1 and couldnt reproduce the problem? Are you still seeing the problem on the latest versions?

erez@arbell.co.il (JIRA)

unread,
Jul 7, 2019, 4:32:04 AM7/7/19
to jenkinsc...@googlegroups.com

Karl Wirth, I upgraded Jenkins to 2.176.1 and p4 plugin to 1.10.1.

This issue still reproduces: I do a replay to a pipeline job and I got the same error:

Replacing contents of src/org/foo/lib.groovy
[Pipeline] }
[Pipeline] // node
Got error: /jenkins/home/jobs/test/builds/43/libs/name/src/org/foo/lib.groovy
[Pipeline] }
[Pipeline] // timestamps
[Pipeline] End of Pipeline
java.nio.file.AccessDeniedException: /jenkins/home/jobs/test/builds/43/libs/name/src/org/foo/lib.groovy
	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
	at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
	at java.nio.file.spi.FileSystemProvider.newOutputStream(FileSystemProvider.java:434)
	at java.nio.file.Files.newOutputStream(Files.java:216)
	at hudson.FilePath$Write.invoke(FilePath.java:2100)
	at hudson.FilePath$Write.invoke(FilePath.java:2089)
	at hudson.FilePath.act(FilePath.java:1076)
	at hudson.FilePath.act(FilePath.java:1059)
	at hudson.FilePath.write(FilePath.java:2087)
	at org.jenkinsci.plugins.workflow.libs.LibraryAdder.retrieve(LibraryAdder.java:168)
	at org.jenkinsci.plugins.workflow.libs.LibraryStep$Execution.run(LibraryStep.java:207)
	at org.jenkinsci.plugins.workflow.libs.LibraryStep$Execution.run(LibraryStep.java:156)
	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
	at hudson.security.ACL.impersonate(ACL.java:290)
	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
	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

kwirth@perforce.com (JIRA)

unread,
Jul 8, 2019, 7:09:02 AM7/8/19
to jenkinsc...@googlegroups.com

Hi Erez Arbell - Thanks for letting us know. I will email you directly to get more information.

kwirth@perforce.com (JIRA)

unread,
Jul 23, 2019, 7:59:02 AM7/23/19
to jenkinsc...@googlegroups.com

Hi Erez Arbell - Thanks for all your help. I have been able to reproduce the problem with the following setup:

 

(1) Submit //depot/lib_autoload/libs/src/com/f/v/Utils.groovy

 

#!groovy
package com.f.v
class Utils implements Serializable {
 static void main()
 {
 println("This is in Utils Library")
 }
static void test()
 {
 println("This is test in Utils in the Library")
 }
}

 

 

(2) Define a pipeline job with groovy code in GUI editor:

// Define globals
def fLibts{
    try {
        node ('master') {
            Lib = loadFLib()
            def buildData = Lib.com.f.v.Utils.test();
            }
    }
    catch (e) {
        throw e
    }    
    echo "Running some tests here..."
}// Load a specific Library
def loadFLib() {
    def p4ClientFormat = "jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}-flib"
    return loadLibrary(
        identifier: 'f@1',
        clientFormat: p4ClientFormat,
        p4Mapping: "//depot/lib_autoload/libs/src/com/f/v/... //${p4ClientFormat}/src/com/f/v/...\n"
    )
}// Generic Library Loader
def loadLibrary(args) 
{    
    def lib = library(
        identifier: args.identifier,
        retriever: legacySCM([
            $class: 'PerforceScm',
            credential: 'JenkinsMaster',
            populate: [
                $class: 'AutoCleanImpl',
                delete: true,
                modtime: false,
                pin: '',
                quiet: false,
                replace: true
            ],
            workspace: manualSpec(
                charset: 'none',
                name: args.clientFormat,
                pinHost: false,
                spec: clientSpec(
                    allwrite: false, backup: false, clobber: true, compress: false, line: 'LOCAL',
                    locked: false, modtime: false, rmdir: false, serverID: '', streamName: '', type: 'WRITABLE',
                    view: args.p4Mapping
                )
            )
        ])
    )
    return lib
}

 

(3) Run the job.

(4) When you use the 'Replay' option for the same job you see:

11:21:41 P4: saving built changes.
11:21:41 ... p4 client -o jenkins-master-JENKINS-57314-ExplicitLocalLib-Replay-2-flib 
+11:21:41 ... p4 info 
+11:21:41 ... p4 info 
+11:21:41 ... p4 client -o jenkins-master-JENKINS-57314-ExplicitLocalLib-Replay-2-flib 
+11:21:41 ... done
11:21:41 
11:21:41 Replacing contents of src/com/f/v/Utils.groovy
[Pipeline] }
[Pipeline] // node
[Pipeline] }
[Pipeline] // timestamps
[Pipeline] End of Pipeline
java.nio.file.AccessDeniedException: /var/lib/jenkins/jobs/JENKINS-57314-ExplicitLocalLib-Replay/builds/25/libs/f/src/com/f/v/Utils.groovy
	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
	at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
	at java.nio.file.spi.FileSystemProvider.newOutputStream(FileSystemProvider.java:434)
	at java.nio.file.Files.newOutputStream(Files.java:216)
	at hudson.FilePath$Write.invoke(FilePath.java:2100)
	at hudson.FilePath$Write.invoke(FilePath.java:2089)
	at hudson.FilePath.act(FilePath.java:1076)
	at hudson.FilePath.act(FilePath.java:1059)
	at hudson.FilePath.write(FilePath.java:2087)
	at org.jenkinsci.plugins.workflow.libs.LibraryAdder.retrieve(LibraryAdder.java:168)
	at org.jenkinsci.plugins.workflow.libs.LibraryStep$Execution.run(LibraryStep.java:207)
	at org.jenkinsci.plugins.workflow.libs.LibraryStep$Execution.run(LibraryStep.java:156)
	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
	at hudson.security.ACL.impersonate(ACL.java:290)
	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
	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

 

Add Comment Add Comment
 

kwirth@perforce.com (JIRA)

unread,
Jul 23, 2019, 8:00:04 AM7/23/19
to jenkinsc...@googlegroups.com
Karl Wirth updated an issue
 
Change By: Karl Wirth
Labels: P4_B pipeline replay P4_VERIFY

j.spang@gmail.com (JIRA)

unread,
Aug 7, 2019, 6:33:02 PM8/7/19
to jenkinsc...@googlegroups.com
Jay Spang commented on Bug JENKINS-51552
 
Re: Cannot replay pipelines - files are read-only

What happens if you changer `allwrite: false` in the client definition to be true?

kwirth@perforce.com (JIRA)

unread,
Aug 12, 2019, 9:11:05 AM8/12/19
to jenkinsc...@googlegroups.com

Hi Jay Spang - Thanks. In my testing if the original job had 'allwrite:true' then it can be replayed.  Erez Arbell - Does this work for you?

erez@arbell.co.il (JIRA)

unread,
Aug 19, 2019, 6:35:03 AM8/19/19
to jenkinsc...@googlegroups.com

Hello.

I changed in the Jenkinsfile  to "allwrite: true" but I still have the same issue.

This is the client spec:

clientSpec( allwrite: true, backup: false, clobber: true, compress: false, line: 'LOCAL',
          locked: false, modtime: false, rmdir: false, serverID: '', streamName: '', type: 'WRITABLE',
          view: args.p4Mapping
)
Add Comment Add Comment
 

erez@arbell.co.il (JIRA)

unread,
Dec 5, 2019, 4:47:04 AM12/5/19
to jenkinsc...@googlegroups.com

A reminder about this issue.

I know that no one here owes me anything.

However, this is a major feature (replay) that is broken and due to it we cannot upgrade Jenkins to the newer versions.

It looks like Jenkins is not maintained very well. Is it possible to assume that Jenkins is getting out of style? Shall we start to consider other options.

I am asking it seriously. What do you think?

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

kwirth@perforce.com (JIRA)

unread,
Dec 5, 2019, 5:38:03 AM12/5/19
to jenkinsc...@googlegroups.com

Hi Erez Arbell,

This is still actively developed and we released a new version of the plugin last week (1.10.7).  If this feature has not been implemented it will be because the cause is outside the plugin itself in core Jenkins or other plugins, or other items have had to be prioritized in front of it.

 

I will resurrect my test and confirm if the workaround is still working for me.

kwirth@perforce.com (JIRA)

unread,
Dec 5, 2019, 9:16:04 AM12/5/19
to jenkinsc...@googlegroups.com
Karl Wirth edited a comment on Bug JENKINS-51552
Hi [~erez_arbell] - Thanks for all your help. I have been able to reproduce the problem with the following setup:

 

(1) Submit //depot/lib_autoload/libs/src/com/f/v/Utils.groovy

 
{code:java}

#!groovy
package com.f.v
class Utils implements Serializable {
static void main()
{
println("This is in Utils Library")
}
static void test()
{
println("This is test in Utils in the Library")
}
}
{code}

 

 

(2) Define a pipeline job with groovy code in GUI editor:
{code:java}
// Define globals
def
fLibts fLib

ts
{
                    allwrite: false, backup: false, clobber: true, compress: false, line: 'LOCAL',

                    locked: false, modtime: false, rmdir: false, serverID: '', streamName: '', type: 'WRITABLE',
                    view: args.p4Mapping
                )
            )
        ])
    )
    return lib
}{code}
 



(3) Run the job.

(4) When you use the 'Replay' option for the same job you see:
{code:java}
Finished: FAILURE{code}
 

kwirth@perforce.com (JIRA)

unread,
Dec 5, 2019, 11:38:02 AM12/5/19
to jenkinsc...@googlegroups.com

Hi Erez Arbell - I confirm that the problem is still seen in p4-plugin 1.10.7.

However setting allwrite:true still solves it for me.

I raised this to the developers and they suggested that the underlying problem could be that the old 'legacySCM' is being used. Can you please check if you are using 'modernSCM' and if not, try it to see if it solves the problem.:

     https://jenkins.io/doc/pipeline/steps/workflow-cps-global-lib

erez@arbell.co.il (JIRA)

unread,
Dec 8, 2019, 7:32:03 AM12/8/19
to jenkinsc...@googlegroups.com

Hello Karl Wirth.

In the Jenkins instance I'm using for reproducing this issue there are no "Global Pipeline Libraries" defined.

I am only loading the code from p4 using the code:

def loadLib() {
    def p4ClientFormat = "jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}-lib"
    return loadLibrary(
        identifier: 'ff@1',
        clientFormat: p4ClientFormat,
        p4Mapping: "//depot/project/automation/jenkins/pipeline/src/com/v4/... //${p4ClientFormat}/src/com/v4/...\n" +
                   "//depot/project/automation/jenkins/pipeline/vars/... //${p4ClientFormat}/vars/..."
    )
}

erez@arbell.co.il (JIRA)

unread,
Dec 8, 2019, 7:39:04 AM12/8/19
to jenkinsc...@googlegroups.com
Erez Arbell edited a comment on Bug JENKINS-51552
Hello [~p4karl].


In the Jenkins instance I'm using for reproducing this issue there are no "Global Pipeline Libraries" defined.

I am only loading the code from p4 using the code:
{code:java}

def loadLib() {
    def p4ClientFormat = "jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}-lib"
    return loadLibrary(
        identifier: 'ff@1',
        clientFormat: p4ClientFormat,
        p4Mapping: "//depot/project/automation/jenkins/pipeline/src/com/v4/... //${p4ClientFormat}/src/com/v4/...\n" +
                   "//depot/project/automation/jenkins/pipeline/vars/... //${p4ClientFormat}/vars/..."
    )
}
{code}
Jenkins version 2.190.3

P4 plugin version: 1.10.7

kwirth@perforce.com (JIRA)

unread,
Dec 9, 2019, 12:06:03 PM12/9/19
to jenkinsc...@googlegroups.com

Hi Erez Arbell - Thanks but in the last data you sent me the definition for the function 'LoadLibrary' in your code included 'retriever: legacySCM'. Please check if that function still uses 'retriever: legacySCM' and try it with 'retriever: modernSCM'.

Thanks in advance,

Karl

erez@arbell.co.il (JIRA)

unread,
Dec 9, 2019, 1:20:07 PM12/9/19
to jenkinsc...@googlegroups.com

I changed "legacySCM" to "modernSCM" and got error:

 

java.lang.UnsupportedOperationException: no known implementation of class jenkins.scm.api.SCMSource is named PerforceScm
...

I tried "Helix Library", using the Snippet Generator:

 

 

def p4Mapping = "//depot/project/automation/jenkins/pipeline/src/com/v4/...\n" +
                   "//depot/project/automation/jenkins/pipeline/vars/..."
def lib = library identifier: args.identifier, retriever: modernSCM(globalLib(charset: 'none', path: p4Mapping, credential: env.P4_CREDENTIAL))

and got this error:

 

 

 (p4):cmd:... p4 sync -q /home/jenkins/.jenkins/workspace/test-p4%40libs/...#none
 p4 sync -q /home/jenkins/.jenkins/workspace/test-p4%40libs/...#none
 
 (p4):stop:9
 ... rm -rf /home/jenkins/.jenkins/workspace/test-p4@libs
 
 P4 Task: syncing files at change: -1
 (p4):cmd:... p4 sync -f -q /home/jenkins/.jenkins/workspace/test-p4%40libs/...@-1
 p4 sync -f -q /home/jenkins/.jenkins/workspace/test-p4%40libs/...@-1
 
 Invalid changelist/client/label/date '@-1'.
 
 (p4):stop:10
 P4 Task: attempt: 1
 ERROR: P4: Task Exception: com.perforce.p4java.exception.P4JavaException: com.perforce.p4java.exception.P4JavaException: hudson.AbortException: P4JAVA: Error(s):
 Invalid changelist/client/label/date '@-1'.

What is the syntax to use? I did not find it documented.

 

erez@arbell.co.il (JIRA)

unread,
Dec 9, 2019, 1:20:07 PM12/9/19
to jenkinsc...@googlegroups.com
Erez Arbell edited a comment on Bug JENKINS-51552
I changed "legacySCM" to "modernSCM" and got error:

 
{code:java}

java.lang.UnsupportedOperationException: no known implementation of class jenkins.scm.api.SCMSource is named PerforceScm
...{code}

I tried "Helix Library", using the Snippet Generator:

 

 
{code:java}

def p4Mapping = "//depot/project/automation/jenkins/pipeline/src/com/v4/...\n" +
                   "//depot/project/automation/jenkins/pipeline/vars/..."
def lib = library identifier: args.identifier, retriever: modernSCM(globalLib(charset: 'none', path: p4Mapping, credential: env.P4_CREDENTIAL))
{code}
and got this error:

 

 
{code:java}

(p4):cmd:... p4 sync -q /home/jenkins/.jenkins/workspace/test-p4%40libs/...#none
p4 sync -q /home/jenkins/.jenkins/workspace/test-p4%40libs/...#none

(p4):stop:9
... rm -rf /home/jenkins/.jenkins/workspace/test-p4@libs

P4 Task: syncing files at change: -1
(p4):cmd:... p4 sync -f -q /home/jenkins/.jenkins/workspace/test-p4%40libs/...@-1
p4 sync -f -q /home/jenkins/.jenkins/workspace/test-p4%40libs/...@-1

Invalid changelist/client/label/date '@-1'.

(p4):stop:10
P4 Task: attempt: 1
ERROR: P4: Task Exception: com.perforce.p4java.exception.P4JavaException: com.perforce.p4java.exception.P4JavaException: hudson.AbortException: P4JAVA: Error(s):
Invalid changelist/client/label/date '@-1'.
{code}

What is the syntax to use? I did not find it documented.

kwirth@perforce.com (JIRA)

unread,
Dec 10, 2019, 11:17:03 AM12/10/19
to jenkinsc...@googlegroups.com

Hi Erez Arbell - I have to thank the developers for this. Your definition was mostly correct. For ModernSCM the 'identifier' should be '@' followed by the changelist number. For example:

def lib = library( identifier : '@23312',retriever: modernSCM(globalLib(charset: 'none', credential: 'JenkinsMaster', id: '9bb4320c-c31c-46ce-8c5f-68872f519067', path: '//depot/lib_autoload/libs/...')))

Note that it also doesnt allow you to specify the workspace path so I specified the depot path just above 'src' which seems to work for me.

erez@arbell.co.il (JIRA)

unread,
Dec 10, 2019, 12:39:05 PM12/10/19
to jenkinsc...@googlegroups.com

Thank you. I will try it.
How can I get the latest changelist?
What is the "id"?

erez@arbell.co.il (JIRA)

unread,
Dec 10, 2019, 1:54:04 PM12/10/19
to jenkinsc...@googlegroups.com

Not working.

I ran:

def lib = library( identifier : '@3216471',retriever: modernSCM(globalLib(charset: 'none', credential: env.P4_CREDENTIAL, id: '9bb4320c-c31c-46ce-8c5f-68872f519067', path: args.p4Mapping)))

and got error:

 (p4):cmd:... p4 sync -q /home/jenkins/.jenkins/workspace/test-p4%40libs/...#none
 p4 sync -q /home/jenkins/.jenkins/workspace/test-p4%40libs/...#none
 
 (p4):stop:9
 ... rm -rf /home/jenkins/.jenkins/workspace/test-p4@libs
 
 P4 Task: syncing files at change: -1
 (p4):cmd:... p4 sync -f -q /home/jenkins/.jenkins/workspace/test-p4%40libs/...@-1
 p4 sync -f -q /home/jenkins/.jenkins/workspace/test-p4%40libs/...@-1
 
 Invalid changelist/client/label/date '@-1'.
 
 (p4):stop:10
 P4 Task: attempt: 1
 ERROR: P4: Task Exception: com.perforce.p4java.exception.P4JavaException: com.perforce.p4java.exception.P4JavaException: hudson.AbortException: P4JAVA: Error(s):
 Invalid changelist/client/label/date '@-1'.

kwirth@perforce.com (JIRA)

unread,
Dec 11, 2019, 12:40:01 PM12/11/19
to jenkinsc...@googlegroups.com

Hi Erez Arbell, If you don't know the appropriate change you could use '@now' for the latest.

Also please get me the full console log. You should have a 'p4 changes' for the library similar to:

[Pipeline] library
17:36:23 Loading library @now
17:36:23 ... p4 changes -m1 //depot/lib_autoload/libs/.../...@now +

This is what the library loader uses to set '@-1' to a valid value.

erez@arbell.co.il (JIRA)

unread,
Dec 12, 2019, 6:20:04 AM12/12/19
to jenkinsc...@googlegroups.com

This is the script I am running:

def p4Mapping = "//depot/project/automation/fit/jenkins/pipeline/src/com/f5/v4/...\n" +
                "//depot/project/automation/fit/jenkins/pipeline/vars/..."
def lib = library(identifier: '@now', retriever: modernSCM(globalLib(charset: 'none', credential: env.P4_CREDENTIAL, id: '9bb4320c-c31c-46ce-8c5f-68872f519067', path: p4Mapping)))

Full console log:

Started by user unknown or anonymous
Replayed #33
Running in Durability level: MAX_SURVIVABILITY
[Pipeline] Start of Pipeline
[Pipeline] timestamps
[Pipeline] {
[Pipeline] node
 Running on Jenkins in /home/jenkins/.jenkins/workspace/test-p4
[Pipeline] {
[Pipeline] library
 Loading library @now
 (p4):cmd:... p4 changes -m1 //depot/project/automation/fit/jenkins/pipeline/src/com/f5/v4/...
 //___
 p4 changes -m1 //depot/project/automation/fit/jenkins/pipeline/src/com/f5/v4/...
 //depot/project/automation/fit/jenkins/pipeline/vars/.../...@now
 
 (p4):stop:3
 (p4):cmd:... p4 login -s
 p4 login -s
 
 User test ticket expires in 158704 hours 4 minutes.
 
 (p4):stop:3
 (p4):cmd:... p4 client -o jenkins-lib-c8d3a941-8ad2-40cc-806d-59ba90173d5b
 p4 client -o jenkins-lib-c8d3a941-8ad2-40cc-806d-59ba90173d5b
 
 (p4):stop:4
 (p4):cmd:... p4 info
 p4 info
 
 (p4):stop:5
 (p4):cmd:... p4 info
 p4 info
 
 (p4):stop:6
 (p4):cmd:... p4 client -o jenkins-lib-c8d3a941-8ad2-40cc-806d-59ba90173d5b
 p4 client -o jenkins-lib-c8d3a941-8ad2-40cc-806d-59ba90173d5b
 
 (p4):stop:7
 (p4):cmd:... p4 client -i
 p4 client -i
 
 Client jenkins-lib-c8d3a941-8ad2-40cc-806d-59ba90173d5b saved.
 
 (p4):stop:8
 (p4):cmd:...   View:
       //depot/project/automation/fit/jenkins/pipeline/src/com/f5/v4/... //jenkins-lib-c8d3a941-8ad2-40cc-806d-59ba90173d5b/depot/project/automation/fit/jenkins/pipeline/src/com/f5/v4/...
       //depot/project/automation/fit/jenkins/pipeline/vars/... //jenkins-lib-c8d3a941-8ad2-40cc-806d-59ba90173d5b/depot/project/automation/fit/jenkins/pipeline/vars/...
 ...   Root: /home/jenkins/.jenkins/workspace/test-p4%40libs
 (p4):stop:
 (p4):cmd:... p4 counter change
 p4 counter change
 
 (p4):stop:9
 (p4):cmd:... p4 changes -m1 -ssubmitted //jenkins-lib-c8d3a941-8ad2-40cc-806d-59ba90173d5b/...
 p4 changes -m1 -ssubmitted //jenkins-lib-c8d3a941-8ad2-40cc-806d-59ba90173d5b/...
 
 Change 3216471 on 2019/12/08 by arbell@erez03-arbell-jenkins '[Jenkins] Set the default job p'
 (p4):stop:10
 (p4):cmd:... p4 repos -C
 p4 repos -C
 
 (p4):stop:11
 P4: builds: -1 
 (p4):cmd:... p4 login -s
 p4 login -s
 
 User test ticket expires in 158704 hours 3 minutes.
 
 (p4):stop:3
 (p4):cmd:... p4 client -o jenkins-lib-c8d3a941-8ad2-40cc-806d-59ba90173d5b
 p4 client -o jenkins-lib-c8d3a941-8ad2-40cc-806d-59ba90173d5b
 
 (p4):stop:4
 (p4):cmd:... p4 info
 p4 info
 
 (p4):stop:5
 (p4):cmd:... p4 info
 p4 info
 
 (p4):stop:6
 (p4):cmd:... p4 client -o jenkins-lib-c8d3a941-8ad2-40cc-806d-59ba90173d5b
 p4 client -o jenkins-lib-c8d3a941-8ad2-40cc-806d-59ba90173d5b
 
 (p4):stop:7
 
 P4 Task: establishing connection.
 ... server: XXXX.XXXX.com:1999
 ... node: jenkins-master-2
 Building on Node: master
 (p4):cmd:... p4 login -s
 p4 login -s
 
 User test ticket expires in 158704 hours 3 minutes.
 
 (p4):stop:3
 (p4):cmd:... p4 client -o jenkins-lib-c8d3a941-8ad2-40cc-806d-59ba90173d5b
 p4 client -o jenkins-lib-c8d3a941-8ad2-40cc-806d-59ba90173d5b
 
 (p4):stop:4
 (p4):cmd:... p4 info
 p4 info
 
 (p4):stop:5
 (p4):cmd:... p4 info
 p4 info
 
 (p4):stop:6
 (p4):cmd:... p4 client -o jenkins-lib-c8d3a941-8ad2-40cc-806d-59ba90173d5b
 p4 client -o jenkins-lib-c8d3a941-8ad2-40cc-806d-59ba90173d5b
 
 (p4):stop:7
 
 P4 Task: establishing connection.
 ... server: p4proxy-tlv.f5net.com:1999
 ... node: jenkins-master-2
 
 P4 Task: reverting all pending and shelved revisions.
 (p4):cmd:... p4 revert /home/jenkins/.jenkins/workspace/test-p4%40libs/...
 p4 revert /home/jenkins/.jenkins/workspace/test-p4%40libs/...
 
 /home/jenkins/.jenkins/workspace/test-p4%40libs/... - file(s) not opened on this client.
 
 (p4):stop:8
 ... rm [abandoned files]
 duration: (568ms)
 
 (p4):cmd:... p4 sync -q /home/jenkins/.jenkins/workspace/test-p4%40libs/...#none
 p4 sync -q /home/jenkins/.jenkins/workspace/test-p4%40libs/...#none
 
 (p4):stop:9
 ... rm -rf /home/jenkins/.jenkins/workspace/test-p4@libs
 
 P4 Task: syncing files at change: -1
 (p4):cmd:... p4 sync -f -q /home/jenkins/.jenkins/workspace/test-p4%40libs/...@-1
 p4 sync -f -q /home/jenkins/.jenkins/workspace/test-p4%40libs/...@-1
 
 Invalid changelist/client/label/date '@-1'.
 
 (p4):stop:10
 P4 Task: attempt: 1
 ERROR: P4: Task Exception: com.perforce.p4java.exception.P4JavaException: com.perforce.p4java.exception.P4JavaException: hudson.AbortException: P4JAVA: Error(s):
 Invalid changelist/client/label/date '@-1'
.
 
[Pipeline] }
[Pipeline] // node
[Pipeline] }
[Pipeline] // timestamps
[Pipeline] End of Pipeline
ERROR: Maximum checkout retry attempts reached, aborting
Finished: FAILURE

 

kwirth@perforce.com (JIRA)

unread,
Dec 12, 2019, 6:26:03 AM12/12/19
to jenkinsc...@googlegroups.com

Hi Erez Arbell - Thanks. Please change your p4Mapping to be '//depot/project/automation/fit/jenkins/pipeline/...' only and try again.

erez@arbell.co.il (JIRA)

unread,
Dec 12, 2019, 8:49:04 AM12/12/19
to jenkinsc...@googlegroups.com

With this change the load of this library succeeds! Thank you. We have progress.

There are still problems:

problem 1:

How to load a library that contains two p4 mappings?

problem 2:

Usually, when I do a "replay", then after the library is loaded I see in the log this kind of line for each file:

Replacing contents of vars/isTimeoutException.groovy

Now I do not see it. If the files are not replaced then I loose the main capability of the "replay" feature.

problem 3:

After this my script loads another library with the same code but different mappings:

//test/maint/automation/fit/TrafficShield/autotest/bvt-jenkins/src/...

This is failing with the strange error:

[Pipeline] library
 Only using first definition of library 
[Pipeline] }
[Pipeline] // node
[Pipeline] }
[Pipeline] // timestamps
[Pipeline] End of Pipeline
java.lang.ClassNotFoundException: tests.Testing
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:677)
	at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:545)
	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 org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
	at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:47)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
	at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:160)
	at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23)
	at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:157)
	at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:158)
	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:162)
	at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17)
	at WorkflowScript.run(WorkflowScript:19)
	at ___cps.transform___(Native Method)
	at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:86)
	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:113)
	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:83)
	at sun.reflect.GeneratedMethodAccessor85.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:129)
	at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:268)
	at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:163)
	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18)
	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:51)
	at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:185)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:370)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$200(CpsThreadGroup.java:93)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:282)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:270)
	at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:67)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:131)
	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
	at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
	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

I tried using different "id"but it did not help.

kwirth@perforce.com (JIRA)

unread,
Dec 19, 2019, 12:02:04 PM12/19/19
to jenkinsc...@googlegroups.com

Hi Erez Arbell.

problem 1:

I cannot get this to work. Is it possible to to load two libraries. One for each path?

problem 2:

I also see this so have raised the following enhancement request JENKINS-60545.

problem 3:

Please get me you code.

erez@arbell.co.il (JIRA)

unread,
Dec 23, 2019, 7:45:03 AM12/23/19
to jenkinsc...@googlegroups.com

problem 1:

I need to check.

problem 2:

Thank you.

problem 3:

My Jenkinsfile:

 

def f5Lib, testsLib
timestamps{
    try {
        node ('master') {
            f5Lib = loadLib('//depot/project/automation/fit/jenkins/pipeline')
            testsLib = loadTestsLib('//test/maint/bigip14.1.0/automation/fit/TrafficShield/autotest/bvt-jenkins/src')
        }
    }
    catch (e) {
        throw e
    }
}

def loadLib(mapping) {
    def p4ClientFormat = "jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}-lib"
    return loadLibrary(
        clientFormat: p4ClientFormat,
        p4Mapping: "${mapping}"
    )
}

def loadTestsLib(autotestMapping) {
    def p4ClientFormat = "jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}-tests"
    return loadLibrary(
        clientFormat: p4ClientFormat,
        p4Mapping: "${autotestMapping}"
    )
}

def loadLibrary(args) {
    return lib = library( identifier: '@now', retriever: modernSCM(globalLib(charset: 'none', credential: env.P4_CREDENTIAL, id: args.clientFormat, path: args.p4Mapping)))
}

And I get the message:

 Only using first definition of library 

 

kwirth@perforce.com (JIRA)

unread,
Mar 24, 2020, 11:26:03 AM3/24/20
to jenkinsc...@googlegroups.com

Hi Erez Arbell - I've just been going through requalifying old jobs and still cant reproduce this problem. Are you avalable later in the week so we could have a Webex? If you are please drop an email to sup...@perforce.com for my attention so we can arrange it.

This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

erez@arbell.co.il (JIRA)

unread,
Mar 24, 2020, 2:38:03 PM3/24/20
to jenkinsc...@googlegroups.com

Hello Karl Wirth.

Thank you for following this issue.

I apologize but currently I can't find the time to work on this issue.

I suggest you will close the issue for now.

If I will encounter this issue in the future I will re-open it.

kwirth@perforce.com (JIRA)

unread,
Mar 26, 2020, 7:30:03 AM3/26/20
to jenkinsc...@googlegroups.com

Hi Erez Arbell - I fully understand and I hope things are OK with you. As soon as there is anything I can do to help, please let me know.

kwirth@perforce.com (JIRA)

unread,
Mar 26, 2020, 7:31:03 AM3/26/20
to jenkinsc...@googlegroups.com
Karl Wirth closed an issue as Postponed
 

More invstigation required. Will return to this at a later date.

Change By: Karl Wirth
Status: Open Closed
Resolution: Postponed
Reply all
Reply to author
Forward
0 new messages