Fix default branch protection settings
What does this MR do and why?
Fix default branch protection settings
This commit fixes default branch protection settings via background migration
In previous branch protection backfill migration !136181 (merged), nil values were considered as no protection setting instead these settings should have been considered as empty hash {} so that a group with empty settings would inherit application setting's branch protection.
Fixes: #462164 (closed)
Changelog: fixed
Migration Logs
main: == [advisory_lock_connection] object_id: 125520, pg_backend_pid: 64771
main: == 20240516160731 QueueBackfillDefaultBranchProtectionSettings: migrating =====
main: == 20240516160731 QueueBackfillDefaultBranchProtectionSettings: migrated (0.0545s)
main: == [advisory_lock_connection] object_id: 125520, pg_backend_pid: 64771
ci: == [advisory_lock_connection] object_id: 125860, pg_backend_pid: 64773
ci: == 20240516160731 QueueBackfillDefaultBranchProtectionSettings: migrating =====
ci: -- The migration is skipped since it modifies the schemas: [:gitlab_main].
ci: -- This database can only apply migrations in one of the following schemas: [:gitlab_ci, :gitlab_internal, :gitlab_shared].
ci: == 20240516160731 QueueBackfillDefaultBranchProtectionSettings: migrated (0.0082s)
ci: == [advisory_lock_connection] object_id: 125860, pg_backend_pid: 64773
Edited by Harsimar Sandhu