accesscontroltool icon indicating copy to clipboard operation
accesscontroltool copied to clipboard

Undeclared variables are not detected while applying or deploying YAML

Open leonardoderks opened this issue 6 years ago • 2 comments

It would be good to have an exception when we use undeclared variables in a YAML file. Example in the following code:

- DEF groups=[case1,case2,case3]
# Groups
- group_config:
   - FOR group IN ${groups}:
       - appl-om-de-dev-example-${group}-pd:
           - name: appl-om-de-dev-example-${group}-pd
             isMemberOf: parent-role
             path: /home/groups/pages/example/${site}-default

# Permissions
- ace_config:
   - FOR group IN ${groups}:
       - appl-om-de-dev-example-${group}-pd:
          - path: /content/pages/example/${site}
            permission: allow
            actions: read

The variable ${site} is not defined and instead of throwing an exception is replaced by an empty value.

leonardoderks avatar Mar 21 '19 13:03 leonardoderks

I think we should fail fast in such a case since it could lead to a difference between indented permissions and actual permissions for a certain path in the system.

jochenkoschorke avatar Mar 26 '19 14:03 jochenkoschorke

The problem with changing this behaviour now could be that it unexpectedly breaks existing setups - we might still do though but we should mention it in the release notes.

Assigned version 2.4.1 since there is no PR for it yet

ghenzler avatar Nov 04 '19 08:11 ghenzler