Skip to content

Make selective jobs run in parallel when QA_TESTS contain folders

Sanad Liaquat requested to merge qa-shl-test-parallel-selective-jobs into master

What does this MR do and why?

Adds the ability to run selective end-to-end tests in parallel using knapsack. This is required when running selective tests based on DevOps stage labels for stages that have lots of e2e tests such as devopscreate

Notable changes:

  • Add separate *-selective-parallel jobs. Existing *-selective jobs will continue to be non-parallel.
  • When QA_TESTS has files included (_spec), use non-parallel selective jobs.
  • When QA_TESTS has folders included, use use parallel selective jobs by setting KNAPSACK_TEST_FILE_PATTERN.
  • Create knapsack reports for *-selective-parallel jobs from existing jobs to avoid falling back to master_report.json resulting in better parallelisation.

This is a prerequisite for: gitlab-org/quality/quality-engineering/team-tasks#1472

Related KR: https://gitlab.com/gitlab-com/gitlab-OKRs/-/work_items/2295

Screenshots or screen recordings

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

How to set up and validate locally

This cannot be validated locally. I have tested and linked the most important scenarios on CI. See: !120269 (comment 1393851990)

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