[go: up one dir, main page]

Update usage data seed to use new unified model.

What does this MR do and why?

This code change simplifies and consolidates how AI usage statistics are generated for development testing. The original code created separate tracking events for different AI features (code suggestions, chat, troubleshooting) using different event types and repetitive code. The updated version removes the code push events entirely and creates a single reusable method that handles all AI event creation in a consistent way, reducing code duplication and making it easier to maintain. The functionality remains the same - it still generates sample data for testing AI features - but the code is now cleaner and more organized.

How to set up and validate locally

  1. run the seed with PROJECT_ID=your_project_id FILTER=ai_usage_stats bundle exec rake db:seed_fu
  2. On Rails console check if records on Ai::UsageEvent are created as expected

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.

Merge request reports

Loading