[JIRA] (JENKINS-60052) Simplify git submodule update command

11 views
Skip to first unread message

rittneje@gmail.com (JIRA)

unread,
Nov 4, 2019, 11:18:02 PM11/4/19
to jenkinsc...@googlegroups.com
Jesse Rittner updated an issue
 
Jenkins / Story JENKINS-60052
Simplify git submodule update command
Change By: Jesse Rittner
Summary: Simplify git submoudle submodule update command
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

mark.earl.waite@gmail.com (JIRA)

unread,
Nov 4, 2019, 11:22:02 PM11/4/19
to jenkinsc...@googlegroups.com
Mark Waite assigned an issue to Unassigned
Change By: Mark Waite
Assignee: Mark Waite

mark.earl.waite@gmail.com (JIRA)

unread,
Nov 4, 2019, 11:25:02 PM11/4/19
to jenkinsc...@googlegroups.com
Mark Waite commented on Story JENKINS-60052
 
Re: Simplify git submodule update command

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.

rittneje@gmail.com (JIRA)

unread,
Nov 4, 2019, 11:29:02 PM11/4/19
to jenkinsc...@googlegroups.com

Can you clarify what compatibility issues were encountered?

rittneje@gmail.com (JIRA)

unread,
Nov 4, 2019, 11:29:02 PM11/4/19
to jenkinsc...@googlegroups.com
Jesse Rittner updated an issue
Change By: Jesse Rittner
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 the 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.

mark.earl.waite@gmail.com (JIRA)

unread,
Nov 4, 2019, 11:53:03 PM11/4/19
to jenkinsc...@googlegroups.com
Mark Waite commented on Story JENKINS-60052
 
Re: Simplify git submodule update command

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.

rene.scheibe@gmail.com (JIRA)

unread,
Dec 28, 2019, 8:16:02 PM12/28/19
to jenkinsc...@googlegroups.com

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.

Reply all
Reply to author
Forward
0 new messages