Skip to content

Fix sub group audit event streaming

What does this MR do and why?

Streaming audit event is top-level group feature to receive all audit events about the group, its subgroups, and projects as structured JSON. Doc link

Currently there several events not follow the strategy:

  • any event on sub-group
    • sub group create/update/destroy events
    • sub group deploy token create/destroy/revoke events
  • group/project destroy event

fix way

  • for sub-group events
    • change audit_event root_group_entity from entity to entity.root_ancestor
  • for group/project destroy event
    • add instance variables @entity, @root_group_entity and @root_group_entity_id in audit_event model
    • set @entity after entity destroyed
    • pass json format data with root_group_entity_id to AuditEventStreamingWorker

/cc @daveliu

Edited by Linjie Zhang

Merge request reports

Loading