[JIRA] (JENKINS-56150) git plugin with repo that has empty .gitmodules file NPE during submodule update

12 views
Skip to first unread message

jacob.keller@gmail.com (JIRA)

unread,
Feb 14, 2019, 6:45:02 PM2/14/19
to jenkinsc...@googlegroups.com
Jacob Keller created an issue
 
Jenkins / Bug JENKINS-56150
git plugin with repo that has empty .gitmodules file NPE during submodule update
Issue Type: Bug Bug
Assignee: Mark Waite
Components: git-client-plugin
Created: 2019-02-14 23:44
Priority: Major Major
Reporter: Jacob Keller

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

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

mark.earl.waite@gmail.com (JIRA)

unread,
Feb 15, 2019, 9:00:02 PM2/15/19
to jenkinsc...@googlegroups.com
Mark Waite commented on Bug JENKINS-56150
 
Re: git plugin with repo that has empty .gitmodules file NPE during submodule update

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?

mark.earl.waite@gmail.com (JIRA)

unread,
Feb 15, 2019, 9:01:01 PM2/15/19
to jenkinsc...@googlegroups.com

mark.earl.waite@gmail.com (JIRA)

unread,
Feb 15, 2019, 9:01:02 PM2/15/19
to jenkinsc...@googlegroups.com
Mark Waite edited a comment on Bug JENKINS-56150
Thanks for the report.  I'm unable to duplicate the problem with the [ simple minded test case |https://github.com/MarkEWaite/jenkins-bugs/blob/JENKINS-56150/Jenkinsfile] 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?

mark.earl.waite@gmail.com (JIRA)

unread,
Feb 17, 2019, 7:08:02 AM2/17/19
to jenkinsc...@googlegroups.com
Mark Waite updated an issue
 
Change By: Mark Waite
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.).


{noformat}
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)
{noformat}

mark.earl.waite@gmail.com (JIRA)

unread,
Feb 25, 2019, 9:05:02 AM2/25/19
to jenkinsc...@googlegroups.com
Mark Waite updated Bug JENKINS-56150
 

Fixed in git client plugin 3.0.0 once that releases

Change By: Mark Waite
Status: Open Fixed but Unreleased
Resolution: Fixed

rene.scheibe@gmail.com (JIRA)

unread,
Dec 28, 2019, 7:23:02 PM12/28/19
to jenkinsc...@googlegroups.com
René Scheibe commented on Bug JENKINS-56150
 
Re: git plugin with repo that has empty .gitmodules file NPE during submodule update

Is there any commit/pull request for the fix that can be referenced here?
The ticket status should then also be set to "Resolved" and the "Released As" info be populated.

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

mark.earl.waite@gmail.com (JIRA)

unread,
Dec 28, 2019, 8:35:02 PM12/28/19
to jenkinsc...@googlegroups.com

Sorry, no pull request to reference. Since there was no response to my request for information, it can either be resolved as "Cannot reproduce" or as "Fixed in 3.0.0". Either is fine with me.

rene.scheibe@gmail.com (JIRA)

unread,
Dec 29, 2019, 6:19:02 AM12/29/19
to jenkinsc...@googlegroups.com
René Scheibe updated an issue
 
Change By: René Scheibe
Component/s: git-plugin
Component/s: git-client-plugin

rene.scheibe@gmail.com (JIRA)

unread,
Dec 29, 2019, 6:19:02 AM12/29/19
to jenkinsc...@googlegroups.com
René Scheibe commented on Bug JENKINS-56150
 
Re: git plugin with repo that has empty .gitmodules file NPE during submodule update

I found the respective pull request and added a link to the ticket.

rene.scheibe@gmail.com (JIRA)

unread,
Dec 29, 2019, 6:23:02 AM12/29/19
to jenkinsc...@googlegroups.com

mark.earl.waite@gmail.com (JIRA)

unread,
Jan 18, 2020, 10:04:04 PM1/18/20
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages