Fix audit event streaming to AWS S3 from new tables
What does this MR do and why?
- Fix audit event streaming to AWS S3 from new tables
- The root cause is that the new tables (
user_audit_events,project_audit_events,group_audit_eventsandinstance_audit_events) don't have anentity_typecolumn but we're trying to readaudit_event['entity_type']which is alwaysnil. - This MR updates the code to fetch the
entity_typefrompayloadinstead of usingaudit_event. - Closes #567249 (closed)
References
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
- Ensure you have GitLab Ultimate license
- Enable the following feature flags
stream_audit_events_from_new_tablesaudit_events_external_destination_streamer_consolidation_refactor- Setup AWS S3 streaming destination following the instructions from this demo video.
- Make any actions that would generate an audit example, for example changing Merge request approval settings.
- Verify that the audit event is streamed to AWS S3.
- Also follow steps 4 and 5 after disabling
audit_events_external_destination_streamer_consolidation_refactor, the streaming should still happen successfully.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.