• Icon: Story Story
    • Resolution: Unresolved
    • Icon: Minor Minor
    • git-client-plugin
    • None

      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.

          [JENKINS-60052] Simplify git submodule update command

          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.

          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.

          Jesse Rittner added a comment -

          Can you clarify what compatibility issues were encountered?

          Jesse Rittner added a comment - Can you clarify what compatibility issues were encountered?

          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.

          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.

          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.

          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.

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

              Created:
              Updated: