[go: up one dir, main page]

Skip to content

User-level setting for default namespace of Duo Agentic Platform

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Problem to solve

Currently, users can use Duo Agent Platform in the following case:

  • WebUI: on a project or group page
  • Editor Extension: when opening a workspace which is associated with a GitLab repository (i.e. project), or setting the the default namespace setting in Editor Extension config.

This issue is to introduce the User-level setting for default namespace of Duo Agentic Platform, so that we can:

  • WebUI: any pages (falling back to the default namespace when the user is not on project or group page)
  • Editor Extension: same / any directories (fetching the user-level setting from connected GitLab instance and use it as the default namespace. The default namespace setting in Editor Extension should be deprecated/removed after this)

Proposal

Introduce user-level setting to let users pick a default namespace when using Duo Agentic Platform outside of a project.

  • Users visit a user preference page for user-level settings on Duo Agentic Platform.
  • Users can set a default namespace when using Duo Agentic Platform outside of a project.
    • The description says The default group or namespace path for GitLab Agentic Platform when the extension can't get GitLab project details (e.g. gitlab-org)..
    • This could be a text box or namespace picker.
    • If Duo Agentic Platform is disabled at the group/namespace level setting or users are unauthorized to use it, users can't set the namespace but see an error message saying "The group/namespace you specified doesn't allow you to execute a workflow. Please choose a different namespace" or something.
    • This option is basically equivalent to gitlab.duo.enabledWithoutGitlabProject and gitlab.duo.defaultNamespace settings in GitLab VSCode Extension.
  • This config is exposed via GraphQL or Rest API in GitLab-Rails. GitLab-LSP will use it.

Important notes

Currently we have a feature to set the default namespace for Duo features, which was introduced for Model Selection feature. However, this feature can't be reused for Duo Agent Platform out of the box because:

  • The data structure/schema is defined for SaaS exclusively.
  • The data validation is tightly coupled with Model Selection e.g. FK to seat assignment table.
  • The business logic is tightly coupled with Model Selection e.g. feature flag.

So we likely need to rework the current feature at first. See this discussion #557584 (comment 2655559233) for more information.

Background

Duo to the Cell's requirements, we need to persist an Organization ID or correlated resource for each workflow entry. There are several ways to accomplish this:

  1. Using project_id or namespace_id as sharding key to identify the corresponding organization. This is Duo Agent Platform's data structure.
  2. Using organization_id as sharding key to identify the corresponding organization. This is Classic Duo Chat's data structure.

While taking the latter approach allows us to accomplish a similar UX with Classic Duo Chat (i.e. user can use chat from anywhere), this approach is discouraged from the data migration and scalability PoV. By this reason, domain experts from Duo Agent Platform suggested taking the former approach.

Future iteration

User-level settings could be overridden by the group/namespace-level settings. This allows organization to regulate the AI settings at namespace level. e.g. ensure that all editor extensions set false to enabledWithoutGitlabProject.

Edited by 🤖 GitLab Bot 🤖