[JIRA] (JENKINS-60825) ExcludeOriginPRBranchesSCMHeadFilter NullPointerException

0 views
Skip to first unread message

paul@nkey.com.br (JIRA)

unread,
Jan 20, 2020, 1:25:03 PM1/20/20
to jenkinsc...@googlegroups.com
Paul Eipper created an issue
 
Jenkins / Bug JENKINS-60825
ExcludeOriginPRBranchesSCMHeadFilter NullPointerException
Issue Type: Bug Bug
Assignee: Unassigned
Components: gitea-plugin
Created: 2020-01-20 18:24
Environment: Gitea Plugin 1.1.2
Jenkins ver. 2.204.1
Gitea 1.10.0
Priority: Major Major
Reporter: Paul Eipper

After setting up a Gitea Organization job, the scan crashes on some repos with the following error:

Looking up repository myorg/my-project

  Checking branches...

    Checking branch MYPROJECT-1531-Fix-Menu
ERROR: Failed to create or update a subproject my-project
java.lang.NullPointerException
	at org.jenkinsci.plugin.gitea.BranchDiscoveryTrait$ExcludeOriginPRBranchesSCMHeadFilter.isExcluded(BranchDiscoveryTrait.java:239)
	at jenkins.scm.api.trait.SCMSourceRequest.isExcluded(SCMSourceRequest.java:196)
	at jenkins.scm.api.trait.SCMSourceRequest.process(SCMSourceRequest.java:333)
	at jenkins.scm.api.trait.SCMSourceRequest.process(SCMSourceRequest.java:286)
	at org.jenkinsci.plugin.gitea.GiteaSCMSource.retrieve(GiteaSCMSource.java:247)
	at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:373)
	at jenkins.scm.api.SCMSource.fetch(SCMSource.java:327)
	at jenkins.branch.MultiBranchProjectFactory$BySCMSourceCriteria.recognizes(MultiBranchProjectFactory.java:263)
	at jenkins.branch.OrganizationFolder$SCMSourceObserverImpl$1.recognizes(OrganizationFolder.java:1405)
	at jenkins.branch.OrganizationFolder$SCMSourceObserverImpl$1.complete(OrganizationFolder.java:1420)
	at jenkins.scm.api.trait.SCMNavigatorRequest.process(SCMNavigatorRequest.java:254)
	at jenkins.scm.api.trait.SCMNavigatorRequest.process(SCMNavigatorRequest.java:204)
	at org.jenkinsci.plugin.gitea.GiteaSCMNavigator.visitSources(GiteaSCMNavigator.java:167)
	at jenkins.branch.OrganizationFolder.computeChildren(OrganizationFolder.java:488)
	at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:277)
	at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:164)
	at jenkins.branch.OrganizationFolder$OrganizationScan.run(OrganizationFolder.java:969)
	at hudson.model.ResourceController.execute(ResourceController.java:97)
	at hudson.model.Executor.run(Executor.java:427)

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

paul@nkey.com.br (JIRA)

unread,
Jan 20, 2020, 1:33:07 PM1/20/20
to jenkinsc...@googlegroups.com
Paul Eipper commented on Bug JENKINS-60825
 
Re: ExcludeOriginPRBranchesSCMHeadFilter NullPointerException

It actually creates a folder for the multibranch project, but the indexing there contains the same error:

[Mon Jan 20 17:42:29 GMT 2020] Starting branch indexing...
Looking up repository myog/my-project

  Checking branches...

    Checking branch MYPROJECT-1531-Fix-Menu
ERROR: [Mon Jan 20 17:42:30 GMT 2020] Could not fetch branches from source org.jenkinsci.plugin.gitea.GiteaSCMNavigator::https://git.intranet.myorg.com::myorg::my-project
java.lang.NullPointerException
	at org.jenkinsci.plugin.gitea.BranchDiscoveryTrait$ExcludeOriginPRBranchesSCMHeadFilter.isExcluded(BranchDiscoveryTrait.java:239)
	at jenkins.scm.api.trait.SCMSourceRequest.isExcluded(SCMSourceRequest.java:196)
	at jenkins.scm.api.trait.SCMSourceRequest.process(SCMSourceRequest.java:333)
	at jenkins.scm.api.trait.SCMSourceRequest.process(SCMSourceRequest.java:286)
	at org.jenkinsci.plugin.gitea.GiteaSCMSource.retrieve(GiteaSCMSource.java:247)
	at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:373)
	at jenkins.scm.api.SCMSource.fetch(SCMSource.java:283)
	at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:641)
	at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:277)
	at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:164)
	at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:1032)
	at hudson.model.ResourceController.execute(ResourceController.java:97)
	at hudson.model.Executor.run(Executor.java:427)
[Mon Jan 20 17:42:30 GMT 2020] Finished branch indexing. Indexing took 1.5 sec
FATAL: Failed to recompute children of My Org » my-project
java.lang.NullPointerException
	at org.jenkinsci.plugin.gitea.BranchDiscoveryTrait$ExcludeOriginPRBranchesSCMHeadFilter.isExcluded(BranchDiscoveryTrait.java:239)
	at jenkins.scm.api.trait.SCMSourceRequest.isExcluded(SCMSourceRequest.java:196)
	at jenkins.scm.api.trait.SCMSourceRequest.process(SCMSourceRequest.java:333)
	at jenkins.scm.api.trait.SCMSourceRequest.process(SCMSourceRequest.java:286)
	at org.jenkinsci.plugin.gitea.GiteaSCMSource.retrieve(GiteaSCMSource.java:247)
	at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:373)
	at jenkins.scm.api.SCMSource.fetch(SCMSource.java:283)
	at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:641)
	at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:277)
	at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:164)
	at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:1032)
	at hudson.model.ResourceController.execute(ResourceController.java:97)
	at hudson.model.Executor.run(Executor.java:427)
Finished: FAILURE

mark.rzepka@lovion.de (JIRA)

unread,
Mar 2, 2020, 6:42:02 AM3/2/20
to jenkinsc...@googlegroups.com
m l commented on Bug JENKINS-60825
 
Re: ExcludeOriginPRBranchesSCMHeadFilter NullPointerException

One of the reasons for this NullPointerException is a PR with already deleted HEAD

This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages