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

render: Function cleanup failures are invisible without --verbose

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

维护者通常 3 天内回复

@jcogilvie 已经在做这个了。

开始于 2026年10月1日。

  • #402 来自 @jcogilvie —— 未关闭

评估

难度
3/5
预计耗时
1-2 天
新手友好度
70/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
go
领域
cli

调研方向

Start with cmd/crossplane/render/render.go around StopFunctionRuntimes and the network cleanup path, then inspect cmd/crossplane/main.go around logger setup. Run the slow-stop reproduction from #397 with and without --verbose and verify that cleanup failures are reported on stderr without verbose; clarify the intended exit-code behavior before finalizing.

由索引模型根据 Issue 内容生成。

描述

bug
What happened?

When crossplane render fails to clean up the Docker resources it created, it exits 0 and prints nothing
about it unless --verbose is set, so users don't find out that containers or networks were left running.

  • StopFunctionRuntimes reports a stop failure only through log.Info
    (render.go L171-L180).
  • Without --verbose, the CLI's logger is a no-op
    (main.go L112).
  • Network-removal failures aren't logged at all (#398).

Expected: when cleanup leaves something behind, the user is told on stderr without needing --verbose, for
example a one-line warning naming the containers or networks that couldn't be removed. Whether it should
also change the exit code is up for discussion; a successful render with a cleanup failure is arguably
still a successful render.

How can we reproduce it?

Run the slow-stop reproduction from #397 (a Function container that ignores SIGTERM) without --verbose:

$ crossplane render xr.yaml composition.yaml functions-slow.yaml > render.out 2> render.err; echo "exit=$?"
exit=0
$ wc -c < render.err
0
$ sleep 12; docker ps -a --filter 'name=fnlc-' --format '{{.Names}} {{.Status}}'
fnlc-slow-7 Exited (137) 6 seconds ago
$ docker network ls --filter name=crossplane-render- --format '{{.Name}}'
crossplane-render-lz77vgmq

The same run with --verbose shows INFO Error stopping function runtimes {"error": "... context deadline exceeded"}.

What environment did it happen in?
  • Crossplane CLI version: built from main @ 29316fea54f2ede9d2c039d9c54f0c29cbad4b65
  • Platform (e.g., linux/amd64): darwin/arm64, Docker Engine 29.5.3 (Rancher Desktop)
  • Crossplane version (if applicable): render engine image xpkg.crossplane.io/crossplane/crossplane:stable
主要语言
Go
星标
20
派生
33
平均合并
3 天 10 小时
30 天内合并 PR
24

环境准备

从这里开始

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

crossplane/cli 的其他 Issue

查看 crossplane/cli 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

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