threads / discuss / 29906

--progress for git submodule update?

Subject: --progress for git submodule update?

## tl;dr

7 messages between Mar 10, 2012 and Mar 15, 2012.

replies: 6people: 3as markdown or json

Chris Kees· Mar 10, 2012, 07:17 UTC · lore
Hi,

Would it be reasonable to have a --progress option for 'git submodule update'? I'm using buildbot with a git repository containing large submodules, and buildbot times out on the submodule update occasionally because there is no output for long periods of time. Adjusting buildbot's timeout factor will do for me in the short run.

Thanks, Chris

Jens Lehmann· Mar 11, 2012, 20:50 UTC · re: Chris Kees · lore

Re: --progress for git submodule update?

Am 10.03.2012 08:17, schrieb Chris Kees:
Show 5 quoted lines
> Would it be reasonable to have a --progress option for 'git submodule
> update'? I'm using buildbot with a git repository containing large
> submodules, and buildbot times out on the submodule update
> occasionally because there is no output for long periods of time.
> Adjusting buildbot's timeout factor will do for me in the short run.

As cloning a submodule talks a lot about its progress am I right suspecting it is the checkout part that is taking so long for you? The submodule script always uses the -q option for git checkout (which also gets rid of the unwanted "detached HEAD" messages). So AFAICS before a --progress option could be added to the submodule script, git checkout would have to learn an option to show progress but not the detached HEAD message (or to just suppress that advice).

What times are we talking about here?
Chris Kees· Mar 13, 2012, 02:17 UTC · re: Jens Lehmann · lore

Re: --progress for git submodule update?

It's 'git submodule update --recursive' that is taking so long silently. The problem is mainly on the first time. There are about 10 submodules that together have taken more than 30 minutes. It's not really just the amount of data, I think there are also network traffic issues that slow things down on some systems.

Chris
On Sun, Mar 11, 2012 at 3:50 PM, Jens Lehmann <Jens.Lehmann@web.de> wrote:
Show 16 quoted lines
> Am 10.03.2012 08:17, schrieb Chris Kees:
>> Would it be reasonable to have a --progress option for 'git submodule
>> update'? I'm using buildbot with a git repository containing large
>> submodules, and buildbot times out on the submodule update
>> occasionally because there is no output for long periods of time.
>> Adjusting buildbot's timeout factor will do for me in the short run.
>
> As cloning a submodule talks a lot about its progress am I right
> suspecting it is the checkout part that is taking so long for you?
> The submodule script always uses the -q option for git checkout
> (which also gets rid of the unwanted "detached HEAD" messages). So
> AFAICS before a --progress option could be added to the submodule
> script, git checkout would have to learn an option to show progress
> but not the detached HEAD message (or to just suppress that advice).
>
> What times are we talking about here?
Jens Lehmann· Mar 14, 2012, 19:42 UTC · re: Chris Kees · lore

Re: --progress for git submodule update?

Am 13.03.2012 03:17, schrieb Chris Kees:
Show 5 quoted lines
> It's 'git submodule update --recursive' that is taking so long
> silently.  The problem is mainly on the first time. There are about 10
> submodules that together have taken more than 30 minutes. It's not
> really just the amount of data, I think there are also network traffic
> issues that slow things down on some systems.

I suppose with "first time" you mean right after "git submodule init", when the submodules have to be cloned initially? Thinking about that again, you mentioned a buildbot doing all that. When the submodules are updated from a script, no progress output is shown at all and only the line "Cloning into 'xxx'..." will appear for each submodule, which explains why you don't see output for quite some time.

So I suspect increasing the timeout on your buildbot is the way to go, as progress output is intended for humans.

Junio C Hamano· Mar 14, 2012, 21:45 UTC · re: Jens Lehmann · lore

Re: --progress for git submodule update?

Jens Lehmann <Jens.Lehmann@web.de> writes:
Show 16 quoted lines
> Am 13.03.2012 03:17, schrieb Chris Kees:
>> It's 'git submodule update --recursive' that is taking so long
>> silently.  The problem is mainly on the first time. There are about 10
>> submodules that together have taken more than 30 minutes. It's not
>> really just the amount of data, I think there are also network traffic
>> issues that slow things down on some systems.
>
> I suppose with "first time" you mean right after "git submodule init",
> when the submodules have to be cloned initially? Thinking about that
> again, you mentioned a buildbot doing all that. When the submodules
> are updated from a script, no progress output is shown at all and only
> the line "Cloning into 'xxx'..." will appear for each submodule, which
> explains why you don't see output for quite some time.
>
> So I suspect increasing the timeout on your buildbot is the way to go,
> as progress output is intended for humans.

Considering that more often than not, people who run stuff from cronjob request us to be quiet when nothing wrong happens, I think that is a sane thing to suggest.

I do not mind "submodule $subcmd --progress" to pass "--progress" down to whatever underlying git commands it uses, or squelch "-q" that it uses when running them by default, though.

We may even want to make "git submodule init -q" to squelch the "Cloning into..." message, but that is a separate topic.

Chris Kees· Mar 15, 2012, 03:43 UTC · re: Junio C Hamano · lore

Re: --progress for git submodule update?

Yes, I meant when they have to be cloned initially. It was actually the builtbot developers who asked me to post a request because the lack of output is used to trigger the timeout and the output is conveniently stored and posted to the web so you can see what is happening on a given platform. Here is the snippet from the log of a machine failing because the python submodule of the project is taking too long--clearly a slow network issue since python generally shouldn't take more than 20 minutes to clone:

