[JIRA] (JENKINS-52981) Pipeline: success after checkout error

75 views
Skip to first unread message

jenkins@mockies.de (JIRA)

unread,
Aug 10, 2018, 7:39:02 AM8/10/18
to jenkinsc...@googlegroups.com
Christoph Vogtländer created an issue
 
Jenkins / Bug JENKINS-52981
Pipeline: success after checkout error
Issue Type: Bug Bug
Assignee: Ivan Fernandez Calvo
Components: pipeline, subversion-plugin
Created: 2018-08-10 11:38
Environment: Jenkins ver. 2.121.2
Windows Server 2012
Priority: Minor Minor
Reporter: Christoph Vogtländer

When trying to checkout from a non existing location there the pipeline script simply resumes operation without setting the build result to FAILURE.

My checkout step:

 

checkout changelog: false, poll: false, scm: [$class: 'SubversionSCM', additionalCredentials: [[credentialsId: 'id', realm: '<https://server:443> VisualSVN Server']], excludedCommitMessages: '', excludedRegions: '', excludedRevprop: '', excludedUsers: '', filterChangelog: false, ignoreDirPropChanges: false, includedRegions: '', locations: [[cancelProcessOnExternalsFail: true, credentialsId: 'id', depthOption: 'infinity', ignoreExternalsOption: false, local: nonexisting, remote: https://server/path/nonexisting]], workspaceUpdater: [$class: 'UpdateWithRevertUpdater']]

Running the code will result in:

 

[Pipeline] [Checkout nonexisting] checkout
[Checkout nonexisting] Location 'https://server/path/nonexisting' does not exist
[Checkout nonexisting] ERROR: Failed to parse svn info forhttps://server/path/nonexisting
[Checkout nonexisting] org.tmatesoft.svn.core.SVNException: svn: E155007: '/var/jenkins/workspace/System/trunk/Test/nonexisting' is not a working copy
[Checkout nonexisting] 	at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:70)
[Checkout nonexisting] 	at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:57)
[Checkout nonexisting] 	at org.tmatesoft.svn.core.internal.wc17.db.SVNWCDb.parseDir(SVNWCDb.java:1955)
[Checkout nonexisting] 	at org.tmatesoft.svn.core.internal.wc17.db.SVNWCDb.parseDir(SVNWCDb.java:1846)
[Checkout nonexisting] 	at org.tmatesoft.svn.core.internal.wc17.db.SVNWCDb.readConflicts(SVNWCDb.java:3382)
[Checkout nonexisting] 	at org.tmatesoft.svn.core.internal.wc17.db.SVNWCDb.readConflicts(SVNWCDb.java:3355)
[Checkout nonexisting] 	at org.tmatesoft.svn.core.internal.wc17.db.SVNWCDb.opReadTreeConflict(SVNWCDb.java:2797)
[Checkout nonexisting] 	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgGetInfo.run(SvnNgGetInfo.java:74)
[Checkout nonexisting] 	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgGetInfo.run(SvnNgGetInfo.java:45)
[Checkout nonexisting] 	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgOperationRunner.run(SvnNgOperationRunner.java:20)
[Checkout nonexisting] 	at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:21)
[Checkout nonexisting] 	at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1239)
[Checkout nonexisting] 	at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)
[Checkout nonexisting] 	at org.tmatesoft.svn.core.wc.SVNWCClient.doInfo(SVNWCClient.java:2497)
[Checkout nonexisting] 	at hudson.scm.SubversionSCM$BuildRevisionMapTask.invoke(SubversionSCM.java:1325)
[Checkout nonexisting] 	at hudson.scm.SubversionSCM$BuildRevisionMapTask.invoke(SubversionSCM.java:1289)
[Checkout nonexisting] 	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2913)
[Checkout nonexisting] 	at hudson.remoting.UserRequest.perform(UserRequest.java:212)
[Checkout nonexisting] 	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
[Checkout nonexisting] 	at hudson.remoting.Request$2.run(Request.java:369)
[Checkout nonexisting] 	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
[Checkout nonexisting] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[Checkout nonexisting] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[Checkout nonexisting] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[Checkout nonexisting] 	at java.lang.Thread.run(Thread.java:748)

Despite showing the error message and the call stack, this error is not recorded and the pipeline script simply proceeds. Adding a try/catch does not work. It seems that no exception is thrown which could be caught in the pipeline script.

This error occurred in a rather complex setup with dynamically set up parallel steps run from a closure loaded with

 

node() {
    load commonBuildScript
}()

So I tried to simplify the pipeline script to track down the issue. Using this simplified script results in:

 

 

