Add triggeredByUserId filter to duoWorkflowSessionArtifacts

What does this MR do and why?

Add the ability to filter duoWorkflowSessionArtifacts by the initiating user, supporting both positive (triggeredByUserId) and negated (not: { triggeredByUserId }) filter arguments. This unblocks the frontend "Triggered By" filtered search bar (#606319).

Changes

  • Add triggeredByUserId argument to BaseSessionArtifactsResolver (available on both group and project fields)
  • Add triggeredByUserId to SessionArtifactNegatedFilterInput for negated filtering
  • Support both user filters in ClickHouseFinder
  • Update GraphQL reference docs
  • Add specs for all new filter paths (ClickHouse finder, PostgreSQL finder, group and project GraphQL request specs)

Both filters require ClickHouse, consistent with every other filter on this field except workflowId. triggeredByUserId is listed in unsupported_pg_args and not: { triggeredByUserId } is covered by the existing not entry, so the resolver raises the usual "requires ClickHouse to be enabled for analytics" argument error on the PostgreSQL path rather than silently returning unfiltered results.

This means no new PostgreSQL queries or model scopes are introduced: PostgresqlFinder continues to handle only workflowId.

References

Screenshots or screen recordings

Screenshot_2026-07-30_at_2.09.38_PM

How to set up and validate locally

  1. Enable the feature flag: Feature.enable(:agent_artifacts_page)
  2. Query duoWorkflowSessionArtifacts with triggeredByUserId argument:
    query {
      group(fullPath: "my-group") {
        duoWorkflowSessionArtifacts(triggeredByUserId: "gid://gitlab/User/1") {
          nodes { id workflowDefinition }
        }
      }
    }
  3. With ClickHouse enabled, verify only artifacts triggered by that user are returned.
  4. Test the negated filter with not: { triggeredByUserId: "gid://gitlab/User/1" }.
  5. Without ClickHouse, verify both filters return a "requires ClickHouse to be enabled for analytics" error.

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 Scott Hampton

Merge request reports

Loading
Loading