Skip to content

Generalize code suggestion events worker

Pavel Shutsin requested to merge 461832-followup-cleanup into master

What does this MR do and why?

Now it can handle transition periods where new release contains new set of fields while current queue contains old set of fields

No user facing changes here.

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.

How to set up and validate locally

  1. Trigger new Code Suggestion event with Gitlab::Tracking::AiTracking.track_event('code_suggestions_requested', user: current_user)
  2. Trigger job with ClickHouse::CodeSuggestionEventsCronWorker.new.perform
  3. Verify that data is saved with: ClickHouse::Connection.new(:main).select('SELECT * FROM code_suggestion_usages FINAL ORDER BY timestamp DESC')

Numbered steps to set up and validate the change are strongly suggested.

Related to #461832 (closed)

Edited by Pavel Shutsin

Merge request reports