From 6251c0aac38aa0fb95eb0ea33ab5f6732efe175a Mon Sep 17 00:00:00 2001 From: gdk Date: Tue, 2 Sep 2025 23:20:58 +0000 Subject: [PATCH] Finalize BBM BackfillAmazonInstanceAuditEventDestinationsFixed This migration was finished at `2025-04-23 09:30:11 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 2000932 --database main ``` The last time this background migration was triggered was in [db/post_migrate/20250403155743_queue_backfill_amazon_instance_audit_event_destinations_fixed.rb](https://gitlab.com/gitlab-org/gitlab/-/blob/master/db/post_migrate/20250403155743_queue_backfill_amazon_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/20072891) 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 --- ...nstance_audit_event_destinations_fixed.yml | 2 +- ...instance_audit_event_destinations_fixed.rb | 21 +++++++++++++++++++ db/schema_migrations/20250902232045 | 1 + 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 db/post_migrate/20250902232045_finalize_hk_backfill_amazon_instance_audit_event_destinations_fixed.rb create mode 100644 db/schema_migrations/20250902232045 diff --git a/db/docs/batched_background_migrations/backfill_amazon_instance_audit_event_destinations_fixed.yml b/db/docs/batched_background_migrations/backfill_amazon_instance_audit_event_destinations_fixed.yml index c59cabf0a648a2..b06d67641aa67b 100644 --- a/db/docs/batched_background_migrations/backfill_amazon_instance_audit_event_destinations_fixed.yml +++ b/db/docs/batched_background_migrations/backfill_amazon_instance_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: 20250403155743 -finalized_by: # version of the migration that finalized this BBM +finalized_by: '20250902232045' diff --git a/db/post_migrate/20250902232045_finalize_hk_backfill_amazon_instance_audit_event_destinations_fixed.rb b/db/post_migrate/20250902232045_finalize_hk_backfill_amazon_instance_audit_event_destinations_fixed.rb new file mode 100644 index 00000000000000..17bb07ebc3381d --- /dev/null +++ b/db/post_migrate/20250902232045_finalize_hk_backfill_amazon_instance_audit_event_destinations_fixed.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +class FinalizeHkBackfillAmazonInstanceAuditEventDestinationsFixed < 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: 'BackfillAmazonInstanceAuditEventDestinationsFixed', + table_name: :audit_events_instance_amazon_s3_configurations, + column_name: :id, + job_arguments: [], + finalize: true + ) + end + + def down; end +end diff --git a/db/schema_migrations/20250902232045 b/db/schema_migrations/20250902232045 new file mode 100644 index 00000000000000..7d8be5398e4db7 --- /dev/null +++ b/db/schema_migrations/20250902232045 @@ -0,0 +1 @@ +232715c4b4ded54ad71518744c987992f839b3c2658e27b39b5e54e5600c2252 \ No newline at end of file -- GitLab