Skip to content

[Experiment] Automatically skip flaky tests

Spin-off of https://gitlab.com/gitlab-org/quality/team-tasks/-/issues/865.

Given that flaky tests are unreliable, and that we have a report of flaky tests, we could just skip them automatically.

Timeframe

  • 14 days - from 2021-12-01 to 2021-12-15

Expected results

Risks

  • Running less tests theoretically increases the chance to miss regressions, but given we only have 175 flaky tests tracked and our total number of tests is 159,590, it would only skip 0.1% of all our tests
  • It could happen that master broken notifications wouldn't go down as flaky tests that we tracked are tests that end up passing on second or third try, so they might not end up actually breaking pipelines due to that

MR

Communication

  • Add an item in the upcoming Eng. Week in Review
  • 2021-11-08 Communicate in #development
  • 2021-11-16 Communicate in #development
  • 2021-12-01 Communicate in #development

How to enable

See https://docs.gitlab.com/ee/development/pipelines.html#flaky-tests.

Set the $SKIP_FLAKY_TESTS_AUTOMATICALLY variable to true.

How to disable

See https://docs.gitlab.com/ee/development/pipelines.html#flaky-tests.

  • In an MR: set the pipeline:run-flaky-tests label
  • Globally: remove the $SKIP_FLAKY_TESTS_AUTOMATICALLY variable (or set it to something different than true)
Edited by Rémy Coutable