Add Foundational Flow menu

What does this MR do and why?

Add Foundational Flow menu

Changelog: added EE: true

References

Screenshots or screen recordings

Before After

How to set up and validate locally

If the BE is not yet merged, rebase this branch on !215241 (merged)

If no AI Catalog items are marked as foundational, mark one via the Rails console:

::Ai::Catalog::Item.last.update(foundational_flow_reference: 'fix_pipeline')

Additionally if !214541 (merged) is not yet merged, apply the following patch to ease testing:

Patch
Index: ee/app/services/ai/catalog/item_consumers/create_service.rb
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/ee/app/services/ai/catalog/item_consumers/create_service.rb b/ee/app/services/ai/catalog/item_consumers/create_service.rb
--- a/ee/app/services/ai/catalog/item_consumers/create_service.rb	(revision 907cd19eca31ef4c92e7ea3011918a10f11222e3)
+++ b/ee/app/services/ai/catalog/item_consumers/create_service.rb	(date 1764874508269)
@@ -94,6 +94,10 @@
           # no_op, and continue creating the item consumer.
           return [:no_op, nil] if group.nil? || item.agent?
 
+          existing_sa = group.service_accounts.by_username(service_account_username).first
+
+          return [:success, existing_sa] if existing_sa
+
           service_account_params = {
             namespace_id: group.id,
             name: item.name,

Self-managed testing

  1. Run GDK in self-managed mode, and in a Duo enabled group open the settings e.g. http://gdk.test:3000/groups/gitlab-duo/-/edit
  2. Scroll down to "GitLab Duo features" and expand it, notice "Allow foundational flows" and a selection of flows

image

  1. Select one of the flows and click on "Save changes"
  2. In the same group, click on "Automate > Flows" and observe the Flow you selected is part of the list of flows

image

  1. Go to the Flows page in one of the projects of the groups e.g. http://gdk.test:3000/gitlab-duo/test/-/automate/flows
  2. Observe that the same flow is present.

image

  1. Optionally, observer that the service accounts of the flows also joined the project.

image

  1. Go back to the group settings and disable the flow, click save changes. Verify in the Flow menu of the group and project that the Flow has been removed.

image

image

SaaS testing

  1. Run GDK in SaaS mode. The testing is almost the same but SaaS has top-level group / namespace admin settings.
  2. In a Duo enabled group open the settings e.g. http://gdk.test:3000/groups/gitlab-duo/-/settings/gitlab_duo
  3. Click on "Chance configuration" and scroll down to "Flow execution"

image

  1. Select one of the flows and click on "Save changes"
  2. In the same group, click on "Automate > Flows" and observe the Flow you selected is part of the list of flows

image

  1. Go to the Flows page in one of the projects of the groups e.g. http://gdk.test:3000/gitlab-duo/test/-/automate/flows
  2. Observe that the same flow is present.

image

  1. Go back to the group admin settings and disable the flow, click save changes. Verify in the Flow menu of the group and project that the Flow has been removed.

image

image

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.

Related to #568031 (closed)

Edited by Fred de Gier

Merge request reports

Loading