Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-34369

NPE on PreBuildMerge.decorateRevisionToBuild

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Trivial
    • Resolution: Fixed
    • Component/s: git-plugin
    • Labels:
      None
    • 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
    • Similar Issues:

      Description

      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 6e11aa436022222222222229f13d9b13d73551b2 # timeout=10
       > C:\Git\bin\git.exe config core.sparsecheckout # timeout=10
       > C:\Git\bin\git.exe checkout -f 6e11aa4362222222222229b04f13d9b13d73551b2
      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.model.AbstractProject.checkout(AbstractProject.java:1276)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607)
      	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
      	at hudson.model.Run.execute(Run.java:1738)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:410)
      Recording test results
      

        Attachments

          Issue Links

            Activity

            Hide
            geoffroya Geoffroy ARNOUD added a comment -

            I encountered the same issue, with branches which merge works fine. I solved it by using JGit instead of Git Client

            Show
            geoffroya Geoffroy ARNOUD added a comment - I encountered the same issue, with branches which merge works fine. I solved it by using JGit instead of Git Client
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Ivan Fernandez Calvo
            Path:
            src/main/java/hudson/plugins/git/extensions/impl/PreBuildMerge.java
            http://jenkins-ci.org/commit/git-plugin/11f792c756a6f030355df73932ccde99a9057146
            Log:
            JENKINS-34369 protect against a NPE form GitSCM.getBuildData is not checked into PreBuildMerge.decorateRevisionToBuild

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ivan Fernandez Calvo Path: src/main/java/hudson/plugins/git/extensions/impl/PreBuildMerge.java http://jenkins-ci.org/commit/git-plugin/11f792c756a6f030355df73932ccde99a9057146 Log: JENKINS-34369 protect against a NPE form GitSCM.getBuildData is not checked into PreBuildMerge.decorateRevisionToBuild
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Mark Waite
            Path:
            src/main/java/hudson/plugins/git/extensions/impl/PreBuildMerge.java
            http://jenkins-ci.org/commit/git-plugin/2025127d7e82cc61b0b8f6ede91997c28bfd3c3d
            Log:
            Merge pull request #394 from kuisathaverat/JENKINS-34369

            JENKINS-34369 protect against a NPE form GitSCM.getBuildData

            Compare: https://github.com/jenkinsci/git-plugin/compare/fcbdc768536c...2025127d7e82

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Mark Waite Path: src/main/java/hudson/plugins/git/extensions/impl/PreBuildMerge.java http://jenkins-ci.org/commit/git-plugin/2025127d7e82cc61b0b8f6ede91997c28bfd3c3d Log: Merge pull request #394 from kuisathaverat/ JENKINS-34369 JENKINS-34369 protect against a NPE form GitSCM.getBuildData Compare: https://github.com/jenkinsci/git-plugin/compare/fcbdc768536c...2025127d7e82
            Hide
            ifernandezcalvo Ivan Fernandez Calvo added a comment -

            Ready for Release

            Show
            ifernandezcalvo Ivan Fernandez Calvo added a comment - Ready for Release
            Hide
            markewaite Mark Waite added a comment -

            Released in git plugin 3.0.1, 18 Nov 2016

            Show
            markewaite Mark Waite added a comment - Released in git plugin 3.0.1, 18 Nov 2016

              People

              • Assignee:
                ifernandezcalvo Ivan Fernandez Calvo
                Reporter:
                ifernandezcalvo Ivan Fernandez Calvo
              • Votes:
                4 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: