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

Could not update folder level actions from source

    Details

    • Similar Issues:
    • Released As:
      gerrit-code-review-0.2

      Description

      It seems that after configuring a new Multibranch Pipeline project with Gerrit SCM using HTTPS as the source, user would get the exception below while trying to scan for branches:

      [Thu Feb 22 11:04:09 UTC 2018] Starting branch indexing...
      ERROR: [Thu Feb 22 11:04:09 UTC 2018] Could not update folder level actions from source dc268e61-3582-471b-97d0-d30b9a99a4a4
      java.lang.NullPointerException
      	at jenkins.scm.api.trait.SCMSourceContext.withTraits(SCMSourceContext.java:245)
      	at jenkins.plugins.gerrit.AbstractGerritSCMSource.retrieveActions(AbstractGerritSCMSource.java:214)
      	at jenkins.scm.api.SCMSource.fetchActions(SCMSource.java:746)
      	at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:591)
      	at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:276)
      	at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:165)
      	at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:978)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:429)
      [Thu Feb 22 11:04:09 UTC 2018] Finished branch indexing. Indexing took 14 ms
      FATAL: Failed to recompute children of test-jjb-multibranch
      java.lang.NullPointerException
      	at jenkins.scm.api.trait.SCMSourceContext.withTraits(SCMSourceContext.java:245)
      	at jenkins.plugins.gerrit.AbstractGerritSCMSource.retrieveActions(AbstractGerritSCMSource.java:214)
      	at jenkins.scm.api.SCMSource.fetchActions(SCMSource.java:746)
      	at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:591)
      	at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:276)
      	at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:165)
      	at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:978)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:429)
      Finished: FAILURE

        Attachments

          Activity

          Hide
          ssbarnea Sorin Sbarnea added a comment - - edited

          It seems that his bug is caused by the missing .git suffix on the git repository URL, something that is optional for git clone command, which works with and without it.

          Documentation states that the parameter is the same as the one used by git clone.

          Even Gerrit sample project cloning commands do advertise the URLs without .git prefix, exactly the ones that not working with the plugin.

          I also tested with freestyle and pipeline project types, and both of them work well without the .git suffix on the URLs.

           

          Show
          ssbarnea Sorin Sbarnea added a comment - - edited It seems that his bug is caused by the missing .git suffix on the git repository URL, something that is optional for git clone command, which works with and without it. Documentation states that the parameter is the same as the one used by git clone. Even Gerrit sample project cloning commands do advertise the URLs without .git prefix, exactly the ones that not working with the plugin. I also tested with freestyle and pipeline project types, and both of them work well without the .git suffix on the URLs.  
          Hide
          lucamilanesio Luca Domenico Milanesio added a comment -

          Sorin Sbarnea thanks for raising this, it was a simple fix on the Gerrit URL regex.

          Fixed in https://github.com/jenkinsci/gerrit-code-review-plugin/pull/15

          Show
          lucamilanesio Luca Domenico Milanesio added a comment - Sorin Sbarnea thanks for raising this, it was a simple fix on the Gerrit URL regex. Fixed in  https://github.com/jenkinsci/gerrit-code-review-plugin/pull/15

            People

            • Assignee:
              lucamilanesio Luca Domenico Milanesio
              Reporter:
              ssbarnea Sorin Sbarnea
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: