Skip to content

Smaller container images for review app jobs

TL;DR

This MR will give users 70 seconds back per MR when deploying a review-app 🎉

Context

Closes #386783 (closed)

About review-apps deployment

  • The review-deploy job is the job deploying review-apps to the k8s cluster.
  • review-build-cng-env needs to be finished before the review-deploy job run (i.e. it's on the critical path)

If we improve the time it takes to run one of those two jobs, users will have a faster feedback.

review-build-cng-env job

review-build-cng-env takes around 30 seconds to setup a runner, mainly because the container image it is downloading is big (~370MB or 1GB to download - I don't know which value is used):

Screenshot_2023-01-04_at_12.22.57

REPOSITORY                                                                    TAG          IMAGE ID        CREATED         PLATFORM    SIZE          BLOB SIZE
registry.gitlab.com/gitlab-org/gitlab-build-images/debian-bullseye-ruby-2.7   bundler-2.3  0391eef3ffaa    5 days ago      linux/amd64 1019.2 MiB    362.9 MiB

review-deploy job

review-deploy takes around 55 seconds to setup a runner, mainly because the container image it is downloading is very big (~581MB or 2GB to download - I don't know which value is used):

Screenshot_2023-01-04_at_12.27.49

REPOSITORY                                                   TAG                              IMAGE ID        CREATED         PLATFORM    SIZE          BLOB SIZE
registry.gitlab.com/gitlab-org/gitlab-build-images/ruby-3.0  gcloud-383-kubectl-1.23-helm-3.5 add63212b0c8    7 weeks ago     linux/amd64       1.9 GiB       581.8 MiB

What does this MR do?

Experiment with smaller container images to improve the time it takes to setup a runner:

Results

What's next?

Those jobs will be made faster if we can avoid a git clone in them. This will be tried out as part of #191273 (closed) (see #191273 (comment 1227409061) for context).

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by David Dieulivol

Merge request reports