From 1e2fa09608afdc4082e86f4be0575d094c44ef4f Mon Sep 17 00:00:00 2001 From: gdk Date: Thu, 18 Sep 2025 23:22:07 +0000 Subject: [PATCH] Finalize BBM BackfillUserDetailOnboardingUrl This migration was finished at `2025-07-03 12:02:06 UTC`, you can confirm the status using our [batched background migration chatops commands](https://docs.gitlab.com/ee/development/database/batched_background_migrations.html#monitor-the-progress-and-status-of-a-batched-background-migration). To confirm it is finished you can run: ``` /chatops run batched_background_migrations status 2000988 --database main ``` The last time this background migration was triggered was in [db/post_migrate/20250624002740_queue_backfill_user_detail_onboarding_url.rb](https://gitlab.com/gitlab-org/gitlab/-/blob/master/db/post_migrate/20250624002740_queue_backfill_user_detail_onboarding_url.rb) You can read more about the process for finalizing batched background migrations in https://docs.gitlab.com/ee/development/database/batched_background_migrations.html . As part of our process we want to ensure all batched background migrations have had at least one [required stop](https://docs.gitlab.com/ee/development/database/required_stops.html) to process the migration. Therefore we can finalize any batched background migration that was added before the last required stop. This change was generated by [gitlab-housekeeper](https://gitlab.com/gitlab-org/gitlab/-/tree/master/gems/gitlab-housekeeper) in [CI](https://ops.gitlab.net/gitlab-com/database-team/gitlab-com-database-testing/-/jobs/20351985) using the `Keeps::OverdueFinalizeBackgroundMigration` keep. To provide feedback on your experience with `gitlab-housekeeper` please create an issue with the label ~"GitLab Housekeeper" and consider pinging the author of this keep. Changelog: other --- .../backfill_user_detail_onboarding_url.yml | 2 +- ..._hk_backfill_user_detail_onboarding_url.rb | 21 +++++++++++++++++++ db/schema_migrations/20250918232145 | 1 + 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 db/post_migrate/20250918232145_finalize_hk_backfill_user_detail_onboarding_url.rb create mode 100644 db/schema_migrations/20250918232145 diff --git a/db/docs/batched_background_migrations/backfill_user_detail_onboarding_url.yml b/db/docs/batched_background_migrations/backfill_user_detail_onboarding_url.yml index c133e9125d898b..c34b7c6f2baaaf 100644 --- a/db/docs/batched_background_migrations/backfill_user_detail_onboarding_url.yml +++ b/db/docs/batched_background_migrations/backfill_user_detail_onboarding_url.yml @@ -5,4 +5,4 @@ feature_category: onboarding introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/195542 milestone: '18.2' queued_migration_version: 20250624002740 -finalized_by: # version of the migration that finalized this BBM +finalized_by: '20250918232145' diff --git a/db/post_migrate/20250918232145_finalize_hk_backfill_user_detail_onboarding_url.rb b/db/post_migrate/20250918232145_finalize_hk_backfill_user_detail_onboarding_url.rb new file mode 100644 index 00000000000000..442d9fdaf9b5d8 --- /dev/null +++ b/db/post_migrate/20250918232145_finalize_hk_backfill_user_detail_onboarding_url.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +class FinalizeHkBackfillUserDetailOnboardingUrl < Gitlab::Database::Migration[2.3] + milestone '18.5' + + disable_ddl_transaction! + + restrict_gitlab_migration gitlab_schema: :gitlab_main + + def up + ensure_batched_background_migration_is_finished( + job_class_name: 'BackfillUserDetailOnboardingUrl', + table_name: :user_details, + column_name: :user_id, + job_arguments: [], + finalize: true + ) + end + + def down; end +end diff --git a/db/schema_migrations/20250918232145 b/db/schema_migrations/20250918232145 new file mode 100644 index 00000000000000..52ab437a65685a --- /dev/null +++ b/db/schema_migrations/20250918232145 @@ -0,0 +1 @@ +c9c668296338bd5e7aa3267b3c015782b62ce6e7e4f8a6420be853defdcc9787 \ No newline at end of file -- GitLab