Refactor approval rules update service to only write v1 or v2 rules
Problem
The current EE::MergeRequests::UpdateService
dual writes v2 approval rules to v1 format when the v2_approval_rules
feature flag is enabled. But we have decided not to pursue a dual write approach for MR level approval rules, so the service should only handle v1 or v2 rules, not both simultaneously.
Current Behavior
When v2_approval_rules
FF is enabled, the service updates rules in both v2 and v1 formats simultaneously
Desired Behavior
Service should update either v1 or v2 based on the v2_approval_rules
feature flag. If it is not possible to support only v2 rules in the update service, or requires very complex conditional logic, we may consider creating a separate update service for v2 rules.
Related
Edited by 🤖 GitLab Bot 🤖