Amr Taha activity https://gitlab.com/adruid 2026-03-20T09:23:22Z tag:gitlab.com,2026-03-20:5225378343 Amr Taha pushed to project branch master at GitLab.org / GitLab 2026-03-20T09:23:22Z adruid Amr Taha [email protected]

Amr Taha (dc9f9738) at 20 Mar 09:23

Merge branch 'expose-code-suggestions-ae-to-graphql' into 'master'

... and 1 more commit

tag:gitlab.com,2026-03-20:5225377860 Amr Taha deleted project branch expose-code-suggestions-ae-to-graphql at GitLab.org / GitLab 2026-03-20T09:23:14Z adruid Amr Taha [email protected]

Amr Taha (c96c4304) at 20 Mar 09:23

tag:gitlab.com,2026-03-20:5225375566 Amr Taha accepted merge request !226274: Expose code suggestions AE to graphql at GitLab.org / GitLab 2026-03-20T09:22:37Z adruid Amr Taha [email protected]

What does this MR do and why?

  • Adds Duo Code Suggestions aggregation engine to the GraphQL API.
  • Renames the AiUsage GraphQL type to Analytics for a more generic naming. Updates all references across group/project types, resolvers, spec files, documentation, and the GraphQL introspection result. No functional changes — purely a rename/refactor

References

Screenshots or screen recordings

image

How to set up and validate locally

  1. Setup ClickHouse in GDK
  2. Run db seeds with FILTER=ai_usage_stats bundle exec rake db:seed_fu
  3. Execute a query similar to the one shown in the screenshot above.
  4. Validate output.

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.

tag:gitlab.com,2026-03-20:5225301642 Amr Taha commented on merge request !228053 at GitLab.org / GitLab 2026-03-20T09:04:07Z adruid Amr Taha [email protected]

Thanks Adam! Approving with two main question

tag:gitlab.com,2026-03-20:5225300668 Amr Taha approved merge request !228053: Add merge request tables to Siphon at GitLab.org / GitLab 2026-03-20T09:03:51Z adruid Amr Taha [email protected]

What does this MR do and why?

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

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.

tag:gitlab.com,2026-03-20:5225300629 Amr Taha commented on merge request !228053 at GitLab.org / GitLab 2026-03-20T09:03:50Z adruid Amr Taha [email protected]

Question: Don't we need to have the same setup and the other yml files for replication_targets?

tag:gitlab.com,2026-03-20:5225300623 Amr Taha commented on merge request !228053 at GitLab.org / GitLab 2026-03-20T09:03:50Z adruid Amr Taha [email protected]

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

tag:gitlab.com,2026-03-20:5225147348 Amr Taha commented on merge request !226274 at GitLab.org / GitLab 2026-03-20T08:17:26Z adruid Amr Taha [email protected]

@ahegyi Would you mind re-approving? Your approval got lost amid the latest commit pushes

tag:gitlab.com,2026-03-20:5225139239 Amr Taha pushed to project branch master at GitLab.org / GitLab 2026-03-20T08:14:46Z adruid Amr Taha [email protected]

Amr Taha (c14be789) at 20 Mar 08:14

Merge branch 'faleksic-branch-rules-query' into 'master'

... and 1 more commit

tag:gitlab.com,2026-03-20:5225139130 Amr Taha deleted project branch faleksic-branch-rules-query at GitLab.org / GitLab 2026-03-20T08:14:43Z adruid Amr Taha [email protected]

Amr Taha (f097f945) at 20 Mar 08:14

tag:gitlab.com,2026-03-20:5225137236 Amr Taha accepted merge request !227507: Patch(branch-rules): All branches query at GitLab.org / GitLab 2026-03-20T08:14:07Z adruid Amr Taha [email protected]

What does this MR do and why?

The branch rules link to a literal ^All branches$ instead of just showing all branches.

This MR fixes that by removing the query literal.

References

Screenshots or screen recordings

Before After

How to set up and validate locally

The video attached above shows the outcome and how to test.

  1. Go to any project
  2. Go to settings > merge requests
  3. Click on branch rules
  4. Click on all branch rules
  5. Observe the link

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.

tag:gitlab.com,2026-03-20:5225114672 Amr Taha commented on merge request !226274 at GitLab.org / GitLab 2026-03-20T08:08:26Z adruid Amr Taha [email protected]

Pipeline failuers are false-postiives. Starting a new pipeline and setting auto-merge

tag:gitlab.com,2026-03-20:5225106672 Amr Taha commented on merge request !5842 at GitLab.org / GitLab Development Kit 2026-03-20T08:06:09Z adruid Amr Taha [email protected]

@ahegyi I can review this in the next hour or two. Is it WIP or will you assign another reviewer?

tag:gitlab.com,2026-03-20:5224790033 Amr Taha commented on merge request !227130 at GitLab.org / GitLab 2026-03-20T05:42:50Z adruid Amr Taha [email protected]

Thanks @pshutsin 💯

Three questions from my side with nothing blocker

tag:gitlab.com,2026-03-20:5224789649 Amr Taha approved merge request !227130: Introduce AI Usage Events AE at GitLab.org / GitLab 2026-03-20T05:42:31Z adruid Amr Taha [email protected]

What does this MR do and why?

  • Added a new Aggregation Engine (AE) for AI usage events
  • Extended the AE with filter formatting support — allows converting string values to integers and GIDs to regular IDs.

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.

ClickHouse review

Sample queries for couple metrics we'll need.

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

tag:gitlab.com,2026-03-20:5224789639 Amr Taha commented on merge request !227130 at GitLab.org / GitLab 2026-03-20T05:42:31Z adruid Amr Taha [email protected]

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

tag:gitlab.com,2026-03-20:5224789631 Amr Taha commented on merge request !227130 at GitLab.org / GitLab 2026-03-20T05:42:30Z adruid Amr Taha [email protected]

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?

tag:gitlab.com,2026-03-20:5224789623 Amr Taha commented on merge request !227130 at GitLab.org / GitLab 2026-03-20T05:42:30Z adruid Amr Taha [email protected]

Suggestion (Non Blocker): Do we need to define extras here or until we have a use case for it?

tag:gitlab.com,2026-03-19:5223782439 Amr Taha approved merge request !226274: Expose code suggestions AE to graphql at GitLab.org / GitLab 2026-03-19T20:11:45Z adruid Amr Taha [email protected]

What does this MR do and why?

  • Adds Duo Code Suggestions aggregation engine to the GraphQL API.
  • Renames the AiUsage GraphQL type to Analytics for a more generic naming. Updates all references across group/project types, resolvers, spec files, documentation, and the GraphQL introspection result. No functional changes — purely a rename/refactor

References

Screenshots or screen recordings

image

How to set up and validate locally

  1. Setup ClickHouse in GDK
  2. Run db seeds with FILTER=ai_usage_stats bundle exec rake db:seed_fu
  3. Execute a query similar to the one shown in the screenshot above.
  4. Validate output.

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.

tag:gitlab.com,2026-03-19:5222888988 Amr Taha commented on merge request !226274 at GitLab.org / GitLab 2026-03-19T15:51:56Z adruid Amr Taha [email protected]

Nicely done on ignoring these fields, approving 👍