Skip to content

Run migrations tests in dedicated jobs

Rémy Coutable requested to merge run-migrations-tests-in-dedicated-jobs into master

What does this MR do?

  1. This makes the migration tests run in dedicated jobs instead of being spread among the unit test jobs.
  2. If any table has more than 1200 columns (including the dropped ones), we drop and re-create the database. Note that we only do that in config.append_after(:context, :migration) because that's in these kind of tests that the problem occurs.

Does this MR meet the acceptance criteria?

This seems to work pretty well (e.g. https://gitlab.com/gitlab-org/gitlab/-/jobs/364075812):

2227 The application_settings has 1246 columns.
2228 Recreating the database to reset the 'application_settings' columns count
2229 Dropped database 'gitlabhq_test'
2230 Created database 'gitlabhq_test'
[...]
3723 Schema re-creation done in 4.23490946999982

Conformity

Closes #36715 (closed), #37417 (closed).

Edited by Rémy Coutable

Merge request reports