Extract frontend fixture creation from jest & karma
What does this MR do?
This MR extracts frontend test fixture creation from test jobs jest & karma into dedicated jobs.
It creates 2 new jobs in a new fixtures
stage: frontend-fixtures
and frontend-fixtures-foss
. These jobs will create the required fixtures for subsequent frontend test jobs jest
, karma
, jest-foss
and karma-foss
respectively. The fixtures will be passed as artifacts across jobs.
The new fixture
stage happens between prepare
and test
. jest
, karma
, jest-foss
and karma-foss
now depends on the jobs in fixture
stage using DAG. There is no change to existing DAG of other jobs in test
stage, so they will continue to start as soon as their dependencies in prepare
completes.
It also adds new DAGs to jobs in test
that did not have any DAG set up to avoid waiting for fixtures
stage to complete.
What do we get out of this?
Immediate benefits
- reduced duplication of fixture creation, where previously each job creates its own fixtures
- reduced time to completion for
test
stage. Sincejest
is the last job to complete in thetest
stage, we compare the duration from the start of the pipeline (start ofsetup-test-env
) to the end ofjest
job.
pipeline | setup-test-env start time | jest job end time | jest duration | time to test completion | |
---|---|---|---|---|---|
baseline | https://gitlab.com/gitlab-org/gitlab/pipelines/117477945 | Thu Feb 13 05:56:54 | Thu Feb 13 06:44:52 | 42m 02s | ~48 minutes |
with separate fixtures jobs | https://gitlab.com/gitlab-org/gitlab/pipelines/117487307 | Thu Feb 13 06:41:26 | Thu Feb 13 07:21:36 | 15m 11s | ~40 minutes |
Future benefit
- Now that jest and karma jobs purely execute tests, they can now be parallelised to split up the tests, without the overhead of creating fixtures (jest: !25104 (merged))
Does this MR meet the acceptance criteria?
Conformity
- [-] Changelog entry
-
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Part of #34322 (closed)