Fetch repo from artifacts for RSpec jobs
What does this MR do and why?
Fetch repo from artifacts for RSpec jobs. This means we no longer clone the repo for RSpec jobs. The intention for this is to reduce Gitaly load to avoid overloading Gitaly. See: https://gitlab.com/gitlab-org/quality/engineering-productivity/team/-/issues/336#note_1684949431
The artifacts are about 280M based on https://gitlab.com/gitlab-org/gitlab/-/jobs/5794861082/artifacts/browse
Note for merging
Please don't squash this merge request so we have a commit we can easily revert to enable/disable this behaviour with minimal changes: !140330 (dbc60bbc)
Time difference:
- This merge request (artifacts): artifacts 33s: https://gitlab.com/gitlab-org/gitlab/-/jobs/5794861643
- Default branch (clone): Cloning 27s + artifacts 21s => 48s: https://gitlab.com/gitlab-org/gitlab/-/jobs/5793499371
Saved 15s (45% improvement)
Critical paths:
-
clone-gitlab-repo
took 57s: https://gitlab.com/gitlab-org/gitlab/-/jobs/5794861082 -
setup-test-env
does not needclone-gitlab-repo
and still clones because we want to run it as soon as possible, instead of waiting forclone-gitlab-repo
. It's only one job anyway. All RSpec jobs already need to wait forsetup-test-env
which runs slower thanclone-gitlab-repo
, meaning that there is no extra waiting.
Conclusion: Critical paths should remain the same.
Validation
- Clone nothing and fetch from artifacts: https://gitlab.com/gitlab-org/gitlab/-/jobs/5794861643
- Revert !140330 (dbc60bbc) to switch back to cloning: https://gitlab.com/gitlab-org/gitlab/-/jobs/5794761933
Edited by Lin Jen-Shin