Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.13: [Bug]: Template variables are being interpolated on input values #5825

Open
stefreak opened this issue Mar 12, 2024 · 0 comments
Open
Labels
0.13 bug feat/templating Templating in variables and configs

Comments

@stefreak
Copy link
Member

stefreak commented Mar 12, 2024

Garden Bonsai (0.13) Bug

Current Behavior

The action prints the literal text I shouldn't be here..

Expected behavior

I expect the action to print the literal text ${local.env.UNINVOLVED_VAR}

Reproducible example

Run UNINVOLVED_VAR="I shouldn't be here." INCONSPICUOUS_VAR='${local.env.UNINVOLVED_VAR}' garden run debug with this garden.yml:

apiVersion: garden.io/v1
kind: Project
name: foo

environments:
  - name: dev

providers: []

---
kind: Run
type: exec
name: debug
spec:
  command:
  - echo
  - '${local.env.INCONSPICUOUS_VAR}'

Workaround

None available

Suggested solution(s)

Parse templates into an abstract representation, and from there do not interpolate template strings anymore on any of the intermediate evaluation results.

Additional context

Unfinished, but this would fix this: #5496

Your environment

  • OS: all

garden version Bonsai and Acorn affected.

@vvagaytsev vvagaytsev added feat/templating feat/templating Templating in variables and configs and removed feat/templating labels Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.13 bug feat/templating Templating in variables and configs
Projects
None yet
Development

No branches or pull requests

2 participants