CompilationDir filter doesn't support arrays or hashes
masterzen opened this issue · 0 comments
masterzen commented
Description of problem
When using parameters values that are arrays containing references to the compilation dir (ie using $::settings::codedir
for instance, the CompilationDir
filter is unable to detect that some of the array or hash members are equivalent.
For instance the following resource:
service { 'puppetserver':
...
subscribe => [File["${::settings::codedir}/hiera.yaml"], Package['hiera-eyaml']]
}
will produce the following diff:
Service[puppetserver] =>
parameters =>
subscribe =>
- ["File[/tmp/ocd-ipc-20180605-856-t3sswg/ocd-builddir-20180605-858-e8z4wo/hiera.yaml]", "Package[hiera-eyaml]"]
+ ["File[/tmp/ocd-ipc-20180605-856-t3sswg/ocd-builddir-20180605-861-awzqbm/hiera.yaml]", "Package[hiera-eyaml]"]
Command used and debugging output
octocatalog-diff --fact-file /repo/ci/facts/ubuntu.yaml --from-fact-override "role=tower" --to-fact-override "role=tower" --bootstrap-environment "V=0,SSH_AUTH_SOCK=/ssh-agent/ssh-agent.sock" --compare-file-text --filters CompilationDir --display-detail-add --debug
Platform and version information
- Your OS: ubuntu 16.04
- Your Ruby version: 2.3.1
- Your version of Puppet: 5.5.0
- Your version of octocatalog-diff: 1.5.3
It would be great for the CompilationDir
filter to traverse arrays or hashes and apply recursively itself before taking any decision.