Skip to content

ci: Extract assets 'tmp/cache' to a separate native cache

What does this MR do and why?

This is to ensure that the component caching mechanism doesn't store these files. These files aren't compiled assets, and can be reused partially if present so, it's ok to use native cache for those.

This should reduce the size of the assets packages, from 218MB to 171MB, see the following screenshot of the same package with or without tmp/cache: Screen_Shot_2022-10-04_at_22.45.06

This extraction from the main native assets cache is needed in the case we want to stop using this main native assets cache in the future.

This will also save approximately 1 minute and 28 seconds, even for MRs that touches frontend files. 🎉

Testing matrix

Assets cache (via package) Assets tmp cache Job Timing Notes
Absent Absent https://gitlab.com/gitlab-org/gitlab/-/jobs/3126952898 7m 34s
Absent Present https://gitlab.com/gitlab-org/gitlab/-/jobs/3127113730 6m 6s We save 1 minute and 28 seconds by having a fresh tmp/cache! 🚀
Fresh (cache job: https://gitlab.com/gitlab-org/gitlab/-/jobs/3127195842) Absent https://gitlab.com/gitlab-org/gitlab/-/jobs/3127287482 2m 36s This doesn't change much since assets are already compiled, we skip compilation anyway.
Fresh (cache job: https://gitlab.com/gitlab-org/gitlab/-/jobs/3127195842) Present (cache job: https://gitlab.com/gitlab-org/gitlab/-/jobs/3127014412) https://gitlab.com/gitlab-org/gitlab/-/jobs/3127235289 2m 20s This doesn't change much since assets are already compiled, we skip compilation anyway.

MR acceptance checklist

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

Related to #375485 (closed).

Edited by David Dieulivol

Merge request reports

Loading