MR 6: EE Approval Services Split - Extract approval handling from RefreshService
Overview
As part of the RefreshService split initiative (Epic #19377 (closed)), we need to extract EE-specific approval handling functionality into its own dedicated service and worker.
Scope
This issue covers MR 6 from the split plan:
Files to Create/Modify:
ee/app/services/merge_requests/refresh/approval_service.rbee/app/workers/merge_requests/refresh/approval_worker.rb
Context
This covers EE-specific approval functionality that should be implemented after the CE foundation is solid. The approval service will handle merge request approval-related operations during refresh cycles.
Requirements
-
Create EE Approval Service
- Extract approval-related logic from the main RefreshService
- Implement EE-specific approval workflows
- Ensure proper error handling and logging
- Maintain compatibility with existing approval rules
-
Create Approval Worker
- Implement worker to handle approval operations asynchronously
- Set appropriate urgency level for EE functionality
- Include proper job scheduling and retry logic
- Handle EE license validation
-
Integration
- Ensure the service integrates with the event-based architecture
- Subscribe to
MergeRequestPreparedEventwhen ready - Maintain backward compatibility during transition
- Ensure proper EE/CE separation
Dependencies
- Depends on MR 1 (Foundation - Event and Base Service) -
✅ Completed - Should be implemented after MR 5 (Webhooks Service Split)
- Requires EE license functionality
Acceptance Criteria
-
EE Approval service extracts all approval-related logic from RefreshService -
Approval worker handles approval operations asynchronously -
All existing EE approval functionality continues to work -
Proper EE/CE separation is maintained -
Tests cover the new service and worker (including EE-specific tests) -
Performance impact is measured and acceptable -
EE documentation is updated if needed
Related
- Epic: &19377
- Investigation: #554081 (closed)
- Foundation MR: !201589 (merged)
Edited by 🤖 GitLab Bot 🤖