jenkinsci / jenkinsci/subversion-plugin

[JENKINS-52981] Pipeline: success after checkout error

Open
#1,482 0 comments 0 reactions 0 assignees View on GitHub
component:subversion-plugin component:workflow-scm-step-plugin imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
131
Forks
275
Avg merge
12h 4m
Merged PRs (30d)
6

Description

When trying to checkout from a non existing location 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: '//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?

 

 

 

---
Originally reported by gordin, imported from: Pipeline: success after checkout error


  • status: Open
  • priority: Minor
  • component(s): subversion-plugin, workflow-scm-step-plugin
  • resolution: Unresolved
  • votes: 1
  • watchers: 2
  • imported: 20251212-090250

Raw content of original issue

When trying to checkout from a non existing location 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?

 

 

 

environment

```
Jenkins ver. 2.121.2

Windows Server 2012
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.