feat: [CDS-125698]: implement GitOps delete endpoint mappings and par…#614
Open
Him7n wants to merge 1 commit into
Open
feat: [CDS-125698]: implement GitOps delete endpoint mappings and par…#614Him7n wants to merge 1 commit into
Him7n wants to merge 1 commit into
Conversation
…ameter schemas across registry resources
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add DELETE operations for GitOps resources
Summary
Adds
deleteoperations to six GitOps resource types that previously only supportedlistandget, and adds 13 tests covering path mapping, query param forwarding, and validation behaviour.Resources updated
gitops_agentDELETE /gitops/api/v1/agents/{agentIdentifier}gitops_applicationDELETE /gitops/api/v1/agents/{agentIdentifier}/applications/{appName}gitops_applicationsetDELETE /gitops/api/v1/applicationset/{identifier}gitops_clusterDELETE /gitops/api/v1/agents/{agentIdentifier}/clusters/{clusterIdentifier}gitops_repositoryDELETE /gitops/api/v1/agents/{agentIdentifier}/repositories/{repoIdentifier}gitops_repo_credentialDELETE /gitops/api/v1/agents/{agentIdentifier}/repocreds/{credentialId}All operations are
risk: "destructive", retryPolicy: "do_not_retry"and go through the standard elicitation flow before execution.Notable design decisions
gitops_agent— raw identifier, not scope-prefixedUnlike all other GitOps agent-based APIs where
agentIdentifieris scope-prefixed (account.myagent,org.myagent), the agent management API uses the raw identifier in the path. Scope is derived server-side fromorgIdentifier/projectIdentifierin the query — theresource_scopeparam drives that injection. ThedescriptionandparamsSchemadocument this distinction explicitly.gitops_cluster— immutableresource_idvs. mutablequery_nameThe
{clusterIdentifier}path segment is the immutable internal identifier and does not change when a cluster is renamed in the UI. Thequery.namequery param carries the current ArgoCD display name and must match when the cluster has been renamed. Both are documented in the operation description with guidance on how to obtain each from a priorharness_list.gitops_repository—force_deletesafety valveThe backend blocks deletion when a repository is still referenced by active GitOps applications.
force_delete=truebypasses this check. The param is optional (defaults tofalse) and its intent is documented in the operationdescriptionandparamsSchema.Files changed
src/registry/toolsets/gitops.ts— delete operations added to six resource definitionstests/registry/gitops.test.ts— 13 new testsType of Change
Checklist
pnpm testpassespnpm typecheckpassespnpm buildpassespnpm standards:checkpasses (architecture guardrails — see docs/coding-standards.md)pnpm docs:checkpasses (if registry/tool counts changed)Coding Standards (registry-driven MCP model)
If this PR adds or changes Harness API coverage:
server.registerTool()calls — only toolset definitions insrc/registry/toolsets/ALL_TOOLSETSandToolsetNameunionoperationPolicyon every new/changed endpointsrc/registry/extractors.ts(no raw passthrough on real endpoints)identifierFieldsandscopedeclared on new resourcesconsole.log()insrc/(stdio JSON-RPC safety)