Default to no Docker image compression in local environment
What does this MR do?
It makes the compression level used by the Makefile to generate tarfiles default to no compression, but still use maximum compression on CI jobs.
Comparison of compression levels (on Mac):
$ tar --version
bsdtar 3.3.2 - libarchive 3.3.2 zlib/1.2.11 liblzma/5.0.5 bz2lib/1.0.6
$ la out/helper-images/prebuilt-x86_64.?.tar.xz
-rw-r--r-- 1 pedropombeiro staff 22M Jan 27 19:25 out/helper-images/prebuilt-x86_64.0.tar.xz
-rw-r--r-- 1 pedropombeiro staff 21M Jan 27 19:26 out/helper-images/prebuilt-x86_64.1.tar.xz
-rw-r--r-- 1 pedropombeiro staff 18M Jan 27 19:27 out/helper-images/prebuilt-x86_64.2.tar.xz
-rw-r--r-- 1 pedropombeiro staff 18M Jan 27 19:29 out/helper-images/prebuilt-x86_64.3.tar.xz
-rw-r--r-- 1 pedropombeiro staff 17M Jan 27 19:31 out/helper-images/prebuilt-x86_64.4.tar.xz
-rw-r--r-- 1 pedropombeiro staff 16M Jan 27 19:33 out/helper-images/prebuilt-x86_64.5.tar.xz
-rw-r--r-- 1 pedropombeiro staff 16M Jan 27 19:36 out/helper-images/prebuilt-x86_64.6.tar.xz
-rw-r--r-- 1 pedropombeiro staff 16M Jan 27 19:39 out/helper-images/prebuilt-x86_64.7.tar.xz
-rw-r--r-- 1 pedropombeiro staff 14M Jan 27 19:42 out/helper-images/prebuilt-x86_64.8.tar.xz
-rw-r--r-- 1 pedropombeiro staff 14M Jan 27 19:45 out/helper-images/prebuilt-x86_64.9.tar.xz
FWIW, the difference in time required to compress at level 8 and level 9 is only 10 seconds, so probably not worth changing it.
Why was this MR needed?
While developing the Runner, we often need to rebuild the Dockerfiles for the helper image, and that entails an xz -f -9
command, selecting the highest level of compression. This is wasteful for a development environment, where we should favor speed over disk space.
What's the best way to test this MR?
- Check the
helper image
job artifacts to see if the image size is still the same as inmaster
- Run
make helper-dockerarchive-host
and notice thatxz -f -0
is run at the end, resulting in a much faster job.
What are the relevant issue numbers?
Closes #27503 (closed)