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

Đang mở
#3,517 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go, grpc, kubernetes
Lĩnh vực
api, backend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Go
Star
4.5k
Fork
937
Merge trung bình
1 ngày 10 giờ
Pull request đã merge (30 ngày)
150

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của kagent-dev/kagent

Tất cả issue của kagent-dev/kagent

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.