[JIRA] (JENKINS-45997) BitBucket PRs failing to checkout on initial run after PR updated with new commits

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


 
 
 
 

 
 
 

 
   
 Mark Waite commented on  JENKINS-45997  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: BitBucket PRs failing to checkout on initial run after PR updated with new commits   
 

  
 
 
 
 

 
 Joerg Schwaerzler it is usually much less effective to request help by updating an existing closed bug report than to ask for help on the mailing lists or in the chat channels. There are far fewer people watching updates to Jenkins bug reports than watch the mailing lists and the chat channels. In your case, the messages may indicate that a cache repository on the Jenkins master has been damaged or left in an inconsistent state. You may want to look in the $JENKINS_HOME/caches directory to find the directory which is used as the cache for that job. One technique I've used has been to: 

 

$ cd $JENKINS_HOME/caches
$ for repo in *; do (cd $repo && echo  $repo && git remote -v | grep fetch); done
 

 That will list the remote repository for each of those cache directories. Remove the directory for the remote repository that is having that problem. The next use of the cache will clone that repository and may be enough to resolve the issue.  
 

  
 
 
 
 

 
 
 

 
 
 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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.184221.1501858755000.4630.1562600701021%40Atlassian.JIRA.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-45997) BitBucket PRs failing to checkout on initial run after PR updated with new commits

2019-07-08 Thread joerg.schwaerz...@infineon.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Joerg Schwaerzler edited a comment on  JENKINS-45997  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: BitBucket PRs failing to checkout on initial run after PR updated with new commits   
 

  
 
 
 
 

 
 Not sure whether this is the same issue. But this is the closet ticket I could find.For us Bitbucket + Branch Source plugin was working just find - until today. Now for one of our repositories I cannot convince Jenkins to clone the repository correctly ritght after a PR was updated or created.Now we always would have to re-trigger each PR build manually in order to get it running. Once triggered automatically the builds won't work (see below).Furthermore - *other, unrelated jobs* which are trying to clone the repository at the very same point in time when the PR is updated and which are not even trying to check out the pull request revision but master (of the same repository) - *happen to fail with the very same error messages*!Not sure whether this would be an issue in Bitbucket or in Jenkins git plugin or Bitbucket branch source plugin. Maybe somebody can comment.The error message is either:{code}Cloning the remote Git repositoryCloning with configured refspecs honoured and without tagsERROR: Error cloning remote repo 'origin'hudson.plugins.git.GitException: Command "git fetch --no-tags --progress https://*** +refs/pull-requests/66/from:refs/remotes/origin/PR-66" returned status code 128:stdout: stderr: fatal: Couldn't find remote ref refs/pull-requests/66/from{code}or something like (using a slightly different refspec):{code}git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/* +refs/pull-requests/*/merge:refs/remotes/origin/PR-*" returned status code 128:stdout: stderr: error: refs/pull-requests/66/from does not point to a valid object!error: Could not read 7a99185626f667ab8c34d502417c47e99778e633error: Could not read 7a99185626f667ab8c34d502417c47e99778e633remote: error: Could not read 7a99185626f667ab8c34d502417c47e99778e633remote: fatal: revision walk setup failederror: git upload-pack: git-pack-objects died with error.fatal: git upload-pack: aborting due to possible repository corruption on the remote side.remote: aborting due to possible repository corruption on the remote side.fatal: protocol error: bad pack header{code} Curiously the Jenkins can be cloned. However later when it comes to the `checkout scm` resp, git step it won't work.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

   

[JIRA] (JENKINS-45997) BitBucket PRs failing to checkout on initial run after PR updated with new commits

2019-07-08 Thread joerg.schwaerz...@infineon.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Joerg Schwaerzler commented on  JENKINS-45997  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: BitBucket PRs failing to checkout on initial run after PR updated with new commits   
 

  
 
 
 
 

 
 Not sure whether this is the same issue. But this is the closet ticket I could find. For us Bitbucket + Branch Source plugin was working just find - until today. Now for one of our repositories I cannot convince Jenkins to clone the repository correctly ritght after a PR was updated or created. Now we always would have to re-trigger each PR build manually in order to get it running. Once triggered automatically the builds won't work (see below). Furthermore - other, unrelated jobs which are trying to clone the repository at the very same point in time when the PR is updated and which are not even trying to check out the pull request revision but master (of the same repository) - happen to fail with the very same error messages! Not sure whether this would be an issue in Bitbucket or in Jenkins git plugin or Bitbucket branch source plugin. Maybe somebody can comment. The error message is either: 

 

Cloning the remote Git repository
Cloning with configured refspecs honoured and without tags
ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Command "git fetch --no-tags --progress https://*** +refs/pull-requests/66/from:refs/remotes/origin/PR-66" returned status code 128:
stdout: 
stderr: fatal: Couldn't find remote ref refs/pull-requests/66/from
 

 or something like (using a slightly different refspec): 

 

git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/* +refs/pull-requests/*/merge:refs/remotes/origin/PR-*" returned status code 128:
stdout: 
stderr: error: refs/pull-requests/66/from does not point to a valid object!
error: Could not read 7a99185626f667ab8c34d502417c47e99778e633
error: Could not read 7a99185626f667ab8c34d502417c47e99778e633
remote: error: Could not read 7a99185626f667ab8c34d502417c47e99778e633
remote: fatal: revision walk setup failed
error: git upload-pack: git-pack-objects died with error.
fatal: git upload-pack: aborting due to possible repository corruption on the remote side.
remote: aborting due to possible repository corruption on the remote side.
fatal: protocol error: bad pack header
 

  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
  

[JIRA] (JENKINS-45997) BitBucket PRs failing to checkout on initial run after PR updated with new commits

