Skip to content

Use a more optimized caching strategy for 'coverage-frontend'

Before change

Reference job: https://gitlab.com/gitlab-org/gitlab/-/jobs/552389308

Section Duration (seconds) Cumulative duration (seconds) % of total Can be improved at the job level?
Preparing the "docker+machine" executor 42 42 9.5 % No
Preparing environment 4 46 0.9 % No
Getting source from Git repository 89 135 20.3 % No
Restoring cache 124 259 28.3 % Yes
Downloading artifacts 8 267 1.8 % Yes
yarn install 20 - - Yes
yarn node scripts/frontend/merge_coverage_frontend.js 5 - - Maybe
Running before_script and script 46 313 10.5 % Yes
Running after_script 2 315 0.4 % Yes
Saving cache 113 428 25.7% Yes
Uploading artifacts for failed job 10 438 2.2  % Yes

coverage-frontend duration is 7 minutes 18 seconds.

After change

Reference job: https://gitlab.com/gitlab-org/gitlab/-/jobs/552755732

Section Duration (seconds) Cumulative duration (seconds) % of total Can be improved at the job level?
Preparing the "docker+machine" executor 10 (-32) 10 6.7 % No
Preparing environment 1 (-3) 11 0.6 % No
Getting source from Git repository 59 (-30) 70 39.8 % No
Restoring cache 50 (-74) 120 33.7 % Yes
Downloading artifacts 7 (-1) 127 4.7 % Yes
yarn install 1 (-19) - - Yes
yarn node scripts/frontend/merge_coverage_frontend.js 4 (-1) - - Maybe
Running before_script and script 7 (-39) 134 4.7 % Yes
Running after_script 2 (-0) 136 1.3 % Yes
Saving cache 2 (-111) 138 1.3% Yes
Uploading artifacts for failed job 10 (-0) 148 2.2  % Yes

coverage-frontend duration is 2 minutes 28 seconds (66% faster). 🚀

Closes #217751 (closed)

Edited by Rémy Coutable

Merge request reports