refactor(selfHosted): use generated work models - #17
Merged
Conversation
## 简述 让 self-hosted worker 复用 ark-apis 生成的 WorkItem、WorkData、VolcTag 和 HeartbeatWorkResponse,并将 work 请求统一到 environment API 层。 ## 改动 - selfhosted 对外 work 类型改为 generated environment model 的类型别名 - poll/heartbeat 直接返回 generated model,删除重复字段转换 - poll/ack/heartbeat/stop 请求直接复用 model/environment 的唯一请求类型 - HandleItem 使用私有 claimed-work 运行上下文,不伪造 OpenAPI WorkItem 必填字段 - 更新 poller、heartbeat 和 integration 单测 ## 验证 - go test ./... - go vet ./... - STG work contract 6/6 - STG 三语言 SkillHub E2E 3/3 - Docker HandleItem smoke 2/2(基础会话、顺序会话) See merge request: !85 Sync-Source-Commit: ec05073a739eaf9093ee88ef80c8ee79458e1649 Ark-APIs-Commit: 1ae6acad4ff5d332748b13c47c120ecb01f1f185 Hand-Written-Reason: Self-hosted worker model consolidation using generated work contracts through 1ae6acad. Release-Version: 0.4.0
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.
Hand-written change from the internal SDK repository — not produced by
make vendor.refactor(selfHosted): use generated work models1ae6acad4ff5d332748b13c47c120ecb01f1f185Sync-Source-Commit: ec05073a739eaf9093ee88ef80c8ee79458e1649
Ark-APIs-Commit: 1ae6acad4ff5d332748b13c47c120ecb01f1f185
Hand-Written-Reason: Self-hosted worker model consolidation using generated work contracts through 1ae6acad.
Release-Version: 0.4.0
Created by ark-hand.