Introduced in GitLab 14.2.
Migration testing is enabled in the GitLab project
for changes that add a new database migration. Trigger this job manually by running the
db:gitlabcom-database-testing job within in
test stage. To avoid wasting resources,
only run this job when your MR is ready for review.
The job starts a pipeline on the ops GitLab instance. For security reasons, access to the pipeline is restricted to database maintainers.
When the pipeline starts, a bot notifies you with a comment in the merge request. When it finishes, the comment gets updated with the test results. There are three sections which are described below.
The first section of the comment contains a summary of the test results, including:
|Warnings||Highlights critical issues such as exceptions or long-running queries.|
|Migrations||The time each migration took to complete, whether it was successful, and the increment in the size of the database.|
|Runtime histogram||Expand this section to see a histogram of query runtimes across all migrations.|
The next section of the comment contains detailed information for each migration, including:
|Details||The type of migration, total duration, and database size change.|
|Queries||Every query executed during the migration, along with the number of calls, timings, and the number of the changed rows.|
|Runtime histogram||Indicates the distribution of query times for the migration.|
Some additional information is included at the bottom of the comment:
|Migrations pending on GitLab.com||A summary of migrations not deployed yet to GitLab.com. This information is useful when testing a migration that was merged but not deployed yet.|
|Clone details||A link to the |
|Artifacts||A link to the pipeline’s artifacts. Full query logs for each migration (ending in |