Amr Taha (dc9f9738) at 20 Mar 09:23
Merge branch 'expose-code-suggestions-ae-to-graphql' into 'master'
... and 1 more commit
Amr Taha (c96c4304) at 20 Mar 09:23
FILTER=ai_usage_stats bundle exec rake db:seed_fu
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Thanks Adam! Approving with two main question
This MR adds the Siphon table configurations for the merge_requests clickhouse table.
You can test the replication with GDK with these instructions: gitlab-development-kit!5842
Related issue: #594122
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Question: Don't we need to have the same setup and the other yml files for replication_targets?
Question: Is awardable_id enough here or do we need to include awardable_type? I think we need the type as well for correct referencing no?
Same question for label_links
@ahegyi Would you mind re-approving? Your approval got lost amid the latest commit pushes
Amr Taha (c14be789) at 20 Mar 08:14
Merge branch 'faleksic-branch-rules-query' into 'master'
... and 1 more commit
Amr Taha (f097f945) at 20 Mar 08:14
The branch rules link to a literal ^All branches$ instead of just showing all branches.
This MR fixes that by removing the query literal.
| Before | After |
|---|---|
The video attached above shows the outcome and how to test.
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Pipeline failuers are false-postiives. Starting a new pipeline and setting auto-merge
@ahegyi I can review this in the next hour or two. Is it WIP or will you assign another reviewer?
Thanks @pshutsin
Three questions from my side with nothing blocker
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
This one is for GitLab Duo Root Cause Analysis Usage by User metric:
SELECT
ch_aggregation_inner_query.aeq_user_id AS aeq_user_id,
toStartOfInterval(ch_aggregation_inner_query.aeq_timestamp, INTERVAL 1 month) AS aeq_timestamp,
COUNT(*) AS aeq_total_count
FROM (
SELECT
ai_usage_events.user_id AS aeq_user_id,
timestamp AS aeq_timestamp,
ai_usage_events.user_id,
ai_usage_events.namespace_path,
ai_usage_events.event,
ai_usage_events.timestamp
FROM ai_usage_events
WHERE
CASE
WHEN event IN (1, 2, 3, 4, 5) THEN 'code_suggestions'
WHEN event IN (6) THEN 'chat'
WHEN event IN (7) THEN 'troubleshoot_job'
WHEN event IN (8, 9, 19, 20, 21, 22) THEN 'agent_platform'
WHEN event IN (10, 11, 12, 13, 14, 15, 16, 17, 18) THEN 'code_review'
WHEN event IN (23, 24) THEN 'mcp'
ELSE NULL
END IN ('troubleshoot_job')
AND ai_usage_events.timestamp >= 1758284081.859363
AND startsWith(namespace_path, '9970/')
GROUP BY ALL
) ch_aggregation_inner_query
GROUP BY ALL
ORDER BY
aeq_timestamp ASC,
aeq_total_count DESC
This one is for Number of unique features used per user
SELECT
ch_aggregation_inner_query.aeq_user_id AS aeq_user_id,
toStartOfInterval(ch_aggregation_inner_query.aeq_timestamp, INTERVAL 1 month) AS aeq_timestamp,
COUNT(DISTINCT ch_aggregation_inner_query.aeq_features_count) AS aeq_features_count
FROM (
SELECT
ai_usage_events.user_id AS aeq_user_id,
timestamp AS aeq_timestamp,
CASE
WHEN event IN (1, 2, 3, 4, 5) THEN 'code_suggestions'
WHEN event IN (6) THEN 'chat'
WHEN event IN (7) THEN 'troubleshoot_job'
WHEN event IN (8, 9, 19, 20, 21, 22) THEN 'agent_platform'
WHEN event IN (10, 11, 12, 13, 14, 15, 16, 17, 18) THEN 'code_review'
WHEN event IN (23, 24) THEN 'mcp'
ELSE NULL
END AS aeq_features_count,
ai_usage_events.user_id,
ai_usage_events.namespace_path,
ai_usage_events.event,
ai_usage_events.timestamp
FROM ai_usage_events
WHERE ai_usage_events.timestamp >= 1758284354.372006
AND startsWith(namespace_path, '9970/')
GROUP BY ALL
) ch_aggregation_inner_query
GROUP BY ALL
ORDER BY
aeq_timestamp ASC,
aeq_features_count DESC
Related to #589610
Suggestion (Non Blocker): Similar to the pervious suggestion on table-based tests pattern
I have no strong opinion about it and I think it's non-linear convention as some specs are unique and more readable with being table-based. So I'll leave it to your judgement
Question: I see we are moving from ai_usage to analytics from the previous MR.
Should we still need to mount AiUsageEvents AE in ee/app/graphql/types/analytics/ai_usage/ai_usage_type.rb or it can be done in a separate MR once the other one is merged?
Suggestion (Non Blocker): Do we need to define extras here or until we have a use case for it?
FILTER=ai_usage_stats bundle exec rake db:seed_fu
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Nicely done on ignoring these fields, approving