Skip to content

Simplify db:check-schema CI job

What does this MR do and why?

The db:check-schema CI job times increases over time as more migrations are introduced to GitLab, and the job applies the migrations there times in a row for the main, ci, and sec databases. There are also multiple flavors of this job:

  1. db:check-schema-single-db (DECOMPOSED_DB=false)
  2. db:check-schema-single-db-ci-connection (DECOMPOSED_DB=false, CI_CONNECTION_DB=true)
  3. db:check-schema-single-db-sec-connection (DECOMPOSED_DB=false, SEC_CONNECTION_DB=true)

This appears to be overkill because the CI job runs the migrations against an empty database, and all migrations are applied to all databases in the same way. As a result, we should expect the same result when running rake db:migrate:main and rake db:migrate:ci, except which PostgreSQL database was modified.

The job appears to be focused on validating that migrations have properly formatted timestamps and checksums, not on validating the details of the migrations.

We can simplify and save CI minutes by using a single database configuration and removing the other flavors.

Relates to #503221

References

Screenshots or screen recordings

Before After

How to set up and validate locally

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Stan Hu

Merge request reports

Loading