Cloning into externalPackages/clawpack/clawutil... Submodule path 'externalPackages/clawpack/clawutil': checked out '48f6be675b6fe40be62c39a48e1c948903e5c43d' Cloning into externalPackages/clawpack/pyclaw... Submodule path 'externalPackages/clawpack/pyclaw': checked out '921b1796b9bb0d11db1ced7996f95b9b24ce0b23' Cloning into externalPackages/clawpack/riemann... Submodule path 'externalPackages/clawpack/riemann': checked out 'a16d64d750fc414ce131455734ae7d68d6c0f46b' Cloning into externalPackages/clawpack/visclaw... Submodule path 'externalPackages/clawpack/visclaw': checked out '2b6ab68330c4498eade4b2e7dabc5de9b593ecac' Cloning into externalPackages/cython... Submodule path 'externalPackages/cython': checked out '77fd4991fe270b1097318c8ccdca9740df68d9e6' Cloning into externalPackages/daetk... Submodule path 'externalPackages/daetk': checked out '781f732fbc206cfdfa6da170fbc161a80d4133f8' Cloning into externalPackages/hdf5... Submodule path 'externalPackages/hdf5': checked out 'e853fa711d4ecc71ba7025c64db5bbe41558d635' Cloning into externalPackages/ipython... Submodule path 'externalPackages/ipython': checked out '698e9abebe0d6e0f261e7050c48680c4608a0985' Cloning into externalPackages/matplotlib... Submodule path 'externalPackages/matplotlib': checked out 'd6ec786c28b9ddbcb0704a1a6e1fb7233eb3212b' Cloning into externalPackages/mpi4py... Submodule path 'externalPackages/mpi4py': checked out 'eac3d3602e8272ab8eff46988fde396f0a255d90' Cloning into externalPackages/nose... Submodule path 'externalPackages/nose': checked out 'ccb3878af99138301c612d5bb92e7a27d3e39d22' Cloning into externalPackages/numexpr... Submodule path 'externalPackages/numexpr': checked out 'ed3ca13b58548d68fbc8b9a380990aac1e4897c9' Cloning into externalPackages/numpy... Submodule path 'externalPackages/numpy': checked out '3f685a1a990f7b6e5149c80b52436fb4207e49f5' Cloning into externalPackages/petsc... Submodule path 'externalPackages/petsc': checked out '4d5fdb033efc8bf2cdfe228f993ec9305f98854b' Cloning into externalPackages/petsc-BuildSystem... Submodule path 'externalPackages/petsc-BuildSystem': checked out 'e9f7e22d13f5d12da05c8f5d34d574e4bfe053ff' Cloning into externalPackages/petsc4py... Submodule path 'externalPackages/petsc4py': checked out 'adae544de17fd8cdcf2d51290ddaecfbe2107180' Cloning into externalPackages/pytables... Submodule path 'externalPackages/pytables': checked out '467ba035ba72acd7df28c648b1a52ecadebe4935' Cloning into externalPackages/python...

command timed out: 1200 seconds without output, attempting to kill process killed by signal 9 program finished with exit code -1 elapsedTime=2641.623387

On Wed, Mar 14, 2012 at 4:45 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 30 quoted lines
> Jens Lehmann <Jens.Lehmann@web.de> writes:
>
>> Am 13.03.2012 03:17, schrieb Chris Kees:
>>> It's 'git submodule update --recursive' that is taking so long
>>> silently.  The problem is mainly on the first time. There are about 10
>>> submodules that together have taken more than 30 minutes. It's not
>>> really just the amount of data, I think there are also network traffic
>>> issues that slow things down on some systems.
>>
>> I suppose with "first time" you mean right after "git submodule init",
>> when the submodules have to be cloned initially? Thinking about that
>> again, you mentioned a buildbot doing all that. When the submodules
>> are updated from a script, no progress output is shown at all and only
>> the line "Cloning into 'xxx'..." will appear for each submodule, which
>> explains why you don't see output for quite some time.
>>
>> So I suspect increasing the timeout on your buildbot is the way to go,
>> as progress output is intended for humans.
>
> Considering that more often than not, people who run stuff from cronjob
> request us to be quiet when nothing wrong happens, I think that is a
> sane thing to suggest.
>
> I do not mind "submodule $subcmd --progress" to pass "--progress" down to
> whatever underlying git commands it uses, or squelch "-q" that it uses
> when running them by default, though.
>
> We may even want to make "git submodule init -q" to squelch the "Cloning
> into..." message, but that is a separate topic.
>
Jens Lehmann· Mar 15, 2012, 22:34 UTC · re: Chris Kees · lore

Re: --progress for git submodule update?

Am 15.03.2012 04:43, schrieb Chris Kees:
Show 8 quoted lines
> Yes, I meant when they have to be cloned initially. It was actually
> the builtbot developers who asked me to post a request because the
> lack of output is used to trigger the timeout and the output is
> conveniently stored and posted to the web so you can see what is
> happening on a given platform. Here is the snippet from the log of a
> machine failing because the python submodule of the project is taking
> too long--clearly a slow network issue since python generally
> shouldn't take more than 20 minutes to clone:
[snip]
Show 7 quoted lines
> '467ba035ba72acd7df28c648b1a52ecadebe4935'
> Cloning into externalPackages/python...
> 
> command timed out: 1200 seconds without output, attempting to kill
> process killed by signal 9
> program finished with exit code -1
> elapsedTime=2641.623387

Ok. Another option you have is to avoid the long clone times. Clone the external repo locally (but outside your build environment) and instead of cloning the whole repo each time over the net just do a fetch into the local copy (to get the latest updates over the slow network). Then clone from there into your build environment (after the buildbot edited the submodule url entry in .git/config to point to the local copy). That should work substantially faster.

← back to recent threads