readEnv function isn't found, causing tasks to re-run to succeed.
Closed this issue ยท 0 comments
Excoriate commented
๐ชฒ Describe the Bug
The readEnv
function while interpolating values in the Task manifest is causing random bugs :/
echo "Info: Running Stiletto job"
/home/runner/work/platform-iac-registry/platform-iac-registry/stiletto job \
--show-env-vars \
dagger --task-files="pipelines/tasks/service-registry/config/manager/iac-stack-cd-github.yml"
shell: /usr/bin/bash -e {0}
env:
AWS_ACCESS_KEY_ID: ***
AWS_SECRET_ACCESS_KEY: ***
TF_VAR_environment: stage
TF_VAR_aws_region: sa-east-1
Info: Running Stiletto job
Using config file: /home/runner/.stiletto.yaml
INFO The jobName is not set, using the random name: job-yNVKF
โโโโโโโ โโโโโโโโ โโ โโ โโโโโโโ โโโโโโโโ โโโโโโโโ โโโโโโ
{"level":"info","ts":1690875141.4460537,"caller":"specs/taskspecbuilder.go:403","msg":"The manifest full path is resolved as: /home/runner/work/platform-iac-registry/platform-iac-registry/pipelines/tasks/service-registry/config/manager/iac-stack-cd-github.yml"}
โโ โโ โโ โโ โโ โโ โโ โโ โโ
โโโโโโโ โโ โโ โโ โโโโโ โโ โโ โโ โโ
{"level":"info","ts":1690875141.4466994,"caller":"specs/taskspecbuilder.go:245","msg":"task manifest added to the builder"}
โโ โโ โโ โโ โโ โโ โโ โโ โโ
{"level":"error","ts":1690875141.4467802,"caller":"specs/taskspecbuilder.go:170","msg":"Cannot compile manifest template functions. Cannot compile template: could not parse the template: template: taskManifest:12: function \"readEnv\" not defined","stacktrace":"github.com/excoriate/stiletto/internal/core/specs.(*Builder).WithCompiledManifestFunctions\n\t/home/runner/work/stilettov2/stilettov2/internal/core/specs/taskspecbuilder.go:170\ngithub.com/excoriate/stiletto/cmd/cli.glob..func1\n\t/home/runner/work/stilettov2/stilettov2/cmd/cli/dagger.go:80\ngithub.com/spf13/cobra.(*Command).execute\n\t/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:944\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:1068\ngithub.com/spf13/cobra.(*Command).Execute\n\t/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:992\ngithub.com/spf13/cobra.(*Command).ExecuteContext\n\t/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:985\ngithub.com/excoriate/stiletto/cmd/cli.Execute\n\t/home/runner/work/stilettov2/stilettov2/cmd/cli/root.go:30\nmain.main\n\t/home/runner/work/stilettov2/stilettov2/main.go:6\nruntime.main\n\t/opt/hostedtoolcache/go/1.20.6/x64/src/runtime/proc.go:250"}
โโโโโโโ โโ โโ โโโโโโโ โโโโโโโ โโ โโ โโโโโโ
{"level":"info","ts":1690875141.4469755,"caller":"specs/taskspecbuilder.go:211","msg":"task manifest added to the builder"}
{"level":"info","ts":1690875141.4469833,"caller":"specs/taskspecbuilder.go:298","msg":"The 'baseDir' in the task manifest isn't set, so it'll be resolved to the current directory"}
Automated pipelines, workflows and whatever can be containerized in your own laptop ๐จ๐ปโ๐ป(powered by Dagger.IO)
ERROR PipelineCfg configuration error: Unable to start pipeline instance cannot build manifest of type 'MANIFEST_TASK': Argument or input error: : Cannot compile manifest template functions. Cannot compile template: could not parse the template: template: taskManifest:12: function "readEnv" not defined: could not parse the template: template: taskManifest:12: function "readEnv" not defined
Error: Process completed with exit code 1.
โก๏ธ Type of Bug
Please select the type of bug you are reporting:
- Command Error
- Crash/Error Message
- Installation Issue
- Documentation Issue
- Other (Please describe)
๐ฌ Steps to Reproduce
Not clear yet. It occur randomdly.