You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TaskSpec env is exported on the host but never passed into spec.container -- a container task silently runs without it #1059
TaskSpec.Env (pkg/taskproto/taskspec.go:30) is applied to the host wrapper shell but not to the container. So for any task with spec.container, the env map is accepted, validates, shows up in --dry-run, and has no effect on the command that actually runs.
It's a guardrail that parses but doesn't act. The case that hit us: we wanted env to make a containerised tool hermetic. fMRIPrep reads TemplateFlow settings from the environment, and an image whose ENTRYPOINT is the tool itself can't set variables in a bash -c prefix, because spawn doesn't override the entrypoint either. The spec would have looked configured and run without the setting.
Suggested fix
Pass each key as -e KEY on the docker run line. Keep the host export so -e KEY picks up the value without putting it on the command line:
Re-found independently while writing the tasks guide (#598), as #1133 item 1. Confirmed on main by generating a wrapper: export K=… on the host, then sudo docker run with no -e (pkg/taskproto/wrapper.go:133-140, :487). The guide warns about it.
Activity
scttfrdmn commentedon Oct 19, 2026
Re-found independently while writing the tasks guide (#598), as #1133 item 1. Confirmed on main by generating a wrapper:
export K=…on the host, thensudo docker runwith no-e(pkg/taskproto/wrapper.go:133-140,:487). The guide warns about it.fix: task env reaches containers; task run --wait fails on a failed t…