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

recursively update submodules does not recursively sync first

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • git-plugin
    • None
    • Jenkins 1.607
      git-plugin 2.3
      slave running OSX

      When using feature "additional behaviors->advanced submodules behaviors->Recursively update submodules", the update may fail due to the submodules not being sync'd recursively first.

      Checking out Revision e4bfb606a6e031ea2ba43d1111b890bf4db3d435 (refs/remotes/origin/branchwithnestedsubmodulechange)
      > /usr/local/git/bin/git config core.sparsecheckout # timeout=10
      > /usr/local/git/bin/git checkout -f e4bfb606a6e031ea2ba43d1111b890bf4db3d435
      > /usr/local/git/bin/git rev-list e4bfb606a6e031ea2ba43d1111b890bf4db3d435 # timeout=10
      > /usr/local/git/bin/git remote # timeout=10
      > /usr/local/git/bin/git submodule init # timeout=10
      > /usr/local/git/bin/git submodule sync # timeout=10
      > /usr/local/git/bin/git config --get remote.origin.url # timeout=10
      > /usr/local/git/bin/git submodule update --init --recursive
      FATAL: Command "/usr/local/git/bin/git submodule update --init --recursive" returned status code 1:
      stdout:
      stderr: fatal: reference is not a tree: 11162a5ae76bf4b798afe5fb3f4a13df74165574
      Unable to checkout '11162a5ae76bf4b798afe5fb3f4a13df74165574' in submodule path 'submodules/socket.IO-objc/submodules/socket-rocket'
      Failed to recurse into submodule path 'submodules/socket.IO-objc'

      The console log above shows that "git submodule update" includes the "--recursive" argument, but "git submodule init" and "git submodule sync" do not.

      In my particular scenario, I need "git submodule sync --recursive" before the recursive submodule update will succeed.

          [JENKINS-29038] recursively update submodules does not recursively sync first

          Adam Kapos added a comment -

          Would be nice to get this fixed.

          Adam Kapos added a comment - Would be nice to get this fixed.

          Could this be fixed or is there any workaround other than deleting the workspace? Deleting the workspace in our case is not sustainable since the repository is huge.

          Lawrence Dubé added a comment - Could this be fixed or is there any workaround other than deleting the workspace? Deleting the workspace in our case is not sustainable since the repository is huge.

            Unassigned Unassigned
            Votes:
            5 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: