render: Function cleanup failures are invisible without --verbose
维护者通常 3 天内回复
评估
调研方向
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 内容生成。
描述
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.
StopFunctionRuntimesreports a stop failure only throughlog.Info
(render.goL171-L180).- Without
--verbose, the CLI's logger is a no-op
(main.goL112). - 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
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
crossplane/cli 的其他 Issue
-
`credsStore` in docker config causes unit test failures可能已有人在做 @sujeito-operator 于 50 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 84/100
crossplane/cli#282 ·
维护者通常 3 天内回复
-
enhancement
难度 4/5 3-5 天 新手友好度 42/100
crossplane/cli#410 ·
维护者通常 3 天内回复
-
render: label the Docker containers and networks render creates可能已有人在做 @jcogilvie 于 6 天前认领。 未关闭enhancement
难度 4/5 3-5 天 新手友好度 48/100
crossplane/cli#401 ·
维护者通常 3 天内回复
-
render: interrupting with Ctrl+C (SIGINT/SIGTERM) leaks Function containers, the render container, and the network可能已有人在做 @jcogilvie 于 6 天前认领。 未关闭bug
难度 3/5 1-2 天 新手友好度 68/100
crossplane/cli#400 ·
维护者通常 3 天内回复
-
render: docker engine discards the network-removal error, so crossplane-render-* networks leak silently可能已有人在做 @jcogilvie 于 6 天前认领。 未关闭bug
难度 4/5 3-5 天 新手友好度 48/100
crossplane/cli#398 ·
维护者通常 3 天内回复
相似的 Issue
-
kind/bug
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 4 天内回复
-
bug needs-acceptance
难度 2/5 1-3 小时 新手友好度 86/100
vllm-project/semantic-router#4744 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
jaegertracing/jaeger#9794 ·
维护者通常 1 天内回复
-
ScalingModifiers formula fails with "formula returned non-float result" when expression evaluates to an integer可能已有人在做 @Sarthak-Pandey 今天认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 73/100
维护者通常 1 天内回复