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

"git rev-parse" fails on Linux v2.6.11 tag

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: git-plugin
    • Labels:
      None
    • Similar Issues:

      Description

      Version 3.3 of the git plugin added a step that runs "git rev-parse" on all tags (see also https://issues.jenkins-ci.org/browse/JENKINS-45447 ).

      This change breaks building the Linux kernel. The reason is interesting: the v2.6.11  tag ( https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tag/?h=v2.6.11 ) does not have a backing commit: 

      > git rev-parse refs/tags/v2.6.11^{commit} # timeout=10
      FATAL: Command "git rev-parse refs/tags/v2.6.11^{commit}" returned status code 128:
      stdout: refs/tags/v2.6.11^{commit}
      stderr: error: refs/tags/v2.6.11^{commit}: expected commit type, but the object dereferences to tree type
      error: refs/tags/v2.6.11^{commit}: expected commit type, but the object dereferences to tree type
      fatal: ambiguous argument 'refs/tags/v2.6.11^{commit}': unknown revision or path not in the working tree.
      Use '--' to separate paths from revisions, like this:
      'git <command> [<revision>...] -- [<file>...]'
      

      This tag is strange special case (which also noted in the tag's commit message). However, the Linux kernel is a very widely used project and building it using Jenkins should work. 

        Attachments

          Activity

          Hide
          evildeece Alastair D'Silva added a comment -

          Also biting us when using the pipeline multibranch plugin to build tags from the Linux kernel.

           

          To reproduce: Create a new pipeline multibranch job pointing at [git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git]

          Allow tags to be discovered

          Trigger branch indexing for the job

          Observe the follow error in the branch indexing log:

          ERROR: [Thu Nov 09 09:47:11 AEDT 2017] Could not fetch branches from source 167a9004-7662-4b72-a689-cc8eae3bdee4
          org.eclipse.jgit.errors.IncorrectObjectTypeException: Object c39ae07f393806ccf406ef966e9a15afc43cc36a is not a commit.
          	at org.eclipse.jgit.revwalk.RevWalk.parseCommit(RevWalk.java:774)
          	at jenkins.plugins.git.AbstractGitSCMSource$8.discoverTags(AbstractGitSCMSource.java:615)
          	at jenkins.plugins.git.AbstractGitSCMSource$8.run(AbstractGitSCMSource.java:538)
          	at jenkins.plugins.git.AbstractGitSCMSource$8.run(AbstractGitSCMSource.java:521)
          	at jenkins.plugins.git.AbstractGitSCMSource.doRetrieve(AbstractGitSCMSource.java:352)
          	at jenkins.plugins.git.AbstractGitSCMSource.retrieve(AbstractGitSCMSource.java:521)
          	at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:355)
          	at jenkins.scm.api.SCMSource.fetch(SCMSource.java:265)
          	at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:634)
          	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:421)
          [Thu Nov 09 09:47:11 AEDT 2017] Finished branch indexing. Indexing took 5 sec
          FATAL: Failed to recompute children of Linux Kernel
          org.eclipse.jgit.errors.IncorrectObjectTypeException: Object c39ae07f393806ccf406ef966e9a15afc43cc36a is not a commit.
          	at org.eclipse.jgit.revwalk.RevWalk.parseCommit(RevWalk.java:774)
          	at jenkins.plugins.git.AbstractGitSCMSource$8.discoverTags(AbstractGitSCMSource.java:615)
          	at jenkins.plugins.git.AbstractGitSCMSource$8.run(AbstractGitSCMSource.java:538)
          	at jenkins.plugins.git.AbstractGitSCMSource$8.run(AbstractGitSCMSource.java:521)
          	at jenkins.plugins.git.AbstractGitSCMSource.doRetrieve(AbstractGitSCMSource.java:352)
          	at jenkins.plugins.git.AbstractGitSCMSource.retrieve(AbstractGitSCMSource.java:521)
          	at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:355)
          	at jenkins.scm.api.SCMSource.fetch(SCMSource.java:265)
          	at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:634)
          	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:421)
          Finished: FAILURE
          
          Show
          evildeece Alastair D'Silva added a comment - Also biting us when using the pipeline multibranch plugin to build tags from the Linux kernel.   To reproduce: Create a new pipeline multibranch job pointing at [git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git] Allow tags to be discovered Trigger branch indexing for the job Observe the follow error in the branch indexing log: ERROR: [Thu Nov 09 09:47:11 AEDT 2017] Could not fetch branches from source 167a9004-7662-4b72-a689-cc8eae3bdee4 org.eclipse.jgit.errors.IncorrectObjectTypeException: Object c39ae07f393806ccf406ef966e9a15afc43cc36a is not a commit. at org.eclipse.jgit.revwalk.RevWalk.parseCommit(RevWalk.java:774) at jenkins.plugins.git.AbstractGitSCMSource$8.discoverTags(AbstractGitSCMSource.java:615) at jenkins.plugins.git.AbstractGitSCMSource$8.run(AbstractGitSCMSource.java:538) at jenkins.plugins.git.AbstractGitSCMSource$8.run(AbstractGitSCMSource.java:521) at jenkins.plugins.git.AbstractGitSCMSource.doRetrieve(AbstractGitSCMSource.java:352) at jenkins.plugins.git.AbstractGitSCMSource.retrieve(AbstractGitSCMSource.java:521) at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:355) at jenkins.scm.api.SCMSource.fetch(SCMSource.java:265) at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:634) 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:421) [Thu Nov 09 09:47:11 AEDT 2017] Finished branch indexing. Indexing took 5 sec FATAL: Failed to recompute children of Linux Kernel org.eclipse.jgit.errors.IncorrectObjectTypeException: Object c39ae07f393806ccf406ef966e9a15afc43cc36a is not a commit. at org.eclipse.jgit.revwalk.RevWalk.parseCommit(RevWalk.java:774) at jenkins.plugins.git.AbstractGitSCMSource$8.discoverTags(AbstractGitSCMSource.java:615) at jenkins.plugins.git.AbstractGitSCMSource$8.run(AbstractGitSCMSource.java:538) at jenkins.plugins.git.AbstractGitSCMSource$8.run(AbstractGitSCMSource.java:521) at jenkins.plugins.git.AbstractGitSCMSource.doRetrieve(AbstractGitSCMSource.java:352) at jenkins.plugins.git.AbstractGitSCMSource.retrieve(AbstractGitSCMSource.java:521) at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:355) at jenkins.scm.api.SCMSource.fetch(SCMSource.java:265) at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:634) 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:421) Finished: FAILURE

            People

            • Assignee:
              Unassigned
              Reporter:
              jakob_tsd Jakob Unterwurzacher
            • Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: