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

git plugin with repo that has empty .gitmodules file NPE during submodule update

    Details

    • Similar Issues:

      Description

      If a git repository happens to have an empty .gitmodules file, then the git client plugin will assume that the repository has submodules. Then, when the submodule Update code is run, it will crash with what appeared to be a Null Pointer exception.

      (my jenkins instance is having other issues, which prevent me from extracting the exceptions stack trace at the moment, but once I have it, I will update the bug.).

      java.lang.NullPointerException
                      at hudson.plugins.git.extensions.impl.SubmoduleOption.onCheckoutCompleted(SubmoduleOption.java:133)
                      at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1256)
                      at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:120)
                      at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:90)
                      at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:77)
                      at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
                      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
                      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
                      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
                      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
                      at java.lang.Thread.run(Thread.java:748)
      

        Attachments

          Activity

          Hide
          markewaite Mark Waite added a comment - - edited

          Thanks for the report. I'm unable to duplicate the problem with the simple minded test case I attempted.

          See https://github.com/MarkEWaite/jenkins-bugs/blob/JENKINS-56150/Jenkinsfile for my attempt.

          Any other details on the conditions which cause the NPE or the stack trace from the NPE?

          Show
          markewaite Mark Waite added a comment - - edited Thanks for the report. I'm unable to duplicate the problem with the simple minded test case I attempted. See https://github.com/MarkEWaite/jenkins-bugs/blob/JENKINS-56150/Jenkinsfile for my attempt. Any other details on the conditions which cause the NPE or the stack trace from the NPE?
          Hide
          markewaite Mark Waite added a comment -

          Fixed in git client plugin 3.0.0 once that releases

          Show
          markewaite Mark Waite added a comment - Fixed in git client plugin 3.0.0 once that releases

            People

            • Assignee:
              Unassigned
              Reporter:
              jekeller Jacob Keller
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: