agent-substrate / agent-substrate/substrate

Some improvements to ActorTemplate

未关闭
#16 11 条评论 0 个 reaction 已指派 1 人 已被 @juli4n 认领 在 GitHub 查看
area/api kind/feature prio/P0
主要语言
Go
星标
1.8k
派生
316
平均合并
2 天 43 分钟
30 天内合并 PR
287

描述

There are a few cases where updating / deleting ActorTemplate resources can lead to a broken system.

* Deleting an `ActorTemplate` that is currently in use by an actor breaks the `ResumeActor` and `SuspendActor` RPCs.
* If an `ActorTemplate` is updated, the golden snapshot becomes stale and actors using the template diverge. Although `ActorTemplate`s are conceptually immutable, this is not enforced today.
* Deleting an `ActorTemplate` leaks its associated golden actor.

We should discuss whether we want to allow an actor to outlive its template. Assuming we don't, a possible path forward would be:

* The Substrate controller manages `ActorTemplate` resources.
* `ActorTemplate`s are immutable (enforced via CEL validation).
* Each `ActorTemplate` owns the lifecycle of a “golden actor”. The golden actor is created when the template is created, and deleted when the template is deleted.
* An `ActorTemplate` cannot be deleted if there are actors using it (this will require `ate-apiserver` to expose an efficient way to check if there are active actors referencing a given template).

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。