Make Security::AnalyzersStatus::ProcessArchivedEventsWorker compatible with group archival
Problem
The Security::AnalyzersStatus::ProcessArchivedEventsWorker
currently subscribes to ProjectArchivedEvent
but doesn't handle group archival scenarios. When a group is archived, all projects within it are effectively archived, but the worker doesn't receive the appropriate events to process security analyzer status for those projects.
This is part of the broader issue tracked in epic &19492.
Solution
We need to ensure that Security::AnalyzersStatus::ProcessArchivedEventsWorker
handles group archival by either:
-
Creating a new subscriber for
GroupArchivedEvent
(recommended approach) - Create a new worker or extend the existing one to also subscribe toGroupArchivedEvent
and process all projects within the archived group. -
Making the existing worker handle both events - Modify the current subscriber to handle both
ProjectArchivedEvent
andGroupArchivedEvent
, though this may make the code more complex to maintain.
Acceptance Criteria
-
Analyze the current Security::AnalyzersStatus::ProcessArchivedEventsWorker
implementation -
Determine the best approach (new subscriber vs extending existing) -
Implement the chosen solution to handle group archival -
Ensure security analyzer status is properly processed when groups are archived -
Add appropriate tests for the new functionality -
Verify that downstream security analyzer services remain consistent when groups are archived
Related
- Epic: &19492
- Worker location:
app/workers/security/analyzers_status/process_archived_events_worker.rb