garden
garden copied to clipboard
Disabled modules still expect to have modules variables defined
Bug
Current Behavior
When setting disabled: true
on a module level, the CLI throws an error if a module variable is not defined properly.
Expected behavior
Ignore the module altogether when it's disabled.
Reproducible example
Workaround
Set defaults for the variables
Suggested solution(s)
Additional context
Your environment
- OS: macOS
- How I'm running Kubernetes: docker desktop
garden version: 0.12.44
Thanks for raising this @idoshamun! By the way, what do you mean by "variable not defined properly"? Do you mean a template string in the module variables that can’t be resolved? E.g., a template string that uses a variable only defined in the environment where the module is enabled.
It would be very helpful if you can share an example configuration to reproduce it.
Do you mean a template string in the module variables that can’t be resolved?
Yes, exactly this.
It would be very helpful if you can share an example configuration to reproduce it.
Might be able to do it in the weekend :)
This issue has been automatically marked as stale because it hasn't had any activity in 90 days. It will be closed in 14 days if no further activity occurs (e.g. changing labels, comments, commits, etc.). Please feel free to tag a maintainer and ask them to remove the label if you think it doesn't apply. Thank you for submitting this issue and helping make Garden a better product!
Hi @idoshamun, i know this reply comes fairly late but still wanted to let you know that this issue has been solved in Garden >=0.13.x with the new action configuration. See here for more info on how to use actions instead of modules: https://docs.garden.io/using-garden/actions
Closing as already solved in 0.13, thanks for confirming this @twelvemo!