🤖 fix: handle template imports that outlast the request deadline
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 45/100
调研方向
The issue relates to the synchronous template import flow in the aggregated API server. Start by examining the code for creating a CoderTemplate (likely in a controller or handler) and the import logic from #116. Understand how the CODER_K8S_TEMPLATE_VERSION_BUILD_WAIT_TIMEOUT environment variable and kube-apiserver's --request-timeout interact. Look for where file uploads and template versions are managed to assess idempotency or async status reporting. Testing will require setting up a slow import scenario to verify timeout behavior.
由索引模型根据 Issue 内容生成。
描述
Problem
After #116, creating a CoderTemplate with spec.files returns only after Coder finishes importing the template. The server-side limit is CODER_K8S_TEMPLATE_VERSION_BUILD_WAIT_TIMEOUT (default 25 minutes), capped by the request deadline. Requests reach the aggregated API server through kube-apiserver, whose default --request-timeout is 60 seconds, and clients can set shorter deadlines.
If an import takes longer than the effective deadline:
- the client receives a timeout;
- the server creates no template, so nothing half-created is exposed;
- the uploaded file and template version remain in Coder;
- a retry uploads and imports again and can leave additional versions.
The maintained E2E imports a trivial template in seconds, so this path has not been exercised on a real backend. It has not been verified whether kube-apiserver's timeout applies to proxied aggregated requests in every configuration.
Options to evaluate
- Keep the synchronous Create and document the limit (current state; documented in the aggregated API server how-to).
- Return early for slow imports and expose import progress through status or conditions, so clients can wait instead of retrying.
- Make retries idempotent for identical source (for example, reuse a pending or succeeded version with the same content hash).
Trigger and owner
Owner: maintainer desk. Revisit when a user reports a slow-import timeout, when a supported quickstart path is restored, or before advertising large templates as supported.
Follow-up from #105 and #116.
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: xhigh
- 主要语言
- Go
- 星标
- 4
- 派生
- 3
- 平均合并
- 3 小时 15 分钟
- 30 天内合并 PR
- 31
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
coder/coder-k8s 的其他 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 88/100
gruntwork-io/boilerplate#329 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
prime-radiant-inc/evener#3291 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
Netcracker/qubership-apihub-backend#582 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 86/100
维护者通常 1 天内回复