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

オープン
#3,517 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
go, grpc, kubernetes
領域
api, backend

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Go
スター
4.5k
フォーク
937
平均マージ
1日 10時間
マージ済み PR(30日)
150

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

kagent-dev/kagent のほかの issue

kagent-dev/kagent の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。