[JIRA] (JENKINS-18834) prune should be before fetch

2019-11-01 Thread mark.earl.wa...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Mark Waite edited a comment on  JENKINS-18834  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: prune should be before fetch   
 

  
 
 
 
 

 
 [~etoews] that surprises me, since the {{--prune}} argument is added to the {{git fetch}} command which is used to fetch the latest updates from the remote repository.Since the command in the output you provided does not include the {{ \ --prune}} argument, that must indicate that the initial fetch is not honoring the prune argument.  There are (unfortunately) two calls to {{git fetch}} when the git plugin retrieves changes from the remote repository.  The second fetch is likely the one that would include the {{ \ --prune}} argument.  A future optimization will be needed to remove that extra call to {{git fetch}} or a specific fix for this bug to cause that initial fetch to include the {{--prune}} argument.You might also try adding the "Honor refspecs in initial clone" option that is available in the "Advanced clone options".  It might have a side-effect of including the {{--prune}} argument in the first fetch of the repository.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.150184.1374212631000.6980.1572624241074%40Atlassian.JIRA.


[JIRA] (JENKINS-18834) prune should be before fetch

2019-11-01 Thread mark.earl.wa...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Mark Waite edited a comment on  JENKINS-18834  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: prune should be before fetch   
 

  
 
 
 
 

 
 [~etoews] that surprises me, since the {{--prune}} argument is added to the {{git fetch}} command which is used to fetch the latest updates from the remote repository.Since the command in the output you provided does not include the {{\--prune}} argument, that must indicate that the initial fetch is not honoring the prune argument.  There are (unfortunately) two calls to {{git fetch}} when the git plugin retrieves changes from the remote repository.  The second fetch is likely the one that would include the {{\--prune}} argument.A future optimization will be needed to remove that extra call to {{git fetch}} or a specific fix for this bug to cause that initial fetch to include the {{\--prune}} argument.You might also try adding the "Honor refspecs in initial clone" option that is available in the "Advanced clone options".  It might have a side-effect of including the {{\--prune}} argument in the first fetch of the repository.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.150184.1374212631000.6991.1572624241394%40Atlassian.JIRA.


[JIRA] (JENKINS-18834) prune should be before fetch

2019-11-01 Thread mark.earl.wa...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Mark Waite edited a comment on  JENKINS-18834  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: prune should be before fetch   
 

  
 
 
 
 

 
 [~etoews] that surprises me, since the {{--prune}} argument is added to the {{git fetch}} command which is used to fetch the latest updates from the remote repository.Since the command in the output you provided does not include the {{\--prune}} argument, that must indicate that the initial fetch is not honoring the prune argument.  There are (unfortunately) two calls to {{git fetch}} when the git plugin retrieves changes from the remote repository.  The second fetch is likely the one that would include the {{\--prune}} argument.  A future optimization will be needed to remove that extra call to {{git fetch}} or a specific fix for this bug to cause that initial fetch to include the {{ \ --prune}} argument.You might also try adding the "Honor refspecs in initial clone" option that is available in the "Advanced clone options".  It might have a side-effect of including the {{ \ --prune}} argument in the first fetch of the repository.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.150184.1374212631000.6989.1572624241304%40Atlassian.JIRA.


[JIRA] (JENKINS-18834) prune should be before fetch

2019-11-01 Thread mark.earl.wa...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Mark Waite commented on  JENKINS-18834  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: prune should be before fetch   
 

  
 
 
 
 

 
 Everett Toews that surprises me, since the --prune argument is added to the git fetch command which is used to fetch the latest updates from the remote repository. Since the command in the output you provided does not include the -prune argument, that must indicate that the initial fetch is not honoring the prune argument. There are (unfortunately) two calls to git fetch when the git plugin retrieves changes from the remote repository. The second fetch is likely the one that would include the -prune argument.  A future optimization will be needed to remove that extra call to git fetch or a specific fix for this bug to cause that initial fetch to include the --prune argument. You might also try adding the "Honor refspecs in initial clone" option that is available in the "Advanced clone options". It might have a side-effect of including the --prune argument in the first fetch of the repository.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.150184.1374212631000.6964.1572624180308%40Atlassian.JIRA.


[JIRA] (JENKINS-18834) prune should be before fetch

2019-10-31 Thread everett.to...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Everett Toews commented on  JENKINS-18834  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: prune should be before fetch   
 

  
 
 
 
 

 
   Can confirm this is still an issue. If the git remote prune was performed before the fetch, this wouldn't be a problem. Following the same steps as packadal, I get this error in the console. 

 

