render: label the Docker containers and networks render creates
Los mantenedores suelen responder en 3 días
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Go
- Estrellas
- 20
- Forks
- 33
- Merge medio
- 3 d 10 h
- PR fusionados (30 d)
- 24
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de crossplane/cli
-
`credsStore` in docker config causes unit test failuresPosiblemente ocupada @sujeito-operator la tomó hace 48 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
crossplane/cli#282 ·
Los mantenedores suelen responder en 3 días
-
enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 42/100
crossplane/cli#410 ·
Los mantenedores suelen responder en 3 días
-
render: interrupting with Ctrl+C (SIGINT/SIGTERM) leaks Function containers, the render container, and the networkPosiblemente ocupada @jcogilvie la tomó hace 5 días. Abiertobug
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
crossplane/cli#400 ·
Los mantenedores suelen responder en 3 días
-
render: Function cleanup failures are invisible without --verbosePosiblemente ocupada @jcogilvie la tomó hace 5 días. Abiertobug
Dificultad 3/5 1-2 días Aptitud para principiantes 70/100
crossplane/cli#399 ·
Los mantenedores suelen responder en 3 días
-
render: docker engine discards the network-removal error, so crossplane-render-* networks leak silentlyPosiblemente ocupada @jcogilvie la tomó hace 5 días. Abiertobug
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
crossplane/cli#398 ·
Los mantenedores suelen responder en 3 días
Todos los issues de crossplane/cli
Issues similares
-
automation models
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
bug llm-stack needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Alert email subjects don't identify the host — same container on multiple hosts, identical subjectsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día
-
P3 Type: Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
grpc/grpc-go#9483 · 2 comentarios ·
Los mantenedores suelen responder en 2 días
-
needs-area needs-kind needs-priority needs-status needs-triage
Dificultad 2/5 Menos de una hora Aptitud para principiantes 85/100
cncf/automation#736 ·
Los mantenedores suelen responder en 1 día