Skip to content

template rendering swallows execute errors, so every strategy driver's failure path is unreachable #4175

Description

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.

Activity

  1. added
    kind/bugCategorizes issue or PR as related to a bug
    area/storageIssues or PRs related to storage (linstor, seaweedfs, bucket, velero, harbor)
    triage/acceptedIndicates an issue is ready to be actively worked on
    priority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to complete
    and removed
    triage/needs-triageIndicates an issue needs triage by a maintainer
    on Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/storageIssues or PRs related to storage (linstor, seaweedfs, bucket, velero, harbor)kind/bugCategorizes issue or PR as related to a bugpriority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to completetriage/acceptedIndicates an issue is ready to be actively worked on

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions