[FEATURE] Harness Get/Update RPCs and optimistic-concurrency preconditions for configuration writes

Abierto
#3,517 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
25/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
go, grpc, kubernetes
Área
api, backend

Línea de trabajo

Start with the HarnessService protobuf and its Agent and AgentTemplate RPC counterparts, then trace update and delete handling through kubecrud and the generated Go and TypeScript clients. The issue describes the required behavior, but the work spans API definitions, authorization, Kubernetes concurrency, error mapping, and client generation. Done means Buf lint, generation, and compatibility checks pass, with stale updates and deletes returning ABORTED and no-version requests retaining their behavior.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Feature summary

Add GetHarness and UpdateHarness to HarnessService, and make configuration writes honor Kubernetes optimistic-concurrency preconditions.

Problem
  • HarnessService exposes List, Create and Delete. API clients cannot read one Harness or change it in place, unlike Agents and AgentTemplates.
  • Update RPCs read the current object and overwrite its spec, ignoring the caller's metadata.resourceVersion. Two editors silently overwrite each other.
  • kubecrud maps an update conflict to INTERNAL, so clients cannot tell a lost race from a server failure.
  • Delete reads the object and then deletes it by name. A delete-and-recreate between the two calls removes the new object, and callers cannot supply the version they reviewed.
Proposed implementation
  • GetHarness and UpdateHarness, following the Agent and AgentTemplate RPC shapes and authorization.
  • Updates keep server-owned metadata and apply the caller's resourceVersion when present.
  • Optional resource_version on DeleteAgentRequest, DeleteAgentTemplateRequest and DeleteHarnessRequest; delete is fenced by the object's UID and that version.
  • Conflicts map to ABORTED and missing objects to NOT_FOUND on update and delete.

All protobuf changes are additive.

Acceptance
  • A stale update or delete returns ABORTED; an older request never deletes a recreated object.
  • Requests without a version keep their current behavior.
  • Harness Get/Update use the existing authorization and validation path.
  • Buf lint, generation and compatibility checks pass.
Alternatives

Clients delete and recreate Harnesses, and retry on INTERNAL. This replaces the object and cannot distinguish conflicts.

Affected services

Controller gRPC API, generated Go and TypeScript clients.

Contribution

I have an implementation in a downstream fork and can submit it once the shape is agreed. Prepared with Codex and Claude Code assistance.

Lenguaje dominante
Go
Estrellas
4.5k
Forks
937
Merge medio
1 d 10 h
PR fusionados (30 d)
150

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de kagent-dev/kagent

Todos los issues de kagent-dev/kagent

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.