Surface AiCatalogItemConsumerCreate warnings when enabling a flow
What does this MR do and why?
This MR addresses: #630748 (closed).
In this MR, AiCatalogItemConsumerCreate now returns a warnings field in the backend alongside errors.
A warning means the item consumer was created but something was skipped. Today the only producer is autonomous service account provisioning: when a scheduled trigger's dedicated SA cannot be provisioned, the caller lacks create_service_account, the group locks project membership, or the flow's own account holds Owner but the flow is still enabled and the scheduled trigger is dropped, with the reason in warnings.
The problem
ai_catalog_item_show.vue does not query warnings, so that outcome is currently silent and the user gets the normal success toast and no indication the schedule was skipped. They discover it later, when the flow never runs on its schedule.
Solution
- This MR add warnings to the mutation in
ai_catalog_item_consumer_create.mutation.graphql. - In
ai_catalog_item_show.vue, after the existing errors check passes, it show the success state and the warning.
How to set up and validate locally
Prerequisites
- Duo Enterprise enabled
- GDK running with all services up
1. Checkout this branch: 630748/sq/surface-graphql-warning 2. In rails console, enable the feature flags:
Feature.enable(:ai_flow_schedules)
Feature.enable(:autonomous_service_account_execution) # needed for :scheduled event type + RunService's composite-identity bypass2. Set up a provisioning failure by disabling users being able to be added to projects in a group
- In the top level group:
Settings>General>Permissions and group features>Membership - Disable "Users cannot be added to projects in this group"
- Save changes.
3. Enable a flow with a schedule only trigger - Navigate to a project in the group from step 2.
AI>Flows- Pick a flow and click Enable
- In the
Conditionsbox, selectAdd conditionand choose only On a schedule event type. - Choose a frequency (Every 15 minutes, Hourly, Daily, Weekdays, Weekly, Monthly, etc.).
- Set the time, then click
Add schedule, thenCreate trigger.
Expected/verify: the flow enablement saves with a warning dialog: "Some steps were skipped due to an error. Review the details below."
Screen recording
References
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
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.