Add Duo Agent Platform checkbox to CI/CD variable drawer

What does this MR do and why?

Adds an Allow in GitLab Duo Agent Platform workloads checkbox to the CI/CD variable drawer for project and group variables. It reads and writes allowedInWorkloads (MR 4a), requested with @gl_introduced(version: "19.4.0") so the query still works against older backends. The checkbox is hidden for instance variables and the attribute is omitted from their payload.

The setting has no effect until the final MR of the split lands.

References

  • Work item: #602887
  • Split of !252729 (the original, now the final MR):
# Merge request Base
1 !254470 (merged) Add columns master
2 !254471 (merged) Parse variables in agent-config.yml master
3 !254472 Persist source ref protection 1
4a !254473 Expose allowed_in_workloads on APIs 1
4b !254474 Settings checkbox 4a
5 !252729 Gate workload variables (feature becomes active) 3, needs 2

Screenshots or screen recordings

Before After
Drawer without the checkbox (screenshot to be added)

How to set up and validate locally

  1. Go to Settings > CI/CD > Variables in a project and select Add variable.
  2. Below Protect variable, the checkbox Allow in GitLab Duo Agent Platform workloads appears with its help text.
  3. Select it, save, and reopen the variable: it stays selected. Clear it, save, reopen: it stays cleared.
  4. Repeat in a group's Settings > CI/CD > Variables.
  5. Go to Admin > CI/CD > Variables: the checkbox is not shown.

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 Alper Akgun

Merge request reports

Loading
Loading