Bump GLQL to 0.41.0

What does this MR do and why?

Bumps gitlab_query_language and @gitlab/query-language-rust to 0.41.0, integration work tracked in glql#237 (closed).

0.41.0 ships three GLQL changes; this MR adds the monolith side of each:

  • glql!537 (merged) - != and not in on analytics list filters. Docs only: operator tables on the seven analytics data source pages and the not in row in the operators table.
  • glql!539 (merged) - the Duo workflows model dimension becomes a catalog metadata object. Registers the new typename for chart labels, table cells and sorting, so it renders instead of a blank label or an empty link. Docs for the dimension.
  • glql!541 (merged) - totalCount(event=...) on AI usage events. Updates the stat description and the docs, including the String list item kind in the schema API doc.

Known limitation: the engine still groups model by the raw model_used string, so several raw ids resolving to the same catalog name come back as separate rows sharing one label. In two-dimension charts those rows overwrite each other. Discussed in the thread below; everything involved is behind dap_impact_v1. A client-side stopgap that sums only additive metrics is coming in a separate MR; the engine merge on the resolved model name is the proper fix, tracked in #631132.

Not in this MR: DAP dashboard YAML changes, same split as the previous bumps.

References

Screenshots or screen recordings

Screenshots taken on GDK with npm 0.41.0 against local synthetic ClickHouse data (Duo workflow and AI usage event rows seeded locally; numbers are not real).

GLQL Screenshot
title: "Duo workflows by model"
display: table
mode: analytics
query: type = DuoWorkflow and group = "gitlab-org" and created > 2026-01-01
dimensions: model as "Model"
metrics: totalCount as "Flows", creditsUsedSum as "Credits", usersCount as "Users"
sort: model asc

01_model_table

title: "Duo workflow credits by model"
display: barChart
mode: analytics
query: type = DuoWorkflow and group = "gitlab-org" and created > 2026-01-01
dimensions: model as "Model"
metrics: creditsUsedSum as "Credits used"
sort: creditsUsedSum desc

02_model_bar_chart

title: "Duo workflows by flow type and model"
display: columnChart
mode: analytics
query: type = DuoWorkflow and group = "gitlab-org" and created > 2026-01-01
dimensions: flowType as "Flow", model as "Model"
metrics: totalCount as "Flows"
sort: totalCount desc

03_flow_type_by_model_column_chart

title: "Duo workflows by flow type"
display: table
mode: analytics
query: type = DuoWorkflow and group = "gitlab-org" and created > 2026-01-01
dimensions: flowType as "Flow"
metrics: totalCount as "Flows", creditsUsedSum as "Credits"
sort: flowType asc

04_all_flow_types

title: "Duo workflows excluding chat and issue_to_mr"
display: table
mode: analytics
query: type = DuoWorkflow and group = "gitlab-org" and created > 2026-01-01 and flowType not in ("chat", "issue_to_mr/v1")
dimensions: flowType as "Flow"
metrics: totalCount as "Flows", creditsUsedSum as "Credits"
sort: flowType asc

05_flow_type_not_in

title: "Monthly Duo workflow credits, excluding chat"
display: columnChart
mode: analytics
query: type = DuoWorkflow and group = "gitlab-org" and created > 2026-01-01 and flowType not in ("chat")
dimensions: created(monthly) as "Month", flowType as "Flow"
metrics: creditsUsedSum as "Credits used"
sort: created asc

06_monthly_credits_not_in_chart

title: "Duo workflows by status, excluding finished"
display: table
mode: analytics
query: type = DuoWorkflow and group = "gitlab-org" and created > 2026-01-01 and status != finished
dimensions: status as "Status"
metrics: totalCount as "Flows"
sort: status asc

07_status_not_equal

display: table
mode: analytics
query: type = DuoWorkflow and group = "gitlab-org" and flowType not in ()
dimensions: flowType
metrics: totalCount

Expected compile error:

08_not_in_empty_error

title: "Weekly Duo Code Review requests and outcomes"
display: table
mode: analytics
query: type = AiUsageEvent and group = "gitlab-org" and timestamp > 2026-01-01
dimensions: timestamp(weekly) as "Week"
metrics: totalCount as "All events", totalCount(event=["request_review_duo_code_review_on_mr_by_author", "request_review_duo_code_review_on_mr_by_non_author"]) as "Review requests", totalCount(event="post_comment_duo_code_review_on_diff") as "Comments posted", totalCount(event="find_no_issues_duo_code_review_after_review") as "No issues found"
sort: timestamp desc
limit: 8

09_total_count_event_weekly

title: "Duo Code Review comments posted"
display: stat
mode: analytics
query: type = AiUsageEvent and group = "gitlab-org" and timestamp > 2026-01-01
metrics: totalCount(event="post_comment_duo_code_review_on_diff") as "Comments", totalCount as "All events"

10_total_count_event_stat

title: "AI usage events by feature, excluding Duo Code Review request events"
display: table
mode: analytics
query: type = AiUsageEvent and group = "gitlab-org" and timestamp > 2026-01-01 and event not in ("request_review_duo_code_review_on_mr_by_author", "request_review_duo_code_review_on_mr_by_non_author")
dimensions: feature as "Feature"
metrics: totalCount as "Events", usersCount as "Users"
sort: totalCount desc

11_event_not_in

How to set up and validate locally

  1. Check out the branch, bundle install, yarn install.
  2. Enable the dap_impact_v1 feature flag in a Rails console (Feature.enable(:dap_impact_v1)), and have Duo workflow and AI usage event rows in ClickHouse for a group you can query.
  3. Put the GLQL blocks above in a work item description, replacing the group paths, and check: the model table/chart labels show model names, not in / != rows are the complement of the unfiltered table, flowType not in () renders the compile error, and the totalCount(event=...) columns split the counts by event.
  4. GET /api/v4/glql/schema reports "version": "0.41.0" and lists not in under operators.

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 Daniele Rossetti

Merge request reports

Loading
Loading