Skip to content

WIP: Test rspec impact `!41081` on backend changes

Albert Salim requested to merge caalberts-test-rspec-impact-backend into master

What does this MR do?

Compare failed pipeline on backend change !41258 with and without rspec impact.

Without rspec impact

With rspec impact

Approximate runner time saved in this example, taking into account parallel job counts [formula: parallel count * (full job duration - cancelled job duration)]:

  • rspec unit: 20 * (20:35 - 14:57) ~ approx 110 minutes
  • rspec integration: 8 * (22:22 - 14:54) ~ approx 56 minutes
  • rspec system: 24 * (16:55 - 14:52) ~ approx 48 minutes
  • rspec-ee unit: 10 * (18:28 - 14:42) ~ approx 35 minutes
  • rspec-ee integration: 4 * (14:29 - 14:54) ~ approx 0 minutes
  • rspec-ee system: 6 * (16:11 - 14:40) ~ approx 6 minutes
  • frontend-fixtures: 1 * (16:31 - 14:59) ~ approx 1 minute
  • jest: 4 * (16:49 - 00:00) ~ approx 67 minutes
  • jest-integration: 1 * (5:23 - 00:00) ~ approx 5 minutes
  • karma: 1 * (5:17 - 00:00) ~ approx 5 minutes

Total approx runner time savings: 333 minutes

Caveat: This analysis excludes additional potential savings from geo, as-if-foss, pg 12 jobs and other miscellaneous jobs such as coverage, metadata.

Summary findings

For a 11-file change backend MR:

  • Total wall time savings: approx 18 minutes
  • Total runner time savings: approx 333 minutes

Overall runner time saved is a function of:

  1. Duration of rspec-impact job: The quicker rspec-impact job completes (and fails), the earlier the pipeline and other jobs are cancelled
    • This in turn is a function of number of backend files changed in the MR
  2. Number of parallelism of various jobs. This has 2-sided effect:
    • The higher the parallel count, the higher the saving due to multiplication effect. BUT
    • The more parallel count we have, the quicker each individual job is, and might complete before rspec-impact, negating the effect of the short circuit.

Notes:

number of parallel tests:

.rspec-unit-parallel:
  parallel: 20
.rspec-ee-unit-parallel:
  parallel: 10
.rspec-integration-parallel:
  parallel: 8
.rspec-ee-integration-parallel:
  parallel: 4
.rspec-system-parallel:
  parallel: 24
.rspec-ee-system-parallel:
  parallel: 6
jest:
  parallel: 4
Edited by Albert Salim

Merge request reports