Bump GLQL to 0.40.0

What does this MR do and why?

Bumps gitlab_query_language and @gitlab/query-language-rust to 0.40.0 (Gemfile, Gemfile.lock, Gemfile.next.lock, package.json, yarn.lock). Integration work is tracked in glql#233 (closed).

0.40.0 adds two new DuoWorkflows metrics, openMrCount and creditsPerMergedMrRatio. This MR wires up the monolith-side presenters for both, under app/assets/javascripts/glql/:

  • value_format.js: the five openMrCount* variants (Min, Max, Mean, Sum, Quantile) use the count unit. creditsPerMergedMrRatio uses the credits unit, with 2 decimals in cells and compact formatting on chart axes.
  • presenter_registry.js: openMrCount* use NumberPresenter, creditsPerMergedMrRatio uses CreditsPresenter.
  • stat.js: adds stat descriptions for the six metrics. creditsPerMergedMrRatio sets positiveDirection: 'down', so the stat trend badge treats a decrease as good - a cheaper merged change is the point of the metric. openMrCount* keep the count unit's default up, same as createdMrCount*.
  • locale/gitlab.pot regenerated.

Docs:

  • doc/user/glql/data_sources/duo_workflows.md: two 19.5 history entries (glql!534 (merged), glql!533 (merged)), six new metric rows whose first sentence matches the stat description, the credits authorization note extended to cover creditsPerMergedMrRatio (gated by read_agent_artifacts, same as creditsUsed), the lag note extended to cover openMrCount (same reconciliation as merged/closed, so a recently merged MR can still count as open), and the "Flows by status" example gains openMrCountSum as "MRs open".
  • doc/user/glql/data_sources/merge_requests.md: documents the new reviewState filter (alias reviewStates) - a query fields table row, a "Review state" section with the six values, operators =, !=, in, semantics notes (matches when at least one reviewer is in the state; cannot be combined with reviewer = any or reviewer = none), and a "waiting for a first review" example. This is the commit from !256125 (closed) by another author, cherry-picked here with attribution kept; !256125 (closed) was closed in favour of this MR.

No frontend code enumerates merge request filters, so reviewState needs no presenter change.

Screenshots

Verified on GDK with the released 0.40.0 gem and npm package. Blocks 1-5 ran against local ClickHouse, where synthetic merge request ids were seeded into the Duo workflow rows because the local rows have none. Blocks 6-8 ran against gitlab.com data (project gitlab-org/charts/gitlab) through the local remote-GLQL redirect. openMrCount is already served by gitlab.com; creditsPerMergedMrRatio was not deployed there yet at the time, hence the local run.

GLQLScreenshot
title: "Duo workflows by status (since June 2026)"
display: table
mode: analytics
query: type = DuoWorkflow and group = "gitlab-org" and created > 2026-06-01
dimensions: status as "Status"
metrics: totalCount as "Flows", createdMrCountSum as "MRs created", mergedMrCountSum as "MRs merged", closedMrCountSum as "MRs closed", openMrCountSum as "MRs open"
sort: status asc

1_status_table_open_mr_count

title: "Duo created merge requests by outcome"
display: lineChart
mode: analytics
query: type = DuoWorkflow and group = "gitlab-org" and created > 2026-06-01
dimensions: created(monthly) as "Month"
metrics: createdMrCountSum as "Opened", mergedMrCountSum as "Merged", closedMrCountSum as "Closed", openMrCountSum as "Still open"
sort: created asc

2_outcome_line_chart

title: "Open merge requests per flow, by flow type"
display: table
mode: analytics
query: type = DuoWorkflow and group = "gitlab-org" and created > 2026-06-01
dimensions: flowType as "Flow"
metrics: totalCount as "Flows", openMrCountSum as "Open MRs", openMrCountMean as "Avg per flow", openMrCountMax as "Max per flow", openMrCountQuantile(0.9) as "p90 per flow"
sort: openMrCountSum desc

3_open_mr_stats_by_flow_type

title: "Cost per merged change"
display: stat
mode: analytics
query: type = DuoWorkflow and group = "gitlab-org" and created > 2026-06-01
metrics: creditsPerMergedMrRatio

4_cost_per_merged_change_stat

title: "Credits per merged merge request, by month"
display: table
mode: analytics
query: type = DuoWorkflow and group = "gitlab-org" and created > 2026-06-01
dimensions: created(monthly) as "Month"
metrics: creditsUsedSum as "Credits", mergedMrCountSum as "MRs merged", creditsPerMergedMrRatio as "Credits per merged MR"
sort: created asc

5_credits_per_merged_mr_by_month

title: "Waiting for a first review"
display: table
query: type = MergeRequest and project = "gitlab-org/charts/gitlab" and state = opened and draft = false and reviewState = unreviewed
fields: title, author, reviewer, updated
sort: updated asc
limit: 8

com_6_review_state_unreviewed

title: "Reviewed or changes requested"
display: table
query: type = MergeRequest and project = "gitlab-org/charts/gitlab" and state = opened and draft = false and reviewState in (reviewed, requested_changes)
fields: title, reviewer, approved
sort: updated desc
limit: 8

com_7_review_state_in_list

Expected compile error:

display: table
query: type = MergeRequest and project = "gitlab-org/charts/gitlab" and state = opened and reviewer = any and reviewState = approved
fields: title, reviewer

8_review_state_wildcard_error

Edited by Daniele Rossetti

Merge request reports

Loading
Loading