Skip to content

CompilationDir doesn't ignore changes when using the cache #189

Open
@masterzen

Description

@masterzen

Description of problem

When activating the cache (with --cached-master-dir option), the CompilationDir filter gets the cache path as the :from_compilation_dir instead of the original compilation dir that was used when the cache was compiled.

Thus the filter doesn't filter out resources that references the compilation dir.

For instance the following resource (from the vox pupuli hiera module):

    file { '/etc/hiera.yaml':
      ensure => symlink,
      target => "${confdir}/hiera.yaml",
    }

doesn't get ignored:

  File[/etc/hiera.yaml] =>
   parameters =>
     target =>
      - /tmp/ocd-ipc-20180604-1-nbv4q/ocd-builddir-20180604-256-10c2qyt/hiera.yaml
      + /tmp/ocd-ipc-20180605-232-1yut8ed/ocd-builddir-20180605-237-13ya1gx/hiera.yaml

When running without the cache enabled, the parameter (and resource) above gets properly filtered out.

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

Anything else to add that you think will be helpful?

Either the catalog should be rewritten with the cache directory or octocatalog-diff should keep the original compilation dir in the cache so that the CompilationDir could be fed with the correct information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions