"git clone" for OCI builds slow - use depth=1 to speed-up the clone

Bug #1939392 reported by Thomas Bechtold
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
launchpad-buildd
Fix Released
High
Thomas Bechtold

Bug Description

I'm constantly running into build failures because the "git clone" step is running super long:

...
Setting up libgssapi3-heimdal:amd64 (7.5.0+dfsg-1) ...
Setting up libldap-2.4-2:amd64 (2.4.45+dfsg-1ubuntu1.10) ...
Setting up libcurl3-gnutls:amd64 (7.58.0-2ubuntu3.14) ...
Setting up git (1:2.17.1-1ubuntu0.8) ...
Processing triggers for libc-bin (2.27-3ubuntu1.4) ...
Running repo phase...
Cloning into '20.04'...

(this is from https://launchpad.net/~cloud-images-release-managers/cloud-images/+oci/ubuntu-base/+recipe/20.04/+build/2035 ).

The problem is that the git repo contains tar.gz files (because there is currently no other way to build a base image - the tarball must be stored in git).
To reduce the size that is cloned, maybe "git clone depth=1" can be used so only the last commit is cloned? Would that be easily possible?

Related branches

Colin Watson (cjwatson)
affects: launchpad → launchpad-buildd
Changed in launchpad-buildd:
status: New → Triaged
importance: Undecided → High
Colin Watson (cjwatson)
Changed in launchpad-buildd:
status: Triaged → In Progress
assignee: nobody → Thomas Bechtold (toabctl)
Colin Watson (cjwatson)
Changed in launchpad-buildd:
status: In Progress → Fix Committed
Revision history for this message
Colin Watson (cjwatson) wrote (last edit ):

This was deployed to production a while ago (2021-09-21).

Changed in launchpad-buildd:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.