Feature flag rollout: log_merged_mr_approval_deletion

Summary

This issue tracks the rollout of the log_merged_mr_approval_deletion feature flag introduced in !217440.

This feature flag enables observational logging when approval deletion is attempted on merged or locked (merge in progress) merge requests. This is part of the investigation for #557028 where approvals are going missing on merged MRs.

Owners

  • Team: Code Review
  • Slack channel: #g_code_review
  • Feature flag issue owner: @marc_shaw

The Rollout Plan

Rollout Steps

  • Enable on staging
  • Test on staging
  • Ensure that logging is working correctly in Kibana
  • Enable on GitLab.com for a subset of projects/groups
  • Enable on GitLab.com globally
  • Monitor logs for any approval deletion attempts on merged/locked MRs
  • Analyze collected data to understand the root cause of #557028

Rollback Steps

  • Disable the feature flag

What does the feature flag control?

When enabled, this feature flag logs a warning message whenever approval deletion is attempted on a merged or locked merge request. The logging includes:

  • Source of the deletion attempt
  • Cause (if provided)
  • Merge request ID and IID
  • Merge request state
  • Project ID
  • Current user ID

The logging is added in the following locations:

  • MergeRequests::RemoveApprovalService
  • EE::MergeRequests::BaseService#delete_approvals
  • MergeRequests::ResetApprovalsService#perform_code_owner_approval_deletion
  • API::MergeRequestApprovals#reset_approvals

Feature flag type

This is a development feature flag used for observational/debugging purposes.

  • Introducing MR: !217440
  • Related issue: #557028
Edited by 🤖 GitLab Bot 🤖