-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fetch only necessary commits for build #95
base: master
Are you sure you want to change the base?
Conversation
Here's another test to see if it works with different refs Building alpine with different refs in the manifest file
|
Here's an example of building an alpine image from different commits: Building library/alpine from different commits to test cache works
|
Unfortunately, this would need to be more complicated -- effectively, if we're pulling from a Git platform which does not support direct fetch-by-commit, we rely on Also, in our newer build system, we pass these Git URLs directly to |
Oh my.. how would this build kit approach work with repositories as big as ClickHouse/ClickHouse or even bigger? Is it just a blocker to use such big repos? Aside from that, can you give an example of what should still work, but would be probably broken? Like, some library manifest to test? update: it looks like library/almalinux is broken. I'll try to improve the changes. |
Ok, I am pretty sure it's a bug in the go-git addressed somewhere between 5.5 and 5.12. Just updating this module fixes everything. Update: go-git/go-git#305 it's fixed in 5.8.0 by go-git/go-git#778 |
Here are the test results for the binary built from the latest state. The go-git is updated:
bashbrew-first-run.log There's no issue like Here's what it looks on vanilla:
And this is how it looks for
And this is how it works with updated go-git built from 91fdec5:
|
I think it should really fetch only the necessary commit. Otherwise, the amount of unnecessary network traffic and compute time is enormous. |
To get rid of possible remaining questions, here's the run for all the official library manifests:
With the full output for bashbrew-full-run.log |
Kindly hope for the next review round |
Hello. Is something blocking it from the merge? The code is tested against the whole https://github.com/docker-library/library directory in #95 (comment) |
In docker-library/official-images#15846 @LaurentGoderre asked me to move the Dockerfiles into an orphan branch because bashbrew spends a huge time to fetch the git references.
Here's the simplest change improves the fetch by an order of magnitude: