Replacing AuditEventService with Gitlab::Audit::Auditor
What does this MR do and why?
- Replacing
AuditEventService
withGitlab::Audit::Auditor
. Added event typeinactive_project_scheduled_for_deletion
. - Streaming events will have the event type as
inactive_project_scheduled_for_deletion
instead ofaudit_operation
being sent previously.
DB diff
target_details
changed from project's path to project's name. For the above it changed from 'shanika/gitlab-shell' to 'GitLab Shell'.
Before
-[ RECORD 1 ]--+-------------------------------------------------------------------------------------
id | 813
author_id | 52
entity_id | 18
entity_type | Project
details | --- +
| :custom_message: Project is scheduled to be deleted on 2023-10-01 due to inactivity.+
| :author_name: GitLab Admin Bot +
| :target_id: 18 +
| :target_type: Project +
| :target_details: shanika/gitlab-shell +
| :ip_address: +
| :entity_path: shanika/gitlab-shell +
|
ip_address |
author_name | GitLab Admin Bot
entity_path | shanika/gitlab-shell
target_details | shanika/gitlab-shell
created_at | 2023-09-01 13:47:44.137986
target_type | Project
target_id | 18
After
-[ RECORD 1 ]--+-------------------------------------------------------------------------------------
id | 827
author_id | 52
entity_id | 18
entity_type | Project
details | --- +
| :author_name: GitLab Admin Bot +
| :author_class: User +
| :target_id: 18 +
| :target_type: Project +
| :target_details: Gitlab Shell +
| :custom_message: Project is scheduled to be deleted on 2023-10-01 due to inactivity.+
| :ip_address: +
| :entity_path: shanika/gitlab-shell +
|
ip_address |
author_name | GitLab Admin Bot
entity_path | shanika/gitlab-shell
target_details | Gitlab Shell
created_at | 2023-09-01 13:52:53.141392
target_type | Project
target_id | 18
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Enable inactive project deletion feature.
- Run the cron manually using the sidekiq admin dashboard.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #423263 (closed)
Edited by Huzaifa Iftikhar