[JIRA] [git-plugin] (JENKINS-31456) Git 'Clean before checkout' step fails on Windows nodes

20 zobrazení
Preskočiť na prvú neprečítanú správu

tal+jenkins-ci.org@cloudshare.com (JIRA)

neprečítané,
9. 11. 2015, 6:35:019. 11. 2015
komu: jenkinsc...@googlegroups.com
Tal Auslander created an issue
 
Jenkins / Bug JENKINS-31456
Git 'Clean before checkout' step fails on Windows nodes
Issue Type: Bug Bug
Assignee: Mark Waite
Components: git-plugin
Created: 09/Nov/15 11:34 AM
Priority: Major Major
Reporter: Tal Auslander

When running a job on a Windows node with 'Clean before checkout' action in the Git step, I'm getting the following error:

GitHub pull request #6 of commit ..., no merge conflicts.
Setting status of ... to PENDING with url http://.../job/build-web-ui/149/ and message: 'Build started sha1 is merged.'
Building remotely on Win Slave (windows) in workspace C:\Jenkins\workspace\build-web-ui
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url https://github.com/.../....git # timeout=10
Cleaning workspace
 > git rev-parse --verify HEAD # timeout=10
Resetting working tree
 > git reset --hard # timeout=10
 > git clean -fdx # timeout=10
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from https://github.com/talcloudshare/cloudshare.git
	at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:763)
	at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1012)
	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1043)
	at hudson.scm.SCM.checkout(SCM.java:485)
	at hudson.model.AbstractProject.checkout(AbstractProject.java:1276)
	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610)
	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532)
	at hudson.model.Run.execute(Run.java:1741)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:98)
	at hudson.model.Executor.run(Executor.java:410)
Caused by: hudson.plugins.git.GitException: Command "git clean -fdx" returned status code 1:
stdout: 
stderr: 
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1640)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1616)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1612)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1254)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1266)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.clean(CliGitAPIImpl.java:621)
	at hudson.plugins.git.GitAPI.clean(GitAPI.java:311)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:608)
	at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:583)
	at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:542)
	at hudson.remoting.UserRequest.perform(UserRequest.java:121)
	at hudson.remoting.UserRequest.perform(UserRequest.java:49)
	at hudson.remoting.Request$2.run(Request.java:326)
	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at hudson.remoting.Engine$1$1.run(Engine.java:69)
	at java.lang.Thread.run(Unknown Source)
	at ......remote call to Win Slave(Native Method)
	at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1413)
	at hudson.remoting.UserResponse.retrieve(UserRequest.java:221)
	at hudson.remoting.Channel.call(Channel.java:778)
	at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:250)
	at com.sun.proxy.$Proxy53.clean(Unknown Source)
	at org.jenkinsci.plugins.gitclient.RemoteGitImpl.clean(RemoteGitImpl.java:444)
	at hudson.plugins.git.extensions.impl.CleanBeforeCheckout.decorateFetchCommand(CleanBeforeCheckout.java:32)
	at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:759)
	... 11 more
ERROR: null
Setting status of dabdaaf6268d12217ca805983b880f3bba2e17d2 to FAILURE with url http://.../job/build-web-ui/149/ and message: 'Build finished. No test results found.'
Finished: FAILURE

The path is shorter than 255 characters, and no file is in use within the directory. Running the 'git clean -fdx' command manually from cmd works properly.

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

tal+jenkins-ci.org@cloudshare.com (JIRA)

neprečítané,
9. 11. 2015, 6:35:029. 11. 2015
komu: jenkinsc...@googlegroups.com
Tal Auslander updated an issue
Change By: Tal Auslander
When running a job on a Windows node with 'Clean before checkout' action in the Git step, I'm getting the following error:

{code:java}

GitHub pull request #6 of commit ..., no merge conflicts.
Setting status of ... to PENDING with url http://.../job/build-web-ui/149/ and message: 'Build started sha1 is merged.'
Building remotely on Win Slave (windows) in workspace C:\Jenkins\workspace\build-web-ui
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url https://github.com/.../....git # timeout=10
Cleaning workspace
 > git rev-parse --verify HEAD # timeout=10
