Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-8529

Bamboo fails to check out git code due to 'Missing object' but command line git clones the repo just fine

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 3.1 RC1, 3.1
    • None
    • None
    • None

      While checking out: https://github.com/krosenvold/bgit.git
      Checkout to revision 67fc88bf41aa2ddea0e50159868764c82bed5bad has failed due to Missing object 3a450411d6868221ae290bc0c17695de2990d5d8. Note this might happen if the repository contains submodules, as Bamboo does not currently support git submodules.

      Is it a bug? How can I find out if the repo contains submodules?

            [BAM-8529] Bamboo fails to check out git code due to 'Missing object' but command line git clones the repo just fine

            JGit bug has been opened, error message in Git plugin has been improved.

            Przemek Bruski added a comment - JGit bug has been opened, error message in Git plugin has been improved.

            Przemek Bruski added a comment - Bug open @ https://bugs.eclipse.org/bugs/show_bug.cgi?id=343566

            So the summary is:

            1. no, the repository in question does not have submodules and it's a different bug.
            2. JGit does not differentiate between "missing object because you have submodules" and "missing object for whatever reason" cases.
            3. we can only provide the user with hint on how to determine if the repository is using submodules.

            Przemek Bruski added a comment - So the summary is: no, the repository in question does not have submodules and it's a different bug. JGit does not differentiate between "missing object because you have submodules" and "missing object for whatever reason" cases. we can only provide the user with hint on how to determine if the repository is using submodules.

            Due to differences between JGit versions, we will not be able to detect if the reason for a missing object is lack of support for submodules or not.
            JGit handled Submodules via a separate exception:

            org.eclipse.jgit.pgm-0.10.1.sh clone git://git.eclipse.org/gitroot/virgo/org.eclipse.virgo.documentation.git virgo
            java.lang.UnsupportedOperationException: Submodules are not supported
                    at org.eclipse.jgit.lib.WorkDirCheckout$1.visitEntry(WorkDirCheckout.java:170)
                    at org.eclipse.jgit.lib.IndexTreeWalker.finishVisitTree(IndexTreeWalker.java:205)
                    at org.eclipse.jgit.lib.IndexTreeWalker.walk(IndexTreeWalker.java:142)
                    at org.eclipse.jgit.lib.IndexTreeWalker.walk(IndexTreeWalker.java:120)
                    at org.eclipse.jgit.lib.WorkDirCheckout.checkoutOutIndexNoHead(WorkDirCheckout.java:166)
                    at org.eclipse.jgit.lib.WorkDirCheckout.checkout(WorkDirCheckout.java:143)
                    at org.eclipse.jgit.pgm.Clone.doCheckout(Clone.java:192)
                    at org.eclipse.jgit.pgm.Clone.run(Clone.java:126)
                    at org.eclipse.jgit.pgm.TextBuiltin.execute(TextBuiltin.java:139)
                    at org.eclipse.jgit.pgm.Main.execute(Main.java:191)
                    at org.eclipse.jgit.pgm.Main.run(Main.java:120)
                    at org.eclipse.jgit.pgm.Main.main(Main.java:94)
            

            Latest JGit does not and uses MissingObjectException instead:

            org.eclipse.jgit.pgm-0.12.0-SNAPSHOT.sh clone git://git.eclipse.org/gitroot/virgo/org.eclipse.virgo.documentation.git virgo
            fatal: Missing unknown 9ada5de967ea8805e7c8142d3647d0500100fa5a
            

            Przemek Bruski added a comment - Due to differences between JGit versions, we will not be able to detect if the reason for a missing object is lack of support for submodules or not. JGit handled Submodules via a separate exception: org.eclipse.jgit.pgm-0.10.1.sh clone git: //git.eclipse.org/gitroot/virgo/org.eclipse.virgo.documentation.git virgo java.lang.UnsupportedOperationException: Submodules are not supported at org.eclipse.jgit.lib.WorkDirCheckout$1.visitEntry(WorkDirCheckout.java:170) at org.eclipse.jgit.lib.IndexTreeWalker.finishVisitTree(IndexTreeWalker.java:205) at org.eclipse.jgit.lib.IndexTreeWalker.walk(IndexTreeWalker.java:142) at org.eclipse.jgit.lib.IndexTreeWalker.walk(IndexTreeWalker.java:120) at org.eclipse.jgit.lib.WorkDirCheckout.checkoutOutIndexNoHead(WorkDirCheckout.java:166) at org.eclipse.jgit.lib.WorkDirCheckout.checkout(WorkDirCheckout.java:143) at org.eclipse.jgit.pgm.Clone.doCheckout(Clone.java:192) at org.eclipse.jgit.pgm.Clone.run(Clone.java:126) at org.eclipse.jgit.pgm.TextBuiltin.execute(TextBuiltin.java:139) at org.eclipse.jgit.pgm.Main.execute(Main.java:191) at org.eclipse.jgit.pgm.Main.run(Main.java:120) at org.eclipse.jgit.pgm.Main.main(Main.java:94) Latest JGit does not and uses MissingObjectException instead: org.eclipse.jgit.pgm-0.12.0-SNAPSHOT.sh clone git: //git.eclipse.org/gitroot/virgo/org.eclipse.virgo.documentation.git virgo fatal: Missing unknown 9ada5de967ea8805e7c8142d3647d0500100fa5a

            This is the exception thrown from jgit on repos with submodules:

            java.lang.UnsupportedOperationException: Submodules are not supported
                    at org.eclipse.jgit.lib.WorkDirCheckout$1.visitEntry(WorkDirCheckout.java:170)
                    at org.eclipse.jgit.lib.IndexTreeWalker.finishVisitTree(IndexTreeWalker.java:205)
                    at org.eclipse.jgit.lib.IndexTreeWalker.walk(IndexTreeWalker.java:142)
                    at org.eclipse.jgit.lib.IndexTreeWalker.walk(IndexTreeWalker.java:120)
                    at org.eclipse.jgit.lib.WorkDirCheckout.checkoutOutIndexNoHead(WorkDirCheckout.java:166)
                    at org.eclipse.jgit.lib.WorkDirCheckout.checkout(WorkDirCheckout.java:143)
                    at org.eclipse.jgit.pgm.Clone.doCheckout(Clone.java:192)
                    at org.eclipse.jgit.pgm.Clone.run(Clone.java:126)
                    at org.eclipse.jgit.pgm.TextBuiltin.execute(TextBuiltin.java:139)
                    at org.eclipse.jgit.pgm.Main.execute(Main.java:191)
                    at org.eclipse.jgit.pgm.Main.run(Main.java:120)
                    at org.eclipse.jgit.pgm.Main.main(Main.java:94)
            

            So the problem we are facing must be different.

            Przemek Bruski added a comment - This is the exception thrown from jgit on repos with submodules: java.lang.UnsupportedOperationException: Submodules are not supported at org.eclipse.jgit.lib.WorkDirCheckout$1.visitEntry(WorkDirCheckout.java:170) at org.eclipse.jgit.lib.IndexTreeWalker.finishVisitTree(IndexTreeWalker.java:205) at org.eclipse.jgit.lib.IndexTreeWalker.walk(IndexTreeWalker.java:142) at org.eclipse.jgit.lib.IndexTreeWalker.walk(IndexTreeWalker.java:120) at org.eclipse.jgit.lib.WorkDirCheckout.checkoutOutIndexNoHead(WorkDirCheckout.java:166) at org.eclipse.jgit.lib.WorkDirCheckout.checkout(WorkDirCheckout.java:143) at org.eclipse.jgit.pgm.Clone.doCheckout(Clone.java:192) at org.eclipse.jgit.pgm.Clone.run(Clone.java:126) at org.eclipse.jgit.pgm.TextBuiltin.execute(TextBuiltin.java:139) at org.eclipse.jgit.pgm.Main.execute(Main.java:191) at org.eclipse.jgit.pgm.Main.run(Main.java:120) at org.eclipse.jgit.pgm.Main.main(Main.java:94) So the problem we are facing must be different.

            Confirmed with standalone org.eclipse.jgit.pgm-0.10.1.sh

            Przemek Bruski added a comment - Confirmed with standalone org.eclipse.jgit.pgm-0.10.1.sh

            MarkC added a comment -
            • PB - Not sure if it's a problem with submodules or not?
            • We should see why it's failing and log a better message at a minimum
            • Fix if possible

            MarkC added a comment - PB - Not sure if it's a problem with submodules or not? We should see why it's failing and log a better message at a minimum Fix if possible

              pbruski Przemek Bruski
              pbruski Przemek Bruski
              Affected customers:
              0 This affects my team
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: