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

Simplify git submodule update command

    Details

    • Similar Issues:

      Description

      For some reason, the git-client plugin iterates through the list of submodules (presumably by parsing the .gitmodules file) and manually issues a git submodule update command for each. Instead of this, it should simply issue a single git submodule update command without specifying a particular submodule, and then let the CLI do its job.

      As part of this change, the new threads property of SubmoduleUpdateCommand should just be passed as --jobs rather than manually spawning threads in Java/Groovy.

        Attachments

          Activity

          Hide
          markewaite Mark Waite added a comment -

          That type of change was attempted as part of the threaded submodule update implementation. We were unable to retain compatibility with previous behaviors. Retaining compatibility is critical for users depending on the git plugin. If you have a pull request that retains compatibility and switches to use git submodule update, I'm confident there will be reviewers willing to assist with the review.

          Show
          markewaite Mark Waite added a comment - That type of change was attempted as part of the threaded submodule update implementation. We were unable to retain compatibility with previous behaviors. Retaining compatibility is critical for users depending on the git plugin. If you have a pull request that retains compatibility and switches to use git submodule update , I'm confident there will be reviewers willing to assist with the review.
          Hide
          rittneje Jesse Rittner added a comment -

          Can you clarify what compatibility issues were encountered?

          Show
          rittneje Jesse Rittner added a comment - Can you clarify what compatibility issues were encountered?
          Hide
          markewaite Mark Waite added a comment -

          Per pull request 348 the --jobs argument first appeared in command line git 2.9.0. The Jenkins git plugin runs on CentOS 7, Debian 9, and Ubuntu 16, all that deliver a version prior to CLI git 2.9.0. Retaining compatibility with versions of command line git prior to 2.9.0 is crucial for the many users running on those versions of command line git.

          I believe there were also compatibility failures reported by the automated tests in the git client plugin or the git plugin. I didn't find references to automated test failures in a brief review of the comments on the pull request, but that's my recollection. The submodule implementation in the git client predates many of the improvements in command line git.

          Show
          markewaite Mark Waite added a comment - Per pull request 348 the --jobs argument first appeared in command line git 2.9.0. The Jenkins git plugin runs on CentOS 7, Debian 9, and Ubuntu 16, all that deliver a version prior to CLI git 2.9.0. Retaining compatibility with versions of command line git prior to 2.9.0 is crucial for the many users running on those versions of command line git. I believe there were also compatibility failures reported by the automated tests in the git client plugin or the git plugin. I didn't find references to automated test failures in a brief review of the comments on the pull request, but that's my recollection. The submodule implementation in the git client predates many of the improvements in command line git.
          Hide
          renescheibe René Scheibe added a comment -

          Yes, it would be very convenient to be able to use the CLI functionality directly.

          But the git-client-plugin also supports to have a different credential for each submodule. If this is a "must have" feature is another question. Please have a look at the respective commits. See https://github.com/jenkinsci/git-client-plugin/pull/180.

          Therefore just always using "git submodule update" is not possible. There would be logic required to check if different credentials are used and if the git version is sufficient.

          Show
          renescheibe René Scheibe added a comment - Yes, it would be very convenient to be able to use the CLI functionality directly. But the git-client-plugin also supports to have a different credential for each submodule. If this is a "must have" feature is another question. Please have a look at the respective commits. See https://github.com/jenkinsci/git-client-plugin/pull/180 . Therefore just always using " git submodule update" is not possible. There would be logic required to check if different credentials are used and if the git version is sufficient.

            People

            • Assignee:
              Unassigned
              Reporter:
              rittneje Jesse Rittner
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: