Skip to content

Raise an exception when the arguments are incorrect for `ensure_batched_background_migration_is_finished``

When we call the method ensure_batched_background_migration_is_finished with incorrect arguments, the system just logs a warning message and returns the code.

This is bad because during the reviews, if the reviewer misses this, the database testing pipeline will print a succeeded message since nothing failed during the migration.

Related to this incident: !97781 (comment 1109174639)

Code: https://gitlab.com/gitlab-org/gitlab/-/blame/042d48b7d2178ac3108a01f5a9ca03fd003aaf2b/lib/gitlab/database/migration_helpers.rb#L967

Edited by Diogo Frazão