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

Blue Ocean: NullPointerException when importing a GitHub project, deletes organization

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: blueocean-plugin
    • Labels:
      None
    • Environment:
      RHEL 7, Jenkins v2.53, Blue Ocean v1.0.0
    • Epic Link:
    • Sprint:
      Blue Ocean - 1.1-beta-1
    • Similar Issues:

      Description

      I'm having difficulties in setting getting blue ocean to import a project from GitHub. When I add a project-wide pipeline using the Blue Ocean "Add Pipeline" wizard and let it auto-discover projects based on the presence of Jenkinsfile_s, the _Scan organization log shows the following:

      Proposing mitsuba2
      Looking up mitsuba-renderer/mitsuba2
      
        Getting remote pull requests...
      
          Checking pull request #21
          (not from a trusted source)
      
          Checking pull request #20
          Job name: PR-20
            'Jenkinsfile' not found
          Does not meet criteria
      
          Checking pull request #19
          (not from a trusted source)
      
          Checking pull request #18
          (not from a trusted source)
      
          Checking pull request #15
          (not from a trusted source)
      
          Checking pull request #13
      ERROR: Failed to create or update a subproject mitsuba2
      java.lang.NullPointerException
          at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.doRetrieve(GitHubSCMSource.java:623)
          at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.retrieve(GitHubSCMSource.java:462)
          at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:300)
          at jenkins.scm.api.SCMSource.fetch(SCMSource.java:254)
          at jenkins.branch.MultiBranchProjectFactory$BySCMSourceCriteria.recognizes(MultiBranchProjectFactory.java:263)
          at jenkins.branch.OrganizationFolder$SCMSourceObserverImpl$1.recognizes(OrganizationFolder.java:1266)
          at jenkins.branch.OrganizationFolder$SCMSourceObserverImpl$1.complete(OrganizationFolder.java:1281)
          at org.jenkinsci.plugins.github_branch_source.GitHubSCMNavigator.add(GitHubSCMNavigator.java:540)
          at org.jenkinsci.plugins.github_branch_source.GitHubSCMNavigator.visitSources(GitHubSCMNavigator.java:362)
          at jenkins.branch.OrganizationFolder.computeChildren(OrganizationFolder.java:399)
          at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:266)
          at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:162)
          at jenkins.branch.OrganizationFolder$OrganizationScan.run(OrganizationFolder.java:850)
          at hudson.model.ResourceController.execute(ResourceController.java:97)
          at hudson.model.Executor.run(Executor.java:405)
      

      If I try to specifically add this project using the "Add pipeline" wizard, a failure occurs and the entire organization is deleted (which takes several other projects offline ). In this case, I see the following exception in ``jenkins.log``:

      SEVERE: Error creating pipeline mitsuba-renderer: null
      java.lang.NullPointerException
      at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.doRetrieve(GitHubSCMSource.java:623)
      at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.retrieve(GitHubSCMSource.java:462)
      at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:300)
      at jenkins.scm.api.SCMSource.fetch(SCMSource.java:230)
      at io.jenkins.blueocean.blueocean_github_pipeline.GithubPipelineCreateRequest.repoHasJenkinsFile(GithubPipelineCreateRequest.java:293)
      at io.jenkins.blueocean.blueocean_github_pipeline.GithubPipelineCreateRequest.create(GithubPipelineCreateRequest.java:175)
      at io.jenkins.blueocean.rest.model.BluePipelineContainer.create(BluePipelineContainer.java:48)
      at io.jenkins.blueocean.rest.model.BluePipelineContainer.create(BluePipelineContainer.java:44)
      at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
      at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343)
      at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:184)
      at org.kohsuke.stapler.SelectionInterceptedFunction$Adapter.invoke(SelectionInterceptedFunction.java:36)
      at org.kohsuke.stapler.verb.HttpVerbInterceptor.invoke(HttpVerbInterceptor.java:48)
      at org.kohsuke.stapler.SelectionInterceptedFunction.bindAndInvoke(SelectionInterceptedFunction.java:26)
      at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:117)
      at org.kohsuke.stapler.IndexDispatcher.dispatch(IndexDispatcher.java:26)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
      at org.kohsuke.stapler.MetaClass$3.doDispatch(MetaClass.java:209)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
      

        Attachments

          Issue Links

            Activity

            Hide
            jamesdumay James Dumay added a comment -

            Will appear in 1.0.1 hopefully tonight.

            Show
            jamesdumay James Dumay added a comment - Will appear in 1.0.1 hopefully tonight.
            Hide
            michaelneale Michael Neale added a comment -

            Wenzel Jakob should have a fix for this out shortly - however, will need to open a ticket for the github-branch-source component with as much detail as possible on how to reproduce it (the second part will be fixed, but it still probably will fail to create a pipeline based on that repo) - if this can be re-created via the "classic" UI (ie just set up an org folder the olde fashioned way) that would help to eliminate layers (obviously if you give us access, we can check it happens too, there is something in that config that is surprising it). 

            Show
            michaelneale Michael Neale added a comment - Wenzel Jakob should have a fix for this out shortly - however, will need to open a ticket for the github-branch-source component with as much detail as possible on how to reproduce it (the second part will be fixed, but it still probably will fail to create a pipeline based on that repo) - if this can be re-created via the "classic" UI (ie just set up an org folder the olde fashioned way) that would help to eliminate layers (obviously if you give us access, we can check it happens too, there is something in that config that is surprising it). 
            Hide
            jamesdumay James Dumay added a comment -

            Wenzel Jakob I have raised JENKINS-43487 on your behalf. Please watch that ticket for updates.

            Show
            jamesdumay James Dumay added a comment - Wenzel Jakob I have raised JENKINS-43487 on your behalf. Please watch that ticket for updates.
            Hide
            wjakob Wenzel Jakob added a comment -

            So this is pretty strange – it seems that this bug is not 100% deterministic. In the meantime, the auto-discovery process has finally been able to register the "mitsuba2" project without throwing the exception. 

            Potentially this is related to the following closed and orphaned PR: https://github.com/mitsuba-renderer/mitsuba2/pull/13 (the repository from which this PR was originally created was deleted).

            I just invited michaelneale, kzantow, vivek, and i386 for read-only access in case you would like to take a look (obviously please don't redistribute any part of the repository).

            Show
            wjakob Wenzel Jakob added a comment - So this is pretty strange – it seems that this bug is not 100% deterministic. In the meantime, the auto-discovery process has finally been able to register the "mitsuba2" project without throwing the exception.  Potentially this is related to the following closed and orphaned PR: https://github.com/mitsuba-renderer/mitsuba2/pull/13  (the repository from which this PR was originally created was deleted). I just invited michaelneale, kzantow, vivek, and i386 for read-only access in case you would like to take a look (obviously please don't redistribute any part of the repository).
            Hide
            jamesdumay James Dumay added a comment -

            Wenzel Jakob a fix went out for this in 1.0.1

            Show
            jamesdumay James Dumay added a comment - Wenzel Jakob a fix went out for this in 1.0.1

              People

              • Assignee:
                jamesdumay James Dumay
                Reporter:
                wjakob Wenzel Jakob
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: