Skip to content

Only run sampling for batched background migrations for the current MR

What does this MR do and why?

Solves gitlab-org/database-team/gitlab-com-database-testing#73 (closed)

Before, batched background migration sampling was executed for other migrations that were merged within the last 3 hours. Now, batched background migrations only sample the migrations that were introduced in the current MR.

When migrations are triggered, the last BatchedBackgroundMigration#id is stored in a file as a new artifact in the pipeline. During migration sampling, this id is used to fetch the proper migrations for sampling.

This new artifact is generated to store the last BatchedBackgroundMigration#id

Screenshots or screen recordings

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

diagram

How to set up and validate locally

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

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 Leonardo da Rosa

Merge request reports