[PUP-5978] Deprecate static compiler Created: 2016/02/25  Updated: 2016/10/05  Resolved: 2016/03/02

Status: Closed
Project: Puppet
Component/s: None
Affects Version/s: None
Fix Version/s: PUP 4.4.0

Type: Bug Priority: Normal
Reporter: Josh Cooper Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to PUP-6250 Remove static compiler terminus Closed
relates to PUP-6415 static_compiler: symlinks in recursed... Closed
Support
supports PUP-5882 4.x TechDebt - to be resolved in Pup... Closed
Template:
Epic Link: (Burnside) Direct Puppet: Client Static Catalog
Story Points: 0
Release Notes: New Feature
Release Notes Summary: As part of the 4.4 documentation around static_catalogs we should mention that static_compiler is now deprecated.

 Description   

The static compiler has a few problems:

1. It cannot inline windows files because it calls Puppet::Resource#to_ral. That method triggers agent-side validation to occur on the master. Since windows paths start with a drive letter and not /, the path appears to be a relative path to the POSIX master, causing validation to fail.
2. It doesn't handle multiple sources values and related sourceselect parameter.
3. It adds the desired checksum to the content property, something we are working on separating (PUP-1043).
4. It adds an edge from the recursive parent to each generated resource, e.g. /foo => /foo/bar/baz, instead of the immediate parent, e.g. /foo/bar => /foo/bar/baz. That said, adding the edge has no effect, because the agent doesn't copy edges from the resource catalog to the RAL catalog. The actual reason we get any dependencies at application time, is because the file type autorequires its immediate parent.
5. It doesn't handle containment when the relationship is expressed from another resource to the recursive file:

file { '/path/to/dir':
  ensure  => directory,
  recurse => remote,
  source  => 'puppet:///modules/mymod/mydir',
}
notify { 'hi':
  require => File['/path/to/dir']
}

Without the static compiler, the agent will add a reverse dependency edge, e.g. before => Notify['hi'], from each eval generated resource to the notify resource (actually to a sentinel whit which then depends on the notify resource). This provides containment for all of the generated resources.

The deprecation warning should mention "use static catalogs instead."



 Comments   
Comment by Henrik Lindberg [ 2016/04/13 ]

Is there a removal ticket? It should be linked to the "5.0.0 Removals" epic, and also to here.

Comment by Josh Cooper [ 2016/04/29 ]

Henrik Lindberg thanks for reminder, I added a removal ticket in PUP-6250.

Generated at Thu Jan 23 01:08:11 PST 2020 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.