Skip to content

Make Vulnerabilities::ProcessArchivedEventsWorker compatible with group archival

Problem

The Vulnerabilities::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 vulnerability data for those projects.

This is part of the broader issue tracked in epic &19492.

Implementation plan

  1. Publish GroupArchivedEvent when archiving or un... (!208364 - merged)
  2. Update vulnerability and counts on group archived (!208313 - merged)
  3. Postgres Backfill:
    1. For every group G that is archived that has vulnerabilities:
      1. For every project P in G:
        1. Archive the vulnerabilities in G.
      2. Recalculate the namespace statistics for G and ancestors.
  4. Resync with Elasticsearch.
    1. Either reindex the vulnerability dataset, unless we can only reindex the vulnerabilities in the affected groups.
Edited by Ryan Wells