Skip to content

Convert redis counts for group::compliance

Michał Wielich requested to merge michw-migrate-audit-events into master

What does this MR do and why?

Related to #448289 (closed)

This migrates the counts.delete_epic, counts.delete_issue, counts.delete_merge_request, counts.delete_work_item total count metric to Internal Events, while keeping the original Redis key. Instead of migrating the key to the new format in TotalCountMetric, the new key is aliased in a YAML file and points to the old one, so that the count continues in the old key and we can keep the past count.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

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

  1. Checkout master and fire the event a few times (by first creating an audit event streaming destination and then deleting an issue, an epic, a task and a MR).
  2. Run in console and note the value:
Gitlab::Usage::ServicePing::InstrumentedPayload.new(%w[counts.delete_epic counts.delete_issue counts.delete_merge_request counts.delete_work_item], :with_instrumentation).build
  1. Checkout MR branch, reload! the console and run the previous point's code in the console again. The value should be identical.
  2. Fire the event a few more times and make sure that the value got incremented.
Edited by Michał Wielich

Merge request reports