From 64a19b242f92de98b92d55e2c4b60800b8368d2a Mon Sep 17 00:00:00 2001 From: gdk Date: Tue, 9 Sep 2025 23:30:10 +0000 Subject: [PATCH] Finalize BBM BackfillGoogleInstanceAuditEventDestinations This migration was finished at `2025-03-21 10:32:15 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 2000900 --database main ``` The last time this background migration was triggered was in [db/post_migrate/20250403155815_queue_backfill_google_instance_audit_event_destinations_fixed.rb](https://gitlab.com/gitlab-org/gitlab/-/blob/master/db/post_migrate/20250403155815_queue_backfill_google_instance_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/20183095) 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 --- ...ogle_instance_audit_event_destinations.yml | 5 +++-- ...oogle_instance_audit_event_destinations.rb | 21 +++++++++++++++++++ db/schema_migrations/20250909232956 | 1 + 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 db/post_migrate/20250909232956_finalize_hk_backfill_google_instance_audit_event_destinations.rb create mode 100644 db/schema_migrations/20250909232956 diff --git a/db/docs/batched_background_migrations/backfill_google_instance_audit_event_destinations.yml b/db/docs/batched_background_migrations/backfill_google_instance_audit_event_destinations.yml index d4c3ee948d40da..3a145198b57045 100644 --- a/db/docs/batched_background_migrations/backfill_google_instance_audit_event_destinations.yml +++ b/db/docs/batched_background_migrations/backfill_google_instance_audit_event_destinations.yml @@ -1,8 +1,9 @@ --- migration_job_name: BackfillGoogleInstanceAuditEventDestinations -description: Backfill the audit_events_instance_google_cloud_logging_configurations table to audit_events_instance_external_streaming_destinations +description: Backfill the audit_events_instance_google_cloud_logging_configurations + table to audit_events_instance_external_streaming_destinations feature_category: audit_events introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/184058 milestone: '17.11' queued_migration_version: 20250310155742 -finalized_by: # version of the migration that finalized this BBM +finalized_by: '20250909232956' diff --git a/db/post_migrate/20250909232956_finalize_hk_backfill_google_instance_audit_event_destinations.rb b/db/post_migrate/20250909232956_finalize_hk_backfill_google_instance_audit_event_destinations.rb new file mode 100644 index 00000000000000..48c13c14ae20fe --- /dev/null +++ b/db/post_migrate/20250909232956_finalize_hk_backfill_google_instance_audit_event_destinations.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +class FinalizeHkBackfillGoogleInstanceAuditEventDestinations < 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: 'BackfillGoogleInstanceAuditEventDestinations', + table_name: :audit_events_instance_google_cloud_logging_configurations, + column_name: :id, + job_arguments: [], + finalize: true + ) + end + + def down; end +end diff --git a/db/schema_migrations/20250909232956 b/db/schema_migrations/20250909232956 new file mode 100644 index 00000000000000..e53b9b2241c725 --- /dev/null +++ b/db/schema_migrations/20250909232956 @@ -0,0 +1 @@ +421f36cad16bc350569da10445c663f234ad78dedbb2158dd0b0314394fb2a1d \ No newline at end of file -- GitLab