Frontend: Query organization cluster agents on creating workspace
MR: Query Organization cluster agents when attempti... (!194493 - merged)
Description
To grant access to organization-mapped agents, we would need to allow the user in the UI to select from the list of permitted organization agents.
We already have a GraphQL query where the user can get all the agents in an organization, so we can fetch those and merge them on the existing namespace cluster agent query (filtering for duplicate agents)
Potential concerns
Concern 1
One concern that the original implementation does not seem to consider (probably because the returned agent list was always expected to be small in the context of the namespace query) is that there is no pagination. The existing select component being used to pick agents does not appear to be pagination-friendly, so we might need to refactor the UI view to use a component that allows us to paginate on the returned agent set.
Or maybe we do not expect the amount of available agents on the org-mapped level or namespace-mapped level to balloon large? and the current approach of getting a single page is sensible ?
Response
After investigating agent counts in Investigation: Access gprd to retrieve metrics... (#536924 - closed) . We have decided (see final note here) to go with augmenting the existing dropdown with organization agents.
Acceptance criteria
-
The user can pick an agent from the combined list of org-mapped agents and namespace-mapped agents