Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

🤖 fix: handle template imports that outlast the request deadline

未关闭
#117 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
go, kubernetes
领域
api, backend, devops

调研方向

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

  1. Keep the synchronous Create and document the limit (current state; documented in the aggregated API server how-to).
  2. Return early for slow imports and expose import progress through status or conditions, so clients can wait instead of retrying.
  3. 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

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

coder/coder-k8s 的其他 Issue

查看 coder/coder-k8s 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

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