Resetting working tree
 > git reset --hard # timeout=10
 > git clean -fdx # timeout=10
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from https://github.com/ talcloudshare ... / cloudshare . ... git
{code}


The path is shorter than 255 characters, and no file is in use within the directory. Running the 'git clean -fdx' command manually from cmd works properly.

tal+jenkins-ci.org@cloudshare.com (JIRA)

neprečítané,
9. 11. 2015, 7:33:039. 11. 2015
komu: jenkinsc...@googlegroups.com
Tal Auslander updated an issue
When running a job on a Windows node with 'Clean before checkout' action in the Git step, I'm getting the following error:

{code:java}
GitHub pull request #6 of commit ..., no merge conflicts.
Setting status of ... to PENDING with url http://.../job/build-web-ui/149/ and message: 'Build started sha1 is merged.'
Building remotely on Win Slave (windows) in workspace C:\Jenkins\workspace\build-web-ui
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url https://github.com/.../....git # timeout=10
Cleaning workspace
 > git rev-parse --verify HEAD # timeout=10
Resetting working tree
 > git reset --hard # timeout=10
 > git clean -fdx # timeout=10
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from https://github.com/.../....git


Edit: The errorlevel on "git clean -fdx" is indeed 1, not sure why... The command works though

tal+jenkins-ci.org@cloudshare.com (JIRA)

neprečítané,
9. 11. 2015, 8:25:039. 11. 2015
komu: jenkinsc...@googlegroups.com
Tal Auslander commented on Bug JENKINS-31456
 
Re: Git 'Clean before checkout' step fails on Windows nodes

As I get the feeling this is a Git-related bug, I opened an issue on git-for-windows/git repo: https://github.com/git-for-windows/git/issues/521

mark.earl.waite@gmail.com (JIRA)

neprečítané,
9. 11. 2015, 13:21:029. 11. 2015
komu: jenkinsc...@googlegroups.com
Mark Waite assigned an issue to Unassigned
 
Change By: Mark Waite
Assignee: Mark Waite

mark.earl.waite@gmail.com (JIRA)

neprečítané,
10. 11. 2015, 20:36:0210. 11. 2015
komu: jenkinsc...@googlegroups.com
Mark Waite commented on Bug JENKINS-31456
 
Re: Git 'Clean before checkout' step fails on Windows nodes

I suspect there is nothing the git project can do about it. Windows refuses to delete files which are open, and many different applications (virus scanners, malware detectors, other file system connected programs) can leave files open while git rapidly traverses the file system to remove files.

The git client plugin 1.19.1 is slated to include a silent, single retry of git clean on Windows, in case an immediate second attempt is successful. I don't hold much hope for that either, but it is an attempt and is nearly harmless to the plugin to attempt a second clean if the first throws an exception.

pjdarton@gmail.com (JIRA)

neprečítané,
26. 3. 2018, 6:09:0226. 3. 2018
komu: jenkinsc...@googlegroups.com
pjdarton commented on Bug JENKINS-31456

If you can use Jenkins to delete the files instead of the git client then it should "just work".
Since JENKINS-15331 was implemented, Jenkins is able to reliably^1^ delete files on Windows machines.

Note 1: As reliably as you can do anything on Windows. If a rogue process has locked a file open then it'll consistently fail.

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

mark.earl.waite@gmail.com (JIRA)

neprečítané,
26. 3. 2018, 12:41:0326. 3. 2018
komu: jenkinsc...@googlegroups.com
Mark Waite resolved as Not A Defect
 

Problem is outside the scope of the Jenkins git plugin and outside the scope of the Jenkins git client plugin. Windows file system won't delete files that are busy. The plugins work very hard to not leave files busy (close files as soon as possible, etc.). In this case, it appears to be either a command line git change that is needed, or a Windows file system semantic change. Both are outside the plugin scope.

Change By: Mark Waite
Status: Open Resolved
Resolution: Not A Defect

mark.earl.waite@gmail.com (JIRA)

neprečítané,
22. 10. 2019, 21:32:1822. 10. 2019
komu: jenkinsc...@googlegroups.com
Mark Waite closed an issue as Not A Defect
Change By: Mark Waite
Status: Resolved Closed
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Odpovedať všetkým
Odpovedať autorovi
Poslať ďalej
0 nových správ