Repository navigation
TSI-4381: feat(app): 由对象流驱动应用调和与记录清扫 - #33
Closed
multica-tsic404[bot] wants to merge 1 commit into
Closed
multica-tsic404[bot] wants to merge 1 commit into
multica-tsic404[bot] wants to merge 1 commit into
Conversation
应用调和器此前只由测试直接驱动:新建或变更的应用不会入队,Failed 的 应用在用户重试后没有轮次读取动作记录,应用在卸载路径之外消失时记录留 在 KOS 命名空间里。 新增运行时接线:应用与动作记录各由一个 informer 入队,既有轮次重观察 保持不变;记录所属应用消失后由清扫删除,应用弃置清单不参与清扫。
|
Sorry @multica-tsic404[bot], you've used your own review budget of 250,000 diff characters for the last 7 days. You can request another review in 23 hours and 17 minutes by commenting |
Reviewer's GuideThe PR introduces a production Runtime that connects Application and action-record informer streams to reconciliation rounds, filters updates to preserve existing requeue semantics, and periodically removes UID-bound records for disappeared applications; focused unit and acceptance tests cover retry delivery, cleanup safety, restart behavior, and abandonment-manifest preservation. Sequence diagram for orphaned action-record cleanupsequenceDiagram
participant Runtime
participant Store
participant AppController
Runtime->>Store: List action records
loop each action record
Runtime->>Store: Get target Application
alt application absent or UID changed or target missing
Runtime->>AppController: deleteRecord
AppController->>Store: Delete action record
else application still matches record UID
Runtime-->>Runtime: Keep record
end
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Owner
|
随 TSI-4477 的设计重排作废:TSI-4381 已按用户指示关闭,本 PR 不再合入。后续实现按项目划分(tsic404/kosd 等)重新立项与排期。 |
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.
Closes TSI-4381
Issue: TSI-4381(Multica 01a1796b-58a4-7395-9960-4630f8f42ff0)
设计依据
tsic/kos-design@32b4bca
本单冻结锚点为
f7cfaa6,它早于 C-69 的引入;实现与设计 PR 都基于当前设计头。设计实现
pkg/app/runtime.go:Runtime(Application informer 的 Add 与状态变化 Update 入队);tests/acceptance/TC-55/tc55_watch_test.gopkg/app/runtime.go:enqueueRecord(动作记录 informer 按data.application入队所属应用);tests/acceptance/TC-55/tc55_watch_test.goRequeueAfter共存,互不遮蔽pkg/app/runtime.go:applicationChanged让状态写入不入队,轮次返回的RequeueAfter原样保留(pkg/app/controller.go未改);settled 应用仍按 30 秒重观察,Failed 应用没有重排,只能由记录 watch 触达pkg/app/controller.go:pendingAction与deleteRecord;pkg/app/runtime.go:enqueueRecord提供到达它的轮次pkg/app/runtime.go:sweepActionRecords、recordOrphaned、Run(缓存同步后先扫一次,随后按间隔清扫);tests/acceptance/TC-139/tc139_test.go设计变更
设计 PR: https://gitea.tsic.top/tsic/kos-design/pulls/17
Summary by Sourcery
Wire application reconciliation to object events and clean up action records left behind by applications that disappear.
New Features:
Enhancements:
Tests: