Skip to content

Draft: Add ability to specify no of runs and set 1 percent failure margin

Sanad Liaquat requested to merge qa-shl-update-reliable-report-criteria into master

What does this MR do and why?

As part of gitlab-org/quality/quality-engineering/team-tasks#1918 (closed), we want to tighten the criteria for promoting to reliable tests but at the same time allow a margin for environmental failures.

The following changes have been made (x and y referenced below will be set to 1000 and 180 respectively):

  • For a test to show up under "Candidates for promotion to reliable", it must have less than or equal to 1% failure rate in the past x number of runs. To allow for x number of runs (1000 runs) we will increase the date range to y number days (180 days)
  • For a test to show up under "Reliable specs with failures", it must have more than 1% failure rate in up to x number of runs in the past y number of days. A point note is that "Reliable specs with failures" will have little meaning going forward as any reliable test that starts to fail will be quarantined right away (unless the failure is environmental) as opposed to just removing its :reliable tag. MR to document this change will follow once this is merged.

The thinking behind the 1% figure is that if a test is flaky, it is certainly going to fail more than 10 times in 1000 runs. Any figure less than that will be considered an environmental/unrelated failure.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

From the qa/ directory, run:

GITLAB_ACCESS_TOKEN=<YOUR_PAT> CI_API_V4_URL=https://www.gitlab.com/api/v4/ QA_INFLUXDB_URL=https://influxdb.quality.gitlab.net QA_INFLUXDB_TOKEN=<QA_INFLUXDB_TOKEN_FROM_1P> bundle exec rake "reliable_spec_report[180,1000,false]"

MR acceptance checklist

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

Edited by Sanad Liaquat

Merge request reports

Loading