OpenShift Build my-project/deploy-my-service-1786 from ssh://g...@bitbucket.example.com:7999/ui/my-service.git
Checking out git ssh://g...@bitbucket.example.com:7999/ui/my-service.git into /var/lib/jenkins/jobs/my-project/jobs/my-project-deploy-my-service/workspace@script to read Jenkinsfile
using credential my-project-bitbucket-jenkins-user
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url ssh://g...@bitbucket.example.com:7999/ui/my-service.git # timeout=10
Fetching upstream changes from ssh://g...@bitbucket.example.com:7999/ui/my-service.git
 > git --version # timeout=10
using GIT_SSH to set credentials my-project-bitbucket-jenkins-user
 > git fetch --tags --progress ssh://g...@bitbucket.example.com:7999/ui/my-service.git +refs/heads/*:refs/remotes/origin/*
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from ssh://g...@bitbucket.example.com:7999/ui/my-service.git
	at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:894)
	at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1161)
	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1192)
	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:120)
	at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:144)
	at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:67)
	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:293)
	at hudson.model.ResourceController.execute(ResourceController.java:97)
	at hudson.model.Executor.run(Executor.java:429)
Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress ssh://g...@bitbucket.example.com:7999/ui/my-service.git +refs/heads/*:refs/remotes/origin/*" returned status code 1:
stdout: 
stderr: From ssh://bitbucket.example.com:7999/ui/my-service
 * [new branch]  automation/testpi-9 -> origin/automation/testpi-9
error: 'refs/remotes/origin/feature/foo' exists; cannot create 'refs/remotes/origin/feature/foo/bar'
 ! [new branch]  feature/foo/bar -> origin/feature/foo/bar  (unable to update local ref)
error: some local refs could not be updated; try running
 'git remote prune ssh://g...@bitbucket.example.com:7999/ui/my-service.git' to remove any old, conflicting branches	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2042)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1761)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$400(CliGitAPIImpl.java:72)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:442)
	at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:892)
	... 8 more
ERROR: Error fetching remote repo 'origin'
ERROR: Maximum checkout retry attempts reached, aborting
Finished: FAILURE
 

    
 

  
 

[JIRA] (JENKINS-18834) prune should be before fetch

2019-10-31 Thread everett.to...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Everett Toews edited a comment on  JENKINS-18834  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: prune should be before fetch   
 

  
 
 
 
 

 
   Can confirm this is still an issue. If the git remote prune was performed before the fetch, this wouldn't be a problem.Following the same steps as [~packadal], I get this error in the console.{code:java}OpenShift Build my-project/deploy-my-service-1786 from ssh://g...@bitbucket.example.com:7999/ui/my-service.gitChecking out git ssh://g...@bitbucket.example.com:7999/ui/my-service.git into /var/lib/jenkins/jobs/my-project/jobs/my-project-deploy-my-service/workspace@script to read Jenkinsfileusing credential my-project-bitbucket-jenkins-user > git rev-parse --is-inside-work-tree # timeout=10Fetching changes from the remote Git repository > git config remote.origin.url ssh://g...@bitbucket.example.com:7999/ui/my-service.git # timeout=10Fetching upstream changes from ssh://g...@bitbucket.example.com:7999/ui/my-service.git > git --version # timeout=10using GIT_SSH to set credentials my-project-bitbucket-jenkins-user > git fetch --tags --progress ssh://g...@bitbucket.example.com:7999/ui/my-service.git +refs/heads/*:refs/remotes/origin/*ERROR: Error fetching remote repo 'origin'hudson.plugins.git.GitException: Failed to fetch from ssh://g...@bitbucket.example.com:7999/ui/my-service.git at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:894) at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1161) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1192) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:120) at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:144) at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:67) at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:293) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429)Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress ssh://g...@bitbucket.example.com:7999/ui/my-service.git +refs/heads/*:refs/remotes/origin/*" returned status code 1:stdout: stderr: From ssh://bitbucket.example.com:7999/ui/my-service * [new branch]  automation/testpi-9 -> origin/automation/testpi-9error: 'refs/remotes/origin/feature/foo' exists; cannot create 'refs/remotes/origin/feature/foo/bar' ! [new branch]  feature/foo/bar -> origin/feature/foo/bar  (unable to update local ref)error: some local refs could not be updated; try running 'git remote prune ssh://g...@bitbucket.example.com:7999/ui/my-service.git' to remove any old, conflicting branches at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2042) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1761) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$400(CliGitAPIImpl.java:72) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:442) at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:892) ... 8 moreERROR: Error fetching remote repo 'origin'ERROR: Maximum checkout retry attempts reached, abortingFinished: FAILURE{code}   
 

  
 
 
 
 

 
 
 

[JIRA] (JENKINS-18834) prune should be before fetch

2019-04-24 Thread nicolas.del...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Nicolas De Loof assigned an issue to Unassigned  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-18834  
 
 
  prune should be before fetch   
 

  
 
 
 
 

 
Change By: 
 Nicolas De Loof  
 
 
Assignee: 
 Nicolas De Loof  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.