2019-01-29 Thread damyan.yorda...@itk-engineering.de (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Damyan Yordanov commented on  JENKINS-45997  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: BitBucket PRs failing to checkout on initial run after PR updated with new commits   
 

  
 
 
 
 

 
 Confirmation: when the "call can merge" is not set, an error message "reference is not a tree" occurrs, when trying to build a PR. Setting the option seems to fix the issue on our internal Bitbucket Server. Thank you!  
 

  
 
 
 
 

 
 
 

 
 
 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.


[JIRA] (JENKINS-45997) BitBucket PRs failing to checkout on initial run after PR updated with new commits

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


 
 
 
 

 
 
 

 
   
 Mark Waite commented on  JENKINS-45997  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: BitBucket PRs failing to checkout on initial run after PR updated with new commits   
 

  
 
 
 
 

 
 It seems that the "Call can merge" selection is only available for Bitbucket Server connections, not for connections to Bitbucket.org. I assume that is because it is not needed when connecting to Bitbucket.org. I was unable to duplicate this bug report with Bitbucket.org.  
 

  
 
 
 
 

 
 
 

 
 
 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.


[JIRA] (JENKINS-45997) BitBucket PRs failing to checkout on initial run after PR updated with new commits

2018-04-23 Thread d...@jakobjarosch.de (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Jakob Jarosch commented on  JENKINS-45997  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: BitBucket PRs failing to checkout on initial run after PR updated with new commits   
 

  
 
 
 
 

 
 What is currently blocking the pull request from being merged?  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
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.


[JIRA] (JENKINS-45997) BitBucket PRs failing to checkout on initial run after PR updated with new commits

2018-04-16 Thread i...@soar.name (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Aleksey Smyrnov commented on  JENKINS-45997  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: BitBucket PRs failing to checkout on initial run after PR updated with new commits   
 

  
 
 
 
 

 
 I've faced same problem today - but with GitHub and it's Pull Requests: 

 

Pull request #339 updated
16:23:22 Connecting to https://api.github.com using botaccount/** (botaccount-github-userpass)
Checking out git g...@github.com:team/project.git into /var/jenkins_home/workspace/team_unilanding_PR-339-QD7W5G5UCQBK3XJQYNPM6GQDRVGPY6TQABV6SD4RWHXU2EDQR65A@script to read Jenkinsfile
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url g...@github.com:team/project.git # timeout=10
Fetching without tags
Fetching upstream changes from g...@github.com:team/project.git
 > git --version # timeout=10
using GIT_SSH to set credentials botaccount-github-ssh-key
 > git fetch --no-tags --progress g...@github.com:team/project.git +refs/pull/339/head:refs/remotes/origin/PR-339 +refs/heads/master:refs/remotes/origin/master
Merging remotes/origin/master commit bb79fa5bd122fa0fac4608d10a9ccd41dc2e72f7 into PR head commit dc38ea253251ca79a4587c20b25b425ede135de7
 > git config core.sparsecheckout # timeout=10
 > git checkout -f dc38ea253251ca79a4587c20b25b425ede135de7

GitHub has been notified of this commit’s build result

hudson.plugins.git.GitException: Command "git checkout -f dc38ea253251ca79a4587c20b25b425ede135de7" returned status code 128:
stdout:
stderr: fatal: reference is not a tree: dc38ea253251ca79a4587c20b25b425ede135de7

    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1996)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$800(CliGitAPIImpl.java:72)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:2295)
Caused: hudson.plugins.git.GitException: Could not checkout dc38ea253251ca79a4587c20b25b425ede135de7
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:2319)
    at jenkins.plugins.git.MergeWithGitSCMExtension.checkout(MergeWithGitSCMExtension.java:146)
    at jenkins.plugins.git.MergeWithGitSCMExtension.decorateRevisionToBuild(MergeWithGitSCMExtension.java:112)
    at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:1068)
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1161)
    at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:113)
    at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:143)
    at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:120)
    at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:295)
    at hudson.model.ResourceController.execute(ResourceController.java:97)
    at hudson.model.Executor.run(Executor.java:429)
Finished: FAILURE
 

   Only closing old PR and re-creating it can solve this problem. Need this fix for GitHub.  
 

  
 
 
 
 

 
 

[JIRA] (JENKINS-45997) BitBucket PRs failing to checkout on initial run after PR updated with new commits

2018-03-17 Thread patr...@tario.org (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Patrick Ruckstuhl commented on  JENKINS-45997  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: BitBucket PRs failing to checkout on initial run after PR updated with new commits   
 

  
 
 
 
 

 
 Created https://github.com/jenkinsci/bitbucket-branch-source-plugin/pull/116 with exactly this  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
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.


[JIRA] (JENKINS-45997) BitBucket PRs failing to checkout on initial run after PR updated with new commits

2018-03-14 Thread nickbr...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Nicholas Brown commented on  JENKINS-45997  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: BitBucket PRs failing to checkout on initial run after PR updated with new commits   
 

  
 
 
 
 

 
 I think Justin Wojciechowski solution of having the Bitbucket Branch Source Plugin hit the CanMerge Rest API, to force the branch creations, is a good one. It need not even be a configuration option, Bitbucket Branch Source Plugin should simply do this every time it discovers PRs. In a some older Jenkins jobs I had, not making use of Bitbucket Branch Source Plugin, I had the same issue and used this horrid work around: 

 
# Nasty hack to force Stash to generate the /merge branch for the PR
set +x
curl -u ${STASH_USER}:${STASH_PASSWORD} ${STASH_URL}/rest/api/1.0/projects/${destinationRepositoryOwner}/repos/${destinationRepositoryName}/pull-requests/${pullRequestId}/diff > /dev/null
 

  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
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.