[JIRA] [p4-plugin] (JENKINS-28213) Force syncing a workspace that does not exist on the filesystem causes a FileNotFoundException

4 views
Skip to first unread message

rpocase@gmail.com (JIRA)

unread,
May 4, 2015, 2:13:01 PM5/4/15
to jenkinsc...@googlegroups.com
Robby Pocase created an issue
 
Jenkins / Bug JENKINS-28213
Force syncing a workspace that does not exist on the filesystem causes a FileNotFoundException
Issue Type: Bug Bug
Assignee: Robby Pocase
Components: p4-plugin
Created: 04/May/15 6:12 PM
Environment: Jenkins: 1.596.2
p4-plugin: 1.2.1
Labels: p4-plugin
Priority: Major Major
Reporter: Robby Pocase

When using the force sync option, a FileNotFound exception occurs if the workspace directory does not already exist on the executor. The forceDelete portion should silently ignore this error.

org.jenkinsci.plugins.workflow.cps.steps.ParallelStepException: Parallel step product1 failed
at org.jenkinsci.plugins.workflow.cps.steps.ParallelStep$ResultHandler$Callback.checkAllDone(ParallelStep.java:153)
at org.jenkinsci.plugins.workflow.cps.steps.ParallelStep$ResultHandler$Callback.onFailure(ParallelStep.java:119)
at org.jenkinsci.plugins.workflow.cps.CpsBodyExecution$FailureAdapter.receive(CpsBodyExecution.java:294)
at com.cloudbees.groovy.cps.impl.ThrowBlock$1.receive(ThrowBlock.java:68)
at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21)
at com.cloudbees.groovy.cps.Next.step(Next.java:58)
at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:145)
at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:164)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:268)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$000(CpsThreadGroup.java:71)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:177)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:175)
at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:47)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:111)
at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: hudson.AbortException: Unable to update workspace: java.io.FileNotFoundException: File does not exist: /home/jenkins/workspace/
at org.jenkinsci.plugins.p4.tasks.CheckoutTask.invoke(CheckoutTask.java:110)
at org.jenkinsci.plugins.p4.tasks.CheckoutTask.invoke(CheckoutTask.java:22)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2677)
at hudson.remoting.UserRequest.perform(UserRequest.java:121)
at hudson.remoting.UserRequest.perform(UserRequest.java:49)
at hudson.remoting.Request$2.run(Request.java:324)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
at ......remote call to rpocase-ubuntu(Native Method)
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1356)
at hudson.remoting.UserResponse.retrieve(UserRequest.java:221)
at hudson.remoting.Channel.call(Channel.java:752)
at hudson.FilePath.act(FilePath.java:970)
at hudson.FilePath.act(FilePath.java:959)
at org.jenkinsci.plugins.p4.PerforceScm.checkout(PerforceScm.java:311)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:106)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:80)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:70)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousStepExecution.start(AbstractSynchronousStepExecution.java:34)
at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:136)
at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:100)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at com.cloudbees.groovy.cps.sandbox.DefaultInvoker.methodCall(DefaultInvoker.java:15)
at WorkflowScript.sync_template(WorkflowScript:24)
at WorkflowScript.run(WorkflowScript:13)
at Unknown.Unknown(Unknown)
at cps.transform(Native Method)
at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:69)
at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:106)
at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:79)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
at com.cloudbees.groovy.cps.impl.CollectionLiteralBlock$ContinuationImpl.dispatch(CollectionLiteralBlock.java:55)
at com.cloudbees.groovy.cps.impl.CollectionLiteralBlock$ContinuationImpl.item(CollectionLiteralBlock.java:45)
at sun.reflect.GeneratedMethodAccessor80.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
at com.cloudbees.groovy.cps.impl.CollectionLiteralBlock$ContinuationImpl.dispatch(CollectionLiteralBlock.java:55)
at com.cloudbees.groovy.cps.impl.CollectionLiteralBlock$ContinuationImpl.item(CollectionLiteralBlock.java:45)
at sun.reflect.GeneratedMethodAccessor80.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
... 17 more

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

rpocase@gmail.com (JIRA)

unread,
May 5, 2015, 8:36:04 AM5/5/15
to jenkinsc...@googlegroups.com

rpocase@gmail.com (JIRA)

unread,
May 5, 2015, 8:39:01 AM5/5/15
to jenkinsc...@googlegroups.com

rpocase@gmail.com (JIRA)

unread,
May 5, 2015, 4:40:01 PM5/5/15
to jenkinsc...@googlegroups.com
Robby Pocase started work on Bug JENKINS-28213
 
Change By: Robby Pocase
Status: Open In Progress

rpocase@gmail.com (JIRA)

unread,
May 5, 2015, 4:40:01 PM5/5/15
to jenkinsc...@googlegroups.com
Robby Pocase resolved as Fixed
 

Resolved in: https://github.com/jenkinsci/p4-plugin/pull/11. Just needs to be merged

Change By: Robby Pocase
Status: In Progress Resolved
Resolution: Fixed

pallen@perforce.com (JIRA)

unread,
May 11, 2015, 9:27:01 AM5/11/15
to jenkinsc...@googlegroups.com
Paul Allen commented on Bug JENKINS-28213
 
Re: Force syncing a workspace that does not exist on the filesystem causes a FileNotFoundException

Sorry for the delay I have been out on holiday.

At first glance there seems to be a few bits of noise and other non specific changes. To help me review the change faster could you please summarise the change or help reduce the noise. For example, there were a few method name changes / import formatting and other refactoring. If it helps I use Eclipse with the default java formatting.

Thanks,
Paul

rpocase@gmail.com (JIRA)

unread,
May 11, 2015, 9:34:01 AM5/11/15
to jenkinsc...@googlegroups.com

Sure thing. The main change that needs to be viewed is a new function "silentlyForceDelete". This deletes the supplied workspace and ignores any FileNotFoundExceptions. All other changes in ClientHelper.java was general refactoring to improve readability. There was an extra commit that fixes some deprecation warnings (this wasn't intended to go in the pull request, but should be safe to pull in). Just let me know if you need any more details.

rpocase@gmail.com (JIRA)

unread,
May 11, 2015, 11:14:04 AM5/11/15
to jenkinsc...@googlegroups.com
Robby Pocase edited a comment on Bug JENKINS-28213
Sure thing. The main change that needs to be viewed is a new function "silentlyForceDelete". This deletes the supplied workspace and ignores any FileNotFoundExceptions. All other changes in ClientHelper.java was general refactoring to improve readability. There was an extra commit that fixes some deprecation warnings (this wasn't intended to go in the pull request, but should be safe to pull in). Just let me know if you need any more details.


Edit: Note - adding this comment to github so its traceable from the pull request

scm_issue_link@java.net (JIRA)

unread,
May 12, 2015, 5:22:01 AM5/12/15
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: Paul Allen
Path:
src/main/java/org/jenkinsci/plugins/p4/client/ClientHelper.java
src/main/java/org/jenkinsci/plugins/p4/credentials/P4Credentials.java
src/main/java/org/jenkinsci/plugins/p4/workspace/Workspace.java
http://jenkins-ci.org/commit/p4-plugin/939279eb79f7f48a8a7dbb70f6b9d5288d2d86ff
Log:
Merge pull request #11 from rpocase/master

JENKINS-28213 Force syncing a workspace that does not exist on the filesystem causes a FileNotFoundException

Compare: https://github.com/jenkinsci/p4-plugin/compare/f830dd453a2e...939279eb79f7

pallen@perforce.com (JIRA)

unread,
May 6, 2016, 8:52:05 AM5/6/16
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages