[JIRA] [git-plugin] (JENKINS-34369) NPE on PreBuildMerge.decorateRevisionToBuild

2016-05-20 Thread ifernandezca...@cloudbees.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Ivan Fernandez Calvo commented on  JENKINS-34369 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: NPE on PreBuildMerge.decorateRevisionToBuild  
 
 
 
 
 
 
 
 
 
 
The pull request to resolve it is pending to approval 
https://github.com/jenkinsci/git-plugin/pull/394 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

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





-- 
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] [git-plugin] (JENKINS-34369) NPE on PreBuildMerge.decorateRevisionToBuild

2016-05-20 Thread ja...@mccarthy.vg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jamie McCarthy commented on  JENKINS-34369 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: NPE on PreBuildMerge.decorateRevisionToBuild  
 
 
 
 
 
 
 
 
 
 
I'm seeing what seems to be the same issue, though if it's because of a merge conflict I can't see how. I've confirmed that the branches specified in the configuration ("Branch specifier" and "Branch to merge to") don't have any conflicts, making sure that the revision SHA of the former is what I expect it to be. 
My attempts are with mergeStrategy='default' and with fastForwardMode either '-

ff' or '
-no-ff'. Adding the behavior of "Wipe out repository & force clone" didn't help. 
Jenkins 1.656, git 2.4.1, git-client 1.19.6, github 1.19.1 

 
git rev-parse origin/source_branch^{commit} # timeout=10
Merging Revision e9093107657cca2d27065f28ec39eec0edb94d51 (origin/source_branch) to origin/dest_branch, UserMergeOptions{mergeRemote='origin', mergeTarget='dest_branch', mergeStrategy='default', fastForwardMode='--ff'}
git rev-parse origin/dest_branch^{commit} # timeout=10
git config core.sparsecheckout # timeout=10
git checkout -f origin/dest_branch
git merge --ff e9093107657cca2d27065f28ec39eec0edb94d51 # timeout=10
git config core.sparsecheckout # timeout=10
git checkout -f e9093107657cca2d27065f28ec39eec0edb94d51
FATAL: null
java.lang.NullPointerException
	at hudson.plugins.git.extensions.impl.PreBuildMerge.decorateRevisionToBuild(PreBuildMerge.java:88)
	at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:965)
 

 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

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





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

[JIRA] [git-plugin] (JENKINS-34369) NPE on PreBuildMerge.decorateRevisionToBuild

2016-05-17 Thread russell.gal...@gmail.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Russell Gallop commented on  JENKINS-34369 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: NPE on PreBuildMerge.decorateRevisionToBuild  
 
 
 
 
 
 
 
 
 
 
I have seen this issue when using the git plugin to merge branches. Git needs to hit a merge conflict (or other error in merging maybe) to hit this problem. 
Without the pull request (git plugin 2.4.4) 

 

 > git.exe merge --ff 4f7fc6bad3bc7778104b92950bfc1b3f5e1d3d9d # timeout=10
 > git.exe config core.sparsecheckout # timeout=10
 > git.exe checkout -f 4f7fc6bad3bc7778104b92950bfc1b3f5e1d3d9d
FATAL: null
java.lang.NullPointerException
	at hudson.plugins.git.extensions.impl.PreBuildMerge.decorateRevisionToBuild(PreBuildMerge.java:88)
 

 
With the pull request applied on top of ce5479a42e74b45dd8b954776ad4220c9c0151bc the problem is reported better. 

 

 > git.exe merge --ff 4f7fc6bad3bc7778104b92950bfc1b3f5e1d3d9d # timeout=10
 > git.exe config core.sparsecheckout # timeout=10
 > git.exe checkout -f 4f7fc6bad3bc7778104b92950bfc1b3f5e1d3d9d
ERROR: Branch not suitable for integration as it does not merge cleanly: Could not merge AnyObjectId[4f7fc6bad3bc7778104b92950bfc1b3f5e1d3d9d]
 

 
I think this should have a test case though. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

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





-- 
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] [git-plugin] (JENKINS-34369) NPE on PreBuildMerge.decorateRevisionToBuild

2016-04-21 Thread ifernandezca...@cloudbees.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Ivan Fernandez Calvo commented on  JENKINS-34369 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: NPE on PreBuildMerge.decorateRevisionToBuild  
 
 
 
 
 
 
 
 
 
 
Method GitSCM.getBuildData could return null 

 

public @CheckForNull BuildData getBuildData(Run build) { 
 

 
but in PreBuildMerge.decorateRevisionToBuild does not check if a null is returned 

 

public Revision decorateRevisionToBuild(GitSCM scm, Run build, GitClient git, TaskListener listener, Revision marked, Revision rev) throws IOException, InterruptedException {
...
scm.getBuildData(build).saveBuild(new Build(marked,rev, build.getNumber(), FAILURE));

throw new AbortException("Branch not suitable for integration as it does not merge cleanly: " + ex.getMessage());
...
 

 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

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





-- 
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] [git-plugin] (JENKINS-34369) NPE on PreBuildMerge.decorateRevisionToBuild

2016-04-21 Thread ifernandezca...@cloudbees.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Ivan Fernandez Calvo started work on  JENKINS-34369 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 

Change By:
 
 Ivan Fernandez Calvo 
 
 
 

Status:
 
 Open In Progress 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

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





-- 
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] [git-plugin] (JENKINS-34369) NPE on PreBuildMerge.decorateRevisionToBuild

2016-04-21 Thread ifernandezca...@cloudbees.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Ivan Fernandez Calvo commented on  JENKINS-34369 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: NPE on PreBuildMerge.decorateRevisionToBuild  
 
 
 
 
 
 
 
 
 
 
I will make a pull request 

 

BuildData bd = scm.getBuildData(build);
if(bd != null){
bd.saveBuild(new Build(marked,rev, build.getNumber(), FAILURE));
}
throw new AbortException("Branch not suitable for integration as it does not merge cleanly: " + ex.getMessage());
 

 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

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





-- 
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] [git-plugin] (JENKINS-34369) NPE on PreBuildMerge.decorateRevisionToBuild

2016-04-21 Thread ifernandezca...@cloudbees.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Ivan Fernandez Calvo created an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Jenkins /  JENKINS-34369 
 
 
 
  NPE on PreBuildMerge.decorateRevisionToBuild  
 
 
 
 
 
 
 
 
 

Issue Type:
 
  Bug 
 
 
 

Assignee:
 
 Mark Waite 
 
 
 

Components:
 

 git-plugin 
 
 
 

Created:
 

 2016/Apr/21 10:21 AM 
 
 
 

Environment:
 

 core 1.642.4.2  git:2.4.2 'Jenkins Git plugin'  git-client:1.19.5 'Jenkins Git client plugin'  Git for Windows 2.8.1  Gitolite v3.6.3 
 
 
 

Priority:
 
  Trivial 
 
 
 

Reporter:
 
 Ivan Fernandez Calvo 
 
 
 
 
 
 
 
 
 
 
I detect that a return null form GitSCM.getBuildData is not checked into PreBuildMerge.decorateRevisionToBuild 

 

 > C:\Git\bin\git.exe rev-parse "oppp/R362537^{commit}" # timeout=10
 > C:\Git\bin\git.exe config core.sparsecheckout # timeout=10
 > C:\Git\bin\git.exe checkout -f oppp/R362537
 > C:\Git\bin\git.exe merge --ff 6e11aa436029f13d9b13d73551b2 # timeout=10
 > C:\Git\bin\git.exe config core.sparsecheckout # timeout=10
 > C:\Git\bin\git.exe checkout -f 6e11aa4369b04f13d9b13d73551b2
FATAL: null
java.lang.NullPointerException
	at hudson.plugins.git.extensions.impl.PreBuildMerge.decorateRevisionToBuild(PreBuildMerge.java:88)
	at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:965)
	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1054)
	at hudson.scm.SCM.checkout(SCM.java:485)
	at hudson.mode

[JIRA] [git-plugin] (JENKINS-34369) NPE on PreBuildMerge.decorateRevisionToBuild

2016-04-21 Thread ifernandezca...@cloudbees.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Ivan Fernandez Calvo assigned an issue to Ivan Fernandez Calvo 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Jenkins /  JENKINS-34369 
 
 
 
  NPE on PreBuildMerge.decorateRevisionToBuild  
 
 
 
 
 
 
 
 
 

Change By:
 
 Ivan Fernandez Calvo 
 
 
 

Assignee:
 
 Mark Waite Ivan Fernandez Calvo 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

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





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