[go: up one dir, main page]

Migrate AiUsageData.codeSuggestionEvents endpoint to the new model

What does this MR do and why?

As part of moving to a single source of truth for AI events. We're migrating to Ai::UsageEvent model for fetching the data.

For DB review, see here

References

Screenshots or screen recordings

Before After

How to set up and validate locally

PROJECT_ID=your_id FILTER=ai_usage_stats bundle exec rake db:seed_fu
  • You may need to bypass permissions:
# Comment out ee/app/graphql/types/analytics/ai_usage/ai_usage_data_type.rb:12 
# Comment out ee/app/finders/ai/usage_events_finder.rb:18
  • Run this GraphQL query
query GetCodeSuggestionEvents($groupFullPath: ID!) {
  group(fullPath: $groupFullPath) {
    aiUsageData {
      codeSuggestionEvents{
        nodes {
          id
          event
          language
          suggestionSize
          uniqueTrackingId
        }
      }
    }
  }	
}

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.

Related to #553191 (closed)

Edited by Amr Taha

Merge request reports

Loading