render: label the Docker containers and networks render creates
メンテナーはふだん 3 日以内に返信
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
調査の方向性
Start by tracing RuntimeDocker.createContainer, the Docker engine's render container creation, and createRenderNetwork. Read the existing cleanup-policy handling and follow how render sessions and networks are created and removed; done means every render-owned container and network carries consistent identifying labels without changing existing cleanup behavior.
索引モデルが issue の本文から書いたものです。
説明
What problem are you facing?
There's no reliable way to tell which Docker containers and networks were created by crossplane render, so
anything it leaves behind can't be found and cleaned up afterwards.
Today the containers render creates carry only the image's own io.crossplane.xpkg:* label, unnamed
Function containers get random Docker names (suspicious_newton, distracted_mestorf, …), and the
crossplane internal render engine container and the crossplane-render-* network carry no labels at all.
Matching by image or name prefix is guesswork, and can catch containers the user started on purpose.
This matters because leftovers happen:
- Some interruptions can never be cleaned up in-process:
kill -9, a crash, an OOM kill, a CI job timeout.
Even with signal handling (#400), these leave resources behind. - Containers deliberately kept with
runtime-docker-cleanup: Orphanorruntime-docker-name(for warm
reuse across invocations) build up over time and can't be told apart from accidental leaks. - Tools built on the render library — for example
crossplane-diff, which renders many times per run —
have the same problem and currently have to track container names themselves.
How could Crossplane help solve your problem?
Add labels to every container and network render creates (in RuntimeDocker.createContainer, the docker
engine's render container, and createRenderNetwork). For example:
| Label | Value | Purpose |
|---|---|---|
render.crossplane.io/managed-by |
crossplane |
Identifies render-owned resources |
render.crossplane.io/session |
per-invocation ID | Scopes cleanup to one run |
render.crossplane.io/cleanup |
the effective cleanup policy (Remove, Stop, Orphan) |
Lets a sweep skip containers the user deliberately kept |
render.crossplane.io/created-by-pid (optional) |
PID | Helps detect leftovers from dead sessions |
That enables:
- A plain
docker ps -a --filter label=render.crossplane.io/managed-by=crossplanefor users. - Optionally, a small subcommand (e.g.
crossplane render cleanup [--all]) that removes leftovers from dead
sessions, skipping containers kept withOrphan/runtime-docker-nameunless--allis given. - Safer network cleanup: before removing a network, render could force-remove containers from its own
session that are still attached, without touching unrelated containers on a user-supplied
--crossplane-docker-network(see #398). - Library consumers could clean up by label and session ID instead of tracking container names themselves.
Adding labels is purely additive and doesn't change behaviour for existing users.
- 主要言語
- Go
- スター
- 19
- フォーク
- 33
- 平均マージ
- 3日 10時間
- マージ済み PR(30日)
- 24
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
crossplane/cli のほかの issue
-
`credsStore` in docker config causes unit test failures対応中かも @sujeito-operator が 48 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
crossplane/cli#282 ·
メンテナーはふだん 3 日以内に返信
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
crossplane/cli#410 ·
メンテナーはふだん 3 日以内に返信
-
render: interrupting with Ctrl+C (SIGINT/SIGTERM) leaks Function containers, the render container, and the network対応中かも @jcogilvie が 4 日前に担当しました。 オープンbug
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
crossplane/cli#400 ·
メンテナーはふだん 3 日以内に返信
-
render: Function cleanup failures are invisible without --verbose対応中かも @jcogilvie が 4 日前に担当しました。 オープンbug
難易度 3/5 1〜2日 初心者へのやさしさ 70/100
crossplane/cli#399 ·
メンテナーはふだん 3 日以内に返信
-
render: docker engine discards the network-removal error, so crossplane-render-* networks leak silently対応中かも @jcogilvie が 4 日前に担当しました。 オープンbug
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
crossplane/cli#398 ·
メンテナーはふだん 3 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 90/100
FootprintAI/Containarium#2338 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: core doesn't build standalone on dev since a17068054 (go-mp3 require dropped, go.sum pruned)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
SagerNet/sing-openvpn#11 ·
-
priority: P3 type: devops
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
jiegui2025/hwspec#57 ·
メンテナーはふだん 1 日以内に返信