Bump GLQL to 0.36.0 and add the DuoWorkflow data source

What does this MR do and why?

Bumps @gitlab/query-language-rust and gitlab_query_language from 0.35.0 to 0.36.0, adding the DuoWorkflows analytics source, so type = DuoWorkflow with mode: analytics compiles against the existing analytics.duoWorkflows engine. Note: the engine sits behind the default-off dap_impact_v1 flag (also off on GitLab.com), so it only returns data where the flag is on.

  • Frontend: the user dimension on DuoWorkflowsAggregationResponseDimensions goes to the avatar presenter, projectsCount gets a number presenter, and the five creditsUsed* metrics get a credits presenter capped at two fraction digits, a credits unit with its own "Credits" axis label, and stat descriptions. No trend direction is set for credits, so stat badges stay neutral (deliberate, open to discussion).
  • Docs: a new page, doc/user/glql/data_sources/duo_workflows.md, plus an index row, marked Status: Experiment, with a flag note explaining that the source depends on the analytics.duoWorkflows engine behind dap_impact_v1, and no GitLab Dedicated while that flag is off. The credits metrics need read_agent_artifacts (Owner or Security Manager by default, or a custom role) and are empty for other users.
  • API doc: doc/api/glql.md moves the example schema version to 0.36.0 and lists the new multi_scope attribute, because the documentation spec checks the table against the gem. Scope lists in query are documented in a separate MR.
  • yarn.lock: signal-exit and yargs were deduplicated to clear a Danger warning (they were already duplicated on master).

References

Screenshots or screen recordings

View Rendered
Table by flow type (totalCount, usersCount, projectsCount, creditsUsedSum, creditsUsedMean, creditsUsedQuantile(0.9)) glql_duo_table_flow_type
Table by created(monthly) (date bucket rendered by the existing time presenter, creditsUsedMin, creditsUsedMax) glql_duo_table_monthly
Table by user and project (user avatar presenter, project link, None for flows with no project) glql_duo_table_user_project
Column chart, weekly creditsUsedSum and creditsUsedMean glql_duo_column_chart
Area chart, weekly totalCount by flowType glql_duo_area_chart
Stat, creditsUsedSum with the DuoWorkflows description glql_duo_stat_credits
Stat, totalCount glql_duo_stat_flows

How to set up and validate locally

  1. Check out the branch, then run bundle install and yarn install.

  2. Enable the flag in a Rails console: Feature.enable(:dap_impact_v1).

  3. Make sure ClickHouse is enabled in GDK and duo_workflows_workflows_enriched has rows for a group you can access. If it does not, insert a few rows with traversal_path matching the group's traversal_path(with_organization: true), a created_at in the last 60 days, and a credits_used value.

  4. As an Owner, add a GLQL block (a ```glql fence) to a work item description:

    display: table
    mode: analytics
    query: type = DuoWorkflow and group = "gitlab-org" and created > -60d
    dimensions: flowType, user, project, created(weekly)
    metrics: totalCount, usersCount, projectsCount, creditsUsedSum, creditsUsedMean, creditsUsedQuantile(0.9)
    sort: totalCount desc
  5. Try display: columnChart with dimensions: created(weekly) and metrics: creditsUsedSum.

  6. Try display: stat with metrics: creditsUsedSum.

  7. Check the browser console for errors.

  8. Repeat as a Developer and confirm the credits cells render empty.

MR acceptance checklist

This MR was evaluated against the MR acceptance checklist.

  • No database changes.
  • No new feature flag. This reuses dap_impact_v1.
  • Changelog trailer added on the bump commit.
  • New UI strings are externalized.
Edited by Daniele Rossetti

Merge request reports

Loading
Loading