[Bug] With a pinned build ID, the controller keeps updating the Deployment after a template change
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 58/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- go, kubernetes
- Área
- devops, infrastructure
Línea de trabajo
Read internal/k8s/deployments.go around NewDeploymentWithOwnerRef and internal/planner/planner.go around checkAndUpdateDeploymentPodTemplateSpec and updateDeploymentWithPodTemplateSpec. Reproduce the issue by running the unit test mentioned in the report and calling the check again after an update. Done means the template hash uses consistent inputs so the second check no longer returns the Deployment for an unchanged spec.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What are you really trying to do?
Change a pod template field on a WorkerDeployment that pins unsafeCustomBuildID and have it applied in place to the already-deployed version.
Describe the bug
The first update applies correctly, but then the controller detects drift on every reconcile and re-updates the same Deployment (~every 10s) until the spec changes.
The temporal.io/pod-template-spec-hash annotation is produced by hashing different inputs during creation vs update.
- NewDeploymentWithOwnerRef applies controller's envvars/volumes after hashing the template.
- checkAndUpdateDeploymentPodTemplateSpec compares against the hash of the template.
- updateDeploymentWithPodTemplateSpec hashes after applying the controller changes.
The impact is small. In my repro, the Deployment generation stayed constant across the updates without pod restarts, so the repeats are server-side no-ops. The cost is just an API write + a logline per reocncile per deployment.
Minimal Reproduction
- Create a WorkerDeployment with
unsafeCustomBuildID: stable - Change any pod template field
- Watch the controller log: "updating deployment" indefinitely
Can also be seen via a unit test: run checkAndUpdateDeploymentPodTemplateSpec again after an update and it will return the Deployment again.
Environment/Versions
- temporal-worker-controller main at 8ece977
Additional context
I have a fix ready: hash the template before applying the controller. Happy to open a PR for this!
- Lenguaje dominante
- Go
- Estrellas
- 197
- Forks
- 79
- Merge medio
- 3 d 13 h
- PR fusionados (30 d)
- 25
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Sin 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 temporalio/temporal-worker-controller
-
[Feature Request] Helm chart: support topologySpreadConstraints on the controller DeploymentPosiblemente ocupada @akolacz la tomó hace 3 días. Abiertohelm
temporalio/temporal-worker-controller#658 · 1 reacción · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
rbac
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
temporalio/temporal-worker-controller#654 ·
Los mantenedores suelen responder en 1 día
-
Bug: v1.6's delete-protection finalizer is never removed from migrated TemporalWorkerDeployment/TemporalConnection, so they stay Terminating after the v1.7 migrationPosiblemente ocupada @niyomukiza-mechack la tomó hace 10 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 57/100
temporalio/temporal-worker-controller#644 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
AI agent skillsAbierto
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
temporalio/temporal-worker-controller#633 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
refactor integration testsAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 62/100
temporalio/temporal-worker-controller#632 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de temporalio/temporal-worker-controller
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
goharbor/terraform-provider-harbor#655 · 1 comentario ·
-
bug needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
syncthing/syncthing#10935 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
docker/sbx-releases#737 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
-
area/manager needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
kyma-project/telemetry-manager#3922 ·
Los mantenedores suelen responder en 1 día