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

Org Scan blows up when repository has no tags

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • Jenkins 2.107.3
      github-branch-source 2.3.6
    • 2.4.2

      Given a GitHub Organization Folder that has the "Discover Tags" behavior; the scan blows up on every repository that doesn't have any tags.

      In our case, it caused a couple of repositories to lose all their build history.

      Proposing robot
      15:26:19 Connecting to https://github.example.com/api/v3 using ghenkins/****** (DO NOT USE)
      Examining example/robot
      
        Checking branches...
      
        Getting remote branches...
      
          Checking branch master
      
        Getting remote pull requests...
            'Jenkinsfile' not found
          Does not meet criteria
      
          Checking branch travis
            'Jenkinsfile' not found
          Does not meet criteria
      
        2 branches were processed
      
        Checking pull-requests...
      
        0 pull requests were processed
      
        Checking tags...
      
        Getting remote tags...
      ERROR: Failed to create or update a subproject robot
      org.kohsuke.github.GHException: Failed to retrieve https://github.example.com/api/v3/repos/example/robot/git/refs/tags
      	at org.kohsuke.github.Requester$PagingIterator.fetch(Requester.java:521)
      	at org.kohsuke.github.Requester$PagingIterator.hasNext(Requester.java:486)
      	at org.kohsuke.github.PagedIterator.fetch(PagedIterator.java:44)
      	at org.kohsuke.github.PagedIterator.hasNext(PagedIterator.java:32)
      	at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource$LazyTags$1$1.hasNext(GitHubSCMSource.java:2178)
      	at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.retrieve(GitHubSCMSource.java:987)
      	at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:357)
      	at jenkins.scm.api.SCMSource.fetch(SCMSource.java:311)
      	at jenkins.branch.MultiBranchProjectFactory$BySCMSourceCriteria.recognizes(MultiBranchProjectFactory.java:263)
      	at jenkins.branch.OrganizationFolder$SCMSourceObserverImpl$1.recognizes(OrganizationFolder.java:1346)
      	at jenkins.branch.OrganizationFolder$SCMSourceObserverImpl$1.complete(OrganizationFolder.java:1361)
      	at jenkins.scm.api.trait.SCMNavigatorRequest.process(SCMNavigatorRequest.java:256)
      	at jenkins.scm.api.trait.SCMNavigatorRequest.process(SCMNavigatorRequest.java:206)
      	at org.jenkinsci.plugins.github_branch_source.GitHubSCMNavigator.visitSources(GitHubSCMNavigator.java:964)
      	at jenkins.branch.OrganizationFolder.computeChildren(OrganizationFolder.java:458)
      	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.OrganizationFolder$OrganizationScan.run(OrganizationFolder.java:910)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:429)
      

      Workaround: Add at least one tag to all your repositories.

            Unassigned Unassigned
            docwhat Christian Höltje
            Votes:
            6 Vote for this issue
            Watchers:
            16 Start watching this issue

              Created:
              Updated:
              Resolved: