Return only remote_development enabled agents on cluster agent queries without breaking existing endpoints
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Work on this issue](https://contributors.gitlab.com/manage-issue?action=work&projectId=278964&issueIid=546426) - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=546426) </details> <!--IssueSummary end--> MRs: gitlab-org/gitlab!192329+ <!-- NOTE: For context on MR heading, see: https://handbook.gitlab.com/handbook/engineering/development/dev/create/remote-development/index.html#relationship-of-issues-to-mrs --> ## Description As per Product input, in [this comment](https://gitlab.com/gitlab-org/gitlab/-/issues/536924#note_2523469463 ), we should be able to return organization workspaces cluster agents that have enabled remote development. This is to support the [current proposed UI ](https://gitlab.com/gitlab-org/gitlab/-/issues/513370/designs/Admin_area_-__General_-__Expanded_-__Filtering.png). The existing [namespace](https://docs.gitlab.com/api/graphql/reference/#namespaceworkspacesclusteragents)/[group](https://docs.gitlab.com/api/graphql/reference/#groupworkspacesclusteragents) agent APIs will also be adapted to return enabled agents, however, this will require maintaining the deprecated but unremoved endpoints to still behave as is (return enabled and disabled), i.e: - https://docs.gitlab.com/api/graphql/reference/#groupremotedevelopmentclusteragents - https://docs.gitlab.com/api/graphql/reference/#namespaceremotedevelopmentclusteragents Pending breaking change removal <!-- TODO: What kind of issue is this? Please uncomment and include one of the following: /label ~"type::feature" /label ~"type::bug" /label ~"type::maintenance" --> <!-- OPTIONAL: Is this a feature/enhancement? - Please describe the impact this feature/enhancement will have on the user experience and/or the product as a whole. - Provide a user story to illustrate the use case for this feature/enhancement. Include examples to help communicate the intended functionality. --> <!-- OPTIONAL: Is this a bug? Please uncomment and include the following: - **Current behavior:** - **Expected behavior:** - **Steps to reproduce:** - **Additional information:** please include VSCode version, browser dev tool logs, etc that might be helpful to debug the issue! --> ## Acceptance criteria - [x] Restrict organization cluster agents that have remote development enabled only - [ ] Restrict the experimental namespace/group cluster agents API to return remote development enabled only - [ ] Maintain the deprecated namespace/group API to return both disabled/enabled agents pending deprecations. ## Implementation plan ### Org Path - Remove dependency on `NamespaceClusterAgentFilter` for the filter parameter - Introduce `OrganizationClusterAgentFilter` as an enum to classify `ALL` and `DIRECTLY_MAPPED` agents - Organization `WorkspaceClusterAgents` query that takes in a compulsory `filter` parameter of type `OrganizationClusterAgentFilter` - Maintain appropriate GraphQL feature specs and associated finder specs ### Namespce/Group API backward compatibility Path - Configure the namespace agent finder to accept a flag of `enabled` default is false - Give the deprecated namespace/group API its own resolver that will translate to a finder call that maintains backward compatibility - Maintain the finder specs to adjust to the additional parameter that will make future cleanup easy
issue