[Pipeline] [Checkout nonexisting] checkout
[Checkout nonexisting] Location 'https://server/path/nonexisting' does not exist
[Checkout nonexisting] Checking out a fresh workspace because /var/jenkins/workspace/Test/nonexisting doesn't exist
[Checkout nonexisting] Cleaning local Directory nonexisting
[Checkout nonexisting] Checking out https://server/path/nonexisting at revision '2018-08-10T12:08:15.387 +0200'
[Checkout nonexisting] Found credentials *****
[Checkout nonexisting] ERROR: Failed to check out https://server/path/nonexisting
[Checkout nonexisting] org.tmatesoft.svn.core.SVNException: svn: E170000: URL 'https://server/path/nonexisting' doesn't exist
[Checkout nonexisting] 	at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:70)
[Checkout nonexisting] 	at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:57)
[Checkout nonexisting] 	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgAbstractUpdate.checkout(SvnNgAbstractUpdate.java:852)
[Checkout nonexisting] 	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgCheckout.run(SvnNgCheckout.java:26)
[Checkout nonexisting] 	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgCheckout.run(SvnNgCheckout.java:11)
[Checkout nonexisting] 	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgOperationRunner.run(SvnNgOperationRunner.java:20)
[Checkout nonexisting] 	at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:21)
[Checkout nonexisting] 	at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1239)
[Checkout nonexisting] 	at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)
[Checkout nonexisting] 	at hudson.scm.subversion.CheckoutUpdater$1.perform(CheckoutUpdater.java:121)
[Checkout nonexisting] 	at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:168)
[Checkout nonexisting] 	at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:176)
[Checkout nonexisting] 	at hudson.scm.subversion.UpdateUpdater$TaskImpl.perform(UpdateUpdater.java:134)
[Checkout nonexisting] 	at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:168)
[Checkout nonexisting] 	at hudson.scm.SubversionSCM$CheckOutTask.perform(SubversionSCM.java:1041)
[Checkout nonexisting] 	at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:1017)
[Checkout nonexisting] 	at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:990)
[Checkout nonexisting] 	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2913)
[Checkout nonexisting] 	at hudson.remoting.UserRequest.perform(UserRequest.java:212)
[Checkout nonexisting] 	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
[Checkout nonexisting] 	at hudson.remoting.Request$2.run(Request.java:369)
[Checkout nonexisting] 	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
[Checkout nonexisting] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[Checkout nonexisting] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[Checkout nonexisting] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[Checkout nonexisting] 	at java.lang.Thread.run(Thread.java:748)

As expected, the exception (java.io.IOException) can be caught and handled in the pipeline script.

Even after adding the dynamic generation of the parallel steps the script calls hudson.scm.SubversionSCM$CheckOutTask.invoke() as expected.

I don't understand why is Jenkins calling hudson.scm.SubversionSCM$BuildRevisionMapTask.invoke() in the first place from the original code. The checkout step parameters are exactly the same. The checkout is triggered on the same node. The workspace path is different, of course. But the workspace is empty in both cases.

Any clues?

 

 

 

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

jenkins@mockies.de (JIRA)

unread,
Aug 10, 2018, 7:40:01 AM8/10/18
to jenkinsc...@googlegroups.com
Christoph Vogtländer updated an issue
When trying to checkout from a non existing location there
the pipeline script simply resumes operation without setting the build result to FAILURE.

My checkout step:

 
{code:java}

checkout changelog: false, poll: false, scm: [$class: 'SubversionSCM', additionalCredentials: [[credentialsId: 'id', realm: '<https://server:443> VisualSVN Server']], excludedCommitMessages: '', excludedRegions: '', excludedRevprop: '', excludedUsers: '', filterChangelog: false, ignoreDirPropChanges: false, includedRegions: '', locations: [[cancelProcessOnExternalsFail: true, credentialsId: 'id', depthOption: 'infinity', ignoreExternalsOption: false, local: nonexisting, remote: https://server/path/nonexisting]], workspaceUpdater: [$class: 'UpdateWithRevertUpdater']]
{code}

Running the code will result in:

 
{code:java}
{code}

Despite showing the error message and the call stack, this error is not recorded and the pipeline script simply proceeds. Adding a try/catch does not work. It seems that no exception is thrown which could be caught in the pipeline script.

This error occurred in a rather complex setup with dynamically set up parallel steps run from a closure loaded with

 
{code:java}
node() {
    load commonBuildScript
}()
{code}

So I tried to simplify the pipeline script to track down the issue. Using this simplified script results in:

 

 
{code:java}
{code}

As expected, the exception (java.io.IOException) can be caught and handled in the pipeline script.

Even after adding the dynamic generation of the parallel steps the script calls hudson.scm.SubversionSCM$CheckOutTask.invoke() as expected.

I don't understand why is Jenkins calling hudson.scm.SubversionSCM$BuildRevisionMapTask.invoke() in the first place from the original code. The checkout step parameters are exactly the same. The checkout is triggered on the same node. The workspace path is different, of course. But the workspace is empty in both cases.

Any clues?

 

 

 

kuisathaverat@gmail.com (JIRA)

unread,
Aug 12, 2018, 8:58:02 AM8/12/18
to jenkinsc...@googlegroups.com
Ivan Fernandez Calvo assigned an issue to Unassigned
Change By: Ivan Fernandez Calvo
Assignee: Ivan Fernandez Calvo

andrew.bayer@gmail.com (JIRA)

unread,
Aug 23, 2018, 11:39:01 AM8/23/18
to jenkinsc...@googlegroups.com
Andrew Bayer updated an issue
Change By: Andrew Bayer
Component/s: workflow-scm-step-plugin
Component/s: pipeline
Reply all
Reply to author
Forward
0 new messages