feat: Disabled agents are not shown in the dropdown on the UI
Issue: Don't show agents which have been disabled in t... (#432094 - closed)
What does this MR do and why?
This change makes sure that users are not able to select a agent that is disabled from the UI when creating a new workspace.
Additionally, this change also ensures that when a workspace is created via the API, it is not saved if the agent is not enabled.
How to set up and validate locally
- Setup remote development and run a local instance of GitLab Agent
- Set the
enabled
flag in the agent configuration to false. - Create a workspace and try to select the agent. The agent should not get selected.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.