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

when a submodule can't be checked out an exception is thrown

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: git-plugin
    • Labels:
      None

      Description

      Sometimes developers accidentally forget to push a submodule and thus make it impossible to check out their changes completely. This causes jenkins to throw an exception and on the next build it merely tries again and will inevitably fail. Maybe we should make an option for failed submodules to fail the build and move on instead of throwing an exception. I'll paste in the console output when this happened to me here.

      The first time:

      Started by an SCM change
      Building in workspace /var/lib/jenkins/jobs/Lynx/workspace
      Checkout:workspace / /var/lib/jenkins/jobs/Lynx/workspace - hudson.remoting.LocalChannel@aa0ff27
      Using strategy: Default
      Last Built Revision: Revision 15f062624b185b08d695a0949ede1431fe75bdd5 (origin/feature/LXS-1289-ip.plx-redux)
      Fetching changes from 1 remote Git repository
      Fetching upstream changes from cs:lynx
      Pruning obsolete local branches
      Seen branch in repository origin/HEAD
      Seen branch in repository origin/LXS/000-dbic-error
      Seen branch in repository origin/bug/LXS-000-WebIcons-Pass2Frew
      Seen branch in repository origin/bug/LXS-1053-Check-in-Primary
      Seen branch in repository origin/bug/LXS-1093-user-password
      Seen branch in repository origin/bug/LXS-1094-Account-cleanup
      Seen branch in repository origin/bug/LXS-1139-crash
      Seen branch in repository origin/bug/LXS-1327-incorrect-sms-errors
      Seen branch in repository origin/bug/LXS-1352-snpp-strip-newlines-and-unicode
      Seen branch in repository origin/bug/LXS-432-Type-Macro
      Seen branch in repository origin/bug/LXS-504-Excel-Openings
      Seen branch in repository origin/bug/LXS-774-Shared-RO
      Seen branch in repository origin/bug/LXS-948-Log-Shows-Dest-twice
      Seen branch in repository origin/bug/LXS-948-log-duplication
      Seen branch in repository origin/bug/LXS-971-D-Drive
      Seen branch in repository origin/bug/LXS-976-Excel-Button
      Seen branch in repository origin/feature/LXS-1060-Active-Dir-SubUsers
      Seen branch in repository origin/feature/LXS-1064-Remove-AD-Import
      Seen branch in repository origin/feature/LXS-1093-User-Edits
      Seen branch in repository origin/feature/LXS-1094-Account-Cleanup
      Seen branch in repository origin/feature/LXS-1096-ReadOnly
      Seen branch in repository origin/feature/LXS-1111-New-WebIcon
      Seen branch in repository origin/feature/LXS-1111-Web-Icon
      Seen branch in repository origin/feature/LXS-1111-jason-fix
      Seen branch in repository origin/feature/LXS-1111-web-icon-group
      Seen branch in repository origin/feature/LXS-1145-remove-theme-and-news
      Seen branch in repository origin/feature/LXS-1146-remove-find-Lynxnet
      Seen branch in repository origin/feature/LXS-1196-client-database
      Seen branch in repository origin/feature/LXS-1198-client-testing
      Seen branch in repository origin/feature/LXS-1214-AlarmState
      Seen branch in repository origin/feature/LXS-1289-ip.plx-redux
      Seen branch in repository origin/feature/LXS-1316-macro-wildcards
      Seen branch in repository origin/feature/LXS-1329-database-refactor
      Seen branch in repository origin/feature/LXS-1344-ldap-improvements
      Seen branch in repository origin/feature/LXS-1349-improved-failover
      Seen branch in repository origin/feature/LXS-1353-snpp-logging
      Seen branch in repository origin/feature/LXS-1357-apache-2.4.1
      Seen branch in repository origin/feature/LXS-865-Excel-Link
      Seen branch in repository origin/merge/users
      Seen branch in repository origin/merge/webicons
      Seen branch in repository origin/preview
      Seen branch in repository origin/release
      Commencing build of Revision 2cf960767f0bcdcbab95a998aa0d953f3b29db1d (origin/LXS/000-dbic-error)
      Checking out Revision 2cf960767f0bcdcbab95a998aa0d953f3b29db1d (origin/LXS/000-dbic-error)
      Trying to fetch ClientUpdates into /var/lib/jenkins/jobs/Lynx/workspace/lynx/ClientUpdates
      Fetching upstream changes from cs:lynx-client-updates
      Trying to fetch Lynxnet into /var/lib/jenkins/jobs/Lynx/workspace/lynx/Lynxnet
      Fetching upstream changes from cs:lynx-net
      Trying to fetch TrueUpdate into /var/lib/jenkins/jobs/Lynx/workspace/lynx/TrueUpdate
      Fetching upstream changes from cs:lynx-trueupdate
      FATAL: Command "git submodule update" returned status code 1:
      stdout: Cloning into ClientUpdates...
      Submodule path 'ClientUpdates': checked out 'ae2f708d6d69a30e6a54c77b01f0085ab9305000'
      
      stderr: fatal: reference is not a tree: 371a927a4268afc72316e31f9111ad5463305af9
      Unable to checkout '371a927a4268afc72316e31f9111ad5463305af9' in submodule path 'cgi/exe'
      
      hudson.plugins.git.GitException: Command "git submodule update" returned status code 1:
      stdout: Cloning into ClientUpdates...
      Submodule path 'ClientUpdates': checked out 'ae2f708d6d69a30e6a54c77b01f0085ab9305000'
      
      stderr: fatal: reference is not a tree: 371a927a4268afc72316e31f9111ad5463305af9
      Unable to checkout '371a927a4268afc72316e31f9111ad5463305af9' in submodule path 'cgi/exe'
      
      	at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:779)
      	at hudson.plugins.git.GitAPI.launchCommand(GitAPI.java:741)
      	at hudson.plugins.git.GitAPI.submoduleUpdate(GitAPI.java:388)
      	at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1303)
      	at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1264)
      	at hudson.FilePath.act(FilePath.java:832)
      	at hudson.FilePath.act(FilePath.java:814)
      	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1264)
      	at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:117)
      	at hudson.model.AbstractProject.checkout(AbstractProject.java:1212)
      	at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:581)
      	at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:470)
      	at hudson.model.Run.run(Run.java:1413)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:238)
      

      The second time:

      Started by an SCM change
      Building in workspace /var/lib/jenkins/jobs/Lynx/workspace
      Checkout:workspace / /var/lib/jenkins/jobs/Lynx/workspace - hudson.remoting.LocalChannel@aa0ff27
      Using strategy: Default
      Last Built Revision: Revision 15f062624b185b08d695a0949ede1431fe75bdd5 (origin/feature/LXS-1289-ip.plx-redux)
      Fetching changes from 1 remote Git repository
      Fetching upstream changes from cs:lynx
      Pruning obsolete local branches
      Seen branch in repository origin/HEAD
      Seen branch in repository origin/LXS/000-dbic-error
      Seen branch in repository origin/bug/LXS-000-WebIcons-Pass2Frew
      Seen branch in repository origin/bug/LXS-1053-Check-in-Primary
      Seen branch in repository origin/bug/LXS-1093-user-password
      Seen branch in repository origin/bug/LXS-1094-Account-cleanup
      Seen branch in repository origin/bug/LXS-1139-crash
      Seen branch in repository origin/bug/LXS-1327-incorrect-sms-errors
      Seen branch in repository origin/bug/LXS-1352-snpp-strip-newlines-and-unicode
      Seen branch in repository origin/bug/LXS-432-Type-Macro
      Seen branch in repository origin/bug/LXS-504-Excel-Openings
      Seen branch in repository origin/bug/LXS-774-Shared-RO
      Seen branch in repository origin/bug/LXS-948-Log-Shows-Dest-twice
      Seen branch in repository origin/bug/LXS-948-log-duplication
      Seen branch in repository origin/bug/LXS-971-D-Drive
      Seen branch in repository origin/bug/LXS-976-Excel-Button
      Seen branch in repository origin/feature/LXS-1060-Active-Dir-SubUsers
      Seen branch in repository origin/feature/LXS-1064-Remove-AD-Import
      Seen branch in repository origin/feature/LXS-1093-User-Edits
      Seen branch in repository origin/feature/LXS-1094-Account-Cleanup
      Seen branch in repository origin/feature/LXS-1096-ReadOnly
      Seen branch in repository origin/feature/LXS-1111-New-WebIcon
      Seen branch in repository origin/feature/LXS-1111-Web-Icon
      Seen branch in repository origin/feature/LXS-1111-jason-fix
      Seen branch in repository origin/feature/LXS-1111-web-icon-group
      Seen branch in repository origin/feature/LXS-1145-remove-theme-and-news
      Seen branch in repository origin/feature/LXS-1146-remove-find-Lynxnet
      Seen branch in repository origin/feature/LXS-1196-client-database
      Seen branch in repository origin/feature/LXS-1198-client-testing
      Seen branch in repository origin/feature/LXS-1214-AlarmState
      Seen branch in repository origin/feature/LXS-1289-ip.plx-redux
      Seen branch in repository origin/feature/LXS-1316-macro-wildcards
      Seen branch in repository origin/feature/LXS-1329-database-refactor
      Seen branch in repository origin/feature/LXS-1344-ldap-improvements
      Seen branch in repository origin/feature/LXS-1349-improved-failover
      Seen branch in repository origin/feature/LXS-1353-snpp-logging
      Seen branch in repository origin/feature/LXS-1357-apache-2.4.1
      Seen branch in repository origin/feature/LXS-865-Excel-Link
      Seen branch in repository origin/merge/users
      Seen branch in repository origin/merge/webicons
      Seen branch in repository origin/preview
      Seen branch in repository origin/release
      Commencing build of Revision 2cf960767f0bcdcbab95a998aa0d953f3b29db1d (origin/LXS/000-dbic-error)
      Checking out Revision 2cf960767f0bcdcbab95a998aa0d953f3b29db1d (origin/LXS/000-dbic-error)
      Trying to fetch ClientUpdates into /var/lib/jenkins/jobs/Lynx/workspace/lynx/ClientUpdates
      Fetching upstream changes from cs:lynx-client-updates
      Trying to fetch Lynxnet into /var/lib/jenkins/jobs/Lynx/workspace/lynx/Lynxnet
      Fetching upstream changes from cs:lynx-net
      Trying to fetch TrueUpdate into /var/lib/jenkins/jobs/Lynx/workspace/lynx/TrueUpdate
      Fetching upstream changes from cs:lynx-trueupdate
      FATAL: Command "git submodule update" returned status code 1:
      stdout: 
      stderr: fatal: reference is not a tree: 371a927a4268afc72316e31f9111ad5463305af9
      Unable to checkout '371a927a4268afc72316e31f9111ad5463305af9' in submodule path 'cgi/exe'
      
      hudson.plugins.git.GitException: Command "git submodule update" returned status code 1:
      stdout: 
      stderr: fatal: reference is not a tree: 371a927a4268afc72316e31f9111ad5463305af9
      Unable to checkout '371a927a4268afc72316e31f9111ad5463305af9' in submodule path 'cgi/exe'
      
      	at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:779)
      	at hudson.plugins.git.GitAPI.launchCommand(GitAPI.java:741)
      	at hudson.plugins.git.GitAPI.submoduleUpdate(GitAPI.java:388)
      	at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1303)
      	at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1264)
      	at hudson.FilePath.act(FilePath.java:832)
      	at hudson.FilePath.act(FilePath.java:814)
      	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1264)
      	at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:117)
      	at hudson.model.AbstractProject.checkout(AbstractProject.java:1212)
      	at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:581)
      	at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:470)
      	at hudson.model.Run.run(Run.java:1413)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:238)
      

        Activity

        frew frew schmidt created issue -

          People

          • Assignee:
            ndeloof Nicolas De Loof
            Reporter:
            frew frew schmidt
          • Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: