Add FF to fetch contributions data from new CH tables
What does this MR do and why?
Summary of Changes
This merge request adds support for a new feature flag called fetch_contributions_data_from_new_tables
that allows the system to query data from a new ClickHouse table structure populated by siphon contributions_new
instead of the existing one contributions
. The main changes include:
- Updating the
traversal_path
method to optionally include organization IDs when needed for the new table structure - Modifying all analytics services to conditionally use the new table based on the feature flag status
- Adding logic to dynamically construct SQL queries that target either the old or new tables depending on the feature flag
- Updating tests to verify functionality works with both the old and new table structures
The changes primarily affect analytics features that track contributor data, code suggestions, and AI usage metrics.
References
Part of gitlab-org/analytics-section/siphon#96
Screenshots or screen recordings
Before | After |
---|---|
How to set up and validate locally
fetch_contributions_data_from_new_tables
FF enabled
For TBD - there is no way to test this without setting up Siphon locally. We can test this after data migration happens.
fetch_contributions_data_from_new_tables
FF disabled
For - Check if AI impact dashboard, group contributions report, and GraphQL
AiUsageData
endpoint have normal behavior.
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.
Edited by Felipe Cardozo