"git clone" for OCI builds slow - use depth=1 to speed-up the clone
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-
Setting up libldap-2.4-2:amd64 (2.4.45+
Setting up libcurl3-
Setting up git (1:2.17.
Processing triggers for libc-bin (2.27-3ubuntu1.4) ...
Running repo phase...
Cloning into '20.04'...
(this is from https:/
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 (community): Approve
-
Diff: 81 lines (+12/-8)3 files modifiedlpbuildd/target/build_oci.py (+2/-1)
lpbuildd/target/tests/test_build_oci.py (+7/-6)
lpbuildd/target/vcs.py (+3/-1)
affects: | launchpad → launchpad-buildd |
Changed in launchpad-buildd: | |
status: | New → Triaged |
importance: | Undecided → High |
Changed in launchpad-buildd: | |
status: | Triaged → In Progress |
assignee: | nobody → Thomas Bechtold (toabctl) |
Changed in launchpad-buildd: | |
status: | In Progress → Fix Committed |
This was deployed to production a while ago (2021-09-21).