Skip to content

BE: Migrate existing agent resolver logic to dedicated field maintained by RD team

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

MR: Pending

Description

This is created as a follow-up to the discussion in this thread.

For some background, as a part of supporting group-agent authorization strategy, a decision was made to create a new field remoteDevelopmentClusterAgents under group query to list all the cluster agents with remote development support (with configurable filters).

group(fullPath: "gitlab-qa-sandbox-group-6") {
  id
  remoteDevelopmentClusterAgents(filter: DIRECTLY_MAPPED) {
    nodes {
      id
      name
    }
  }
}

As a part of this discussion, another conclusion was reached to move the existing logic under the following graphql query resolver to the resolver for this new field. Since this new field is maintained by RD team, this migration would enabled greater control over this part of domain logic, as the current query resolver that returns all agents under a group is not maintained by RD team.

 group(fullPath: $groupPath) {
    id
    clusterAgents(hasRemoteDevelopmentEnabled: true) {
      nodes {
        id
        name
        project {
          id
          nameWithNamespace
        }
      }
    }
  }

Acceptance Criteria

  • Existing dependency on group.clusterAgents(hasRemoteDevelopmentEnabled: true) in Remote Development code is replaced with with calls to group.remoteDevelopmentClusterAgents. Functionally speaking, group.remoteDevelopmentClusterAgents should have the contract as group.clusterAgents(hasRemoteDevelopmentEnabled: true)
  • Add specs to verify this change
  • Ensure all code/references/docs related to prior resolver logic in Cluster Agent domain is removed/deleted.

Technical Requirements

Same as acceptance criteria

Design Requirements

NA

Impact Assessment

NA

User Story

NA

Edited by 🤖 GitLab Bot 🤖