From ee856689481862ebecbb1cd2852b3479e8cc8576 Mon Sep 17 00:00:00 2001 From: Norman Ziegner Date: Fri, 28 Nov 2025 12:55:15 +0100 Subject: [PATCH] gitlab: fix check for batched background migrations The Gitlab::BackgroundMigration.remaining method that was used in earlier versions to check for pending background migrations has been removed. Replace the deprecated method with the new batched background migrations API. It returns `0` when all background migrations are complete. Signed-off-by: Norman Ziegner --- roles/gitlab/tasks/install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/gitlab/tasks/install.yml b/roles/gitlab/tasks/install.yml index 388402c3..ac23f6c7 100644 --- a/roles/gitlab/tasks/install.yml +++ b/roles/gitlab/tasks/install.yml @@ -133,7 +133,7 @@ - name: "Wait until all previous background migrations are processed." become: true ansible.builtin.command: - cmd: "gitlab-rails runner -e production 'puts Gitlab::BackgroundMigration.remaining'" + cmd: "gitlab-rails runner -e production 'puts Gitlab::Database::BackgroundMigration::BatchedMigration.queued.count'" register: "remaining" until: "remaining.stdout == '0'" retries: 10