internal/template/template.go executes each string template and, when execution fails, returns the input string unchanged. The error never reaches the caller.
Every script-Job strategy driver carries a branch for exactly this case, and none of them can be reached by a template execute error. A bad expression renders as a literal or as <no value>, and the Job runs with it. You get a Pod that starts and writes to the wrong place, with nothing in the controller status saying why.
This is shared code under internal/, reached by the Redis, Kafka, RabbitMQ, Job and Altinity drivers alike, so the dead branch is not one driver's problem.
Found by reading the function while reviewing #3992 and #4000. Neither PR introduces it and neither is blocked on it.
Fix is to return the execute error and let the existing driver branches do their work. That will surface template mistakes that render silently today, which is why it is better landed on its own than folded into a feature PR.
internal/template/template.goexecutes each string template and, when execution fails, returns the input string unchanged. The error never reaches the caller.Every script-Job strategy driver carries a branch for exactly this case, and none of them can be reached by a template execute error. A bad expression renders as a literal or as
<no value>, and the Job runs with it. You get a Pod that starts and writes to the wrong place, with nothing in the controller status saying why.This is shared code under
internal/, reached by the Redis, Kafka, RabbitMQ, Job and Altinity drivers alike, so the dead branch is not one driver's problem.Found by reading the function while reviewing #3992 and #4000. Neither PR introduces it and neither is blocked on it.
Fix is to return the execute error and let the existing driver branches do their work. That will surface template mistakes that render silently today, which is why it is better landed on its own than folded into a feature PR.