fix: module variables not evaluated properly #2877
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This was causing a case where variables could not be evaluated properly if they were nested inside a module, that was inside another expanded module.
The moduleConfig would incorrectly store
module.parent[0].module.child
as the key instead ofmodule.parent.module.child
, since theunexpandedName
was only making sure the child module part was unexpanded, not the full module address. This meant that the module was being skipped when evaluating the variable because at that stage we are looking upmodule.parent.module.child
in the moduleConfig.To fix this we use the block's original name to add the module to the moduleConfig since that should be fully unexpanded.