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
Module module-name is declared multiple times (in 'same/path/to/garden.yml' and 'same/path/to/garden.yml')
Expected behavior
No error
Additional context
Basically, I have setup as described further:
root-dir/
project.garden.yml
tpls/
tpl.garden.yml
modules/
# these modules are templated modules that might use root-dir/tpls/tpl.garden.yml ModuleTemplate
mdl-one/garden.yml
mdl-two/garden.yml
etc.
Modules in modules/ directory are of various types and can depend on each other. There is only one particular templated module that cannot be properly processed, while other templated modules work fine.
From silly logs I found that it is loaded and added twice:
# this message is appearing the first among similar messages
{"msg":"Load module and workflow configs from /root-dir/modules/mdl-one/garden.yml","section":"","timestamp":"2022-12-21T09:10:35.620Z","level":"silly","allSections":[]}
{"msg":"Load module and workflow configs from /root-dir/modules/mdl-one/garden.yml","section":"","timestamp":"2022-12-21T09:10:35.622Z","level":"silly","allSections":[]}
# this message is appearing the first among similar messages
{"msg":"Adding module mdl-one","section":"","timestamp":"2022-12-21T09:10:36.581Z","level":"silly","allSections":[]}
{"msg":"Adding module mdl-one","section":"","timestamp":"2022-12-21T09:10:36.583Z","level":"silly","allSections":[]}
And finally error message with stack trace:
Error: Module mdl-one is declared multiple times (in 'root-dir/modules/mdl-one/garden.yml' and 'root-dir/modules/mdl-one/garden.yml')
at Garden.addModuleConfig (/snapshot/project/tmp/pkg/cli/node_modules/@garden-io/core/src/garden.ts:1033:13)
at Garden.wrapped (/snapshot/project/tmp/pkg/cli/node_modules/@garden-io/core/src/util/profiling.ts:149:39)
at /snapshot/project/tmp/pkg/cli/node_modules/@garden-io/core/src/garden.ts:1003:63
at tryCatcher (/snapshot/project/tmp/pkg/cli/node_modules/bluebird/js/release/util.js:16:23)
at MappingPromiseArray._promiseFulfilled (/snapshot/project/tmp/pkg/cli/node_modules/bluebird/js/release/map.js:68:38)
at MappingPromiseArray.<anonymous> (/snapshot/project/tmp/pkg/cli/node_modules/bluebird/js/release/promise_array.js:115:31)
at MappingPromiseArray.init (/snapshot/project/tmp/pkg/cli/node_modules/bluebird/js/release/promise_array.js:79:10)
at MappingPromiseArray._asyncInit (/snapshot/project/tmp/pkg/cli/node_modules/bluebird/js/release/map.js:37:10)
at _drainQueueStep (/snapshot/project/tmp/pkg/cli/node_modules/bluebird/js/release/async.js:97:12)
at _drainQueue (/snapshot/project/tmp/pkg/cli/node_modules/bluebird/js/release/async.js:86:9)
at Async._drainQueues (/snapshot/project/tmp/pkg/cli/node_modules/bluebird/js/release/async.js:102:5)
at Immediate.<anonymous> (/snapshot/project/tmp/pkg/cli/node_modules/bluebird/js/release/async.js:15:14)
at processImmediate (internal/timers.js:464:21)
Error Details:
pathA: root-dir/modules/mdl-one/garden.yml
pathB: root-dir/modules/mdl-one/garden.yml
I've also tried to remove .garden directory hoping it will somehow help, but unfortunately it didn't(
Your environment
OS: ubuntu 20.04
How I'm running Kubernetes: self-managed with Kops on AWS
garden version: tried from 0.12.45 to 0.12.48
The text was updated successfully, but these errors were encountered:
I've resolved issue by completely removing k8s garden environment. Most likely such error was caused by upgrading Garden CLI from 0.12.47 to 0.12.48 with already existing/deployed k8s garden environment. I.e:
Bug
Current Behavior
Garden produces error:
Expected behavior
No error
Additional context
Basically, I have setup as described further:
Modules in modules/ directory are of various types and can depend on each other. There is only one particular
templated
module that cannot be properly processed, while othertemplated
modules work fine.From silly logs I found that it is
loaded
andadded
twice:And finally error message with stack trace:
I've also tried to remove
.garden
directory hoping it will somehow help, but unfortunately it didn't(Your environment
garden version
: tried from 0.12.45 to 0.12.48The text was updated successfully, but these errors were encountered: