From c04058f0ee1d34142e247034a9a857c5b9cd5ed8 Mon Sep 17 00:00:00 2001 From: gdk Date: Sun, 14 Sep 2025 23:23:44 +0000 Subject: [PATCH] Finalize BBM BackfillGoogleGroupAuditEventDestinationsFixed This migration was finished at `2025-04-23 09:47: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 2000933 --database main ``` The last time this background migration was triggered was in [db/post_migrate/20250403155756_queue_backfill_google_group_audit_event_destinations_fixed.rb](https://gitlab.com/gitlab-org/gitlab/-/blob/master/db/post_migrate/20250403155756_queue_backfill_google_group_audit_event_destinations_fixed.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/20265940) 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 --- ...e_group_audit_event_destinations_fixed.yml | 2 +- ...le_group_audit_event_destinations_fixed.rb | 21 +++++++++++++++++++ db/schema_migrations/20250914232332 | 1 + 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 db/post_migrate/20250914232332_finalize_hk_backfill_google_group_audit_event_destinations_fixed.rb create mode 100644 db/schema_migrations/20250914232332 diff --git a/db/docs/batched_background_migrations/backfill_google_group_audit_event_destinations_fixed.yml b/db/docs/batched_background_migrations/backfill_google_group_audit_event_destinations_fixed.yml index 928c4fa5c3c33b..572d13eb268ca8 100644 --- a/db/docs/batched_background_migrations/backfill_google_group_audit_event_destinations_fixed.yml +++ b/db/docs/batched_background_migrations/backfill_google_group_audit_event_destinations_fixed.yml @@ -5,4 +5,4 @@ feature_category: audit_events introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/186866 milestone: '18.0' queued_migration_version: 20250403155756 -finalized_by: # version of the migration that finalized this BBM +finalized_by: '20250914232332' diff --git a/db/post_migrate/20250914232332_finalize_hk_backfill_google_group_audit_event_destinations_fixed.rb b/db/post_migrate/20250914232332_finalize_hk_backfill_google_group_audit_event_destinations_fixed.rb new file mode 100644 index 00000000000000..3399a47e0585b4 --- /dev/null +++ b/db/post_migrate/20250914232332_finalize_hk_backfill_google_group_audit_event_destinations_fixed.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +class FinalizeHkBackfillGoogleGroupAuditEventDestinationsFixed < Gitlab::Database::Migration[2.3] + milestone '18.4' + + disable_ddl_transaction! + + restrict_gitlab_migration gitlab_schema: :gitlab_main + + def up + ensure_batched_background_migration_is_finished( + job_class_name: 'BackfillGoogleGroupAuditEventDestinationsFixed', + table_name: :audit_events_google_cloud_logging_configurations, + column_name: :id, + job_arguments: [], + finalize: true + ) + end + + def down; end +end diff --git a/db/schema_migrations/20250914232332 b/db/schema_migrations/20250914232332 new file mode 100644 index 00000000000000..376e17c3ea0bde --- /dev/null +++ b/db/schema_migrations/20250914232332 @@ -0,0 +1 @@ +746a3db5c2b61af1f30248098ac1f75f7cf6b44b31cfb92bdf4752da9773c359 \ No newline at end of file -- GitLab