Add ALL
filter to cluster agent query
Issue: Update organization cluster agents query to acc... (#545224 - closed)
What does this MR do and why?
This MR adds a new filter ALL
to the workspacesClusterAgents
query, that will return all cluster agents belonging to the given namespace (organization or group). This is to simplify the handling of pagination in the frontend, see Workspaces Cluster Agents Admin Settings UI (#545241 - closed).
The AVAILABLE
and UNMAPPED
filters are also removed:
- Due to product's decision to only return agents that have workspaces enabled in their configuration within the organization's
workspacesClusterAgents
field,AVAILABLE
is removed in favour ofDIRECTLY_MAPPED
as they now serve the same function. - There is no current use case for the
UNMAPPED
filter.
References
Screenshots or screen recordings
Org | Group |
---|---|
![]() |
![]() |
How to set up and validate locally
-
Pull this branch and visit the GQL explorer in your GDK:
/-/graphql-explorer
-
Run the following queries:
-
Organization:
# Query: query organizationWorkspacesClusterAgentsQuery( $organizationId: OrganizationsOrganizationID! ) { organization(id: $organizationId) { workspacesClusterAgents( filter: ALL ) { nodes { id name } } } } # Variables: { "organizationId": "gid://gitlab/Organizations::Organization/1" }
-
-
Group:
# Query query getRemoteDevelopmentClusterAgents($namespace: ID!) { namespace(fullPath: $namespace) { id remoteDevelopmentClusterAgents(filter: ALL) { nodes { id name } } } } # Variables { "namespace": "gitlab-org" }
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 Cindy Halim