Loading
Fix the bulk enable mutation for AI catalog skills
What does this MR do and why?
Fix the bulk enable mutation for skills. Before this MR, aiCatalogItemConsumerBulkCreate returned a 500 with Unsupported item type: skill, so a user could not enable a skill from Explore.
This MR:
- Adds a
skill?branch toEnqueueBulkCreateService. - Adds a
create_ai_catalog_skill_item_consumerability, like the agent, flow, and external agent abilities.EnqueueBulkCreateServiceandCreateServicecheck it for skills. Policies can then turn off skill enablement on its own, for example from the governance settings in #607798. - Fixes the enable modal for skills. The disclaimer treated a skill as a flow, read flow trigger text, and failed to render. The modal now shows a skill disclaimer. The disclaimer does not say that members can use the skill, because nothing consumes an enabled skill until gitlab-org#23978.
- Adds skill messages, the Explore path, and the refetch query to the version alert.
Audit events for enabling and disabling skills are a follow-up in #630880 (comment 4210394672).
This is MR 5 of the split of !260396 (closed). All parts are behind the ai_catalog_skills flag (default off).
| # | MR | Status |
|---|---|---|
| 1 | Add routes for AI catalog skills | !266269 (merged) |
| 2 | Add Skills project sidebar menu item | !267449 (merged) |
| 3 | Register skill as an AI catalog item type | !267460 (merged) |
| 4 | Fall back to the git author name in item attribution | !267461 (merged) |
| 5 | Fix the bulk enable mutation for AI catalog skills | |
| 6 | Add skills routes to the Explore and project Vue routers | !267907 (merged) |
| 7 | Add Skills tab to the Explore AI catalog | !268368 (merged) |
| 8 | Add the skill details page | !268788 (merged) |
References
- Related #630880 (closed)
- Epic: gitlab-org#22961
- Design issue: #630405 (closed)
- Designs
- Rollout issue: #630885
- Split from !260396 (closed)
Screenshots or screen recordings
| Before | After |
|---|---|
The enable modal has no disclaimer. ![]() |
The enable modal shows the skill disclaimer. ![]() |
The bulk enable mutation returns a 500. ![]() |
The skill is enabled. ![]() |
How to set up and validate locally
- In the Rails console, run
Feature.enable(:ai_catalog_skills). - Publish a skill in a project. See the steps in !268368 (merged).
- Visit a public skill at
/explore/ai-catalog/skills/<id>and select Enable. The modal shows the skill disclaimer. - Select a project and select Enable. The toast says Enabled in selected project(s).
- Visit
/<project>/-/automate/skills. The skill is in the list. - Open the skill and select Disable. The toast says Skill disabled in this project.
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 Justin Ho Tuan Duong



