Bug #15193

Static compiler does not work because of indirection interface changes

Added by Luke Kanies 12 months ago. Updated 7 months ago.

Status:ClosedStart date:06/24/2012
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:compiler
Target version:2.7.20
Affected Puppet version:2.7.17 Branch:
Keywords:

Description

The following patch is necessary to use the static compiler:

diff --git a/lib/puppet/indirector/catalog/static_compiler.rb b/lib/puppet/indirector/catalog/static_compiler.rb
index 1d92121..f89f351 100644
--- a/lib/puppet/indirector/catalog/static_compiler.rb
+++ b/lib/puppet/indirector/catalog/static_compiler.rb
@@ -130,8 +130,9 @@ class Puppet::Resource::Catalog::StaticCompiler < Puppet::Indirector::Code
Puppet.info "Content for '#{resource[:source]}' already exists"
else
Puppet.info "Storing content for source '#{resource[:source]}'"
-      content = Puppet::FileServing::Content.find(resource[:source])
-      Puppet::FileBucket::File.new(content.content).save
+      content = Puppet::FileServing::Content.indirection.find(resource[:source])
+      file = Puppet::FileBucket::File.new(content.content)
+      Puppet::FileBucket::File.indirection.save(file)
end
end
end

I know this is a known issue, since I’ve seen it discussed, but it’s still not fixed, and I couldn’t find a filed bug.

I’m assuming there are also no tests for this code, else this clear failure would have been caught.


Related issues

Related to Puppet - Bug #15899: Class methods should be added back to indirected classes Rejected 08/08/2012
Related to Puppet - Feature #6873: Catalogs should be statically compiled Closed 03/28/2011
Related to Puppet - Feature #16188: File content should be retrievable from remote buckets ot... Accepted 08/30/2012
Related to Puppet - Bug #16201: The static compiler needs to mark generated resources as ... Accepted 08/31/2012
Blocks Puppet - Feature #12158: Switch to the static compiler as default behavior Needs More Information 01/25/2012

History

#1 Updated by Luke Kanies 10 months ago

  • Assignee set to eric sorenson

As discussed, I think it’s critical that this bug be fixed (preferably through fixing the indirector methods) for Telly.

#2 Updated by Andrew Parker 10 months ago

  • Status changed from Unreviewed to Accepted
  • Target version set to 3.0.0

#3 Updated by Jeff McCune 10 months ago

I’ve taken this card and am starting work on it this afternoon.

#4 Updated by Jeff McCune 10 months ago

  • Category set to compiler
  • Assignee changed from eric sorenson to Jeff McCune

#5 Updated by Jeff McCune 10 months ago

  • Target version changed from 3.0.0 to 2.7.x

@eric

I’m re-targeting this at Puppet 2.7.x because this is a bug affecting the static compiler. The static compiler was first released in Puppet 2.7.0 [1]

[1] https://groups.google.com/forum/?fromgroups=#!topic/puppet-users/_-E0XBZb8pM

#6 Updated by Jeff McCune 10 months ago

For posterity the only documentation on the static compiler I’ve been able to find is Luke’s original prototype at https://github.com/lak/puppet-static-compiler/blob/master/README.markdown

I’m not terribly happy we merged this and released it with no documentation whatsoever. I’m going to make documentation in Puppet a requirement for this bug to be considered resolved.

The required documentation I will include is:

  1. How to configure the static compiler
  2. How the static compiler is intended to be used
  3. What the expected behavior of the static compiler is

#7 Updated by Jeff McCune 10 months ago

  • Status changed from Accepted to Merged - Pending Release
  • Assignee deleted (Jeff McCune)
  • Target version changed from 2.7.x to 2.7.20

Merged into 2.7.x

As: 2.7.19-95-g74716f1 https://github.com/puppetlabs/puppet/commit/74716f1

If you come to this ticket trying to get the static compiler to work, please see the static compiler documentation in the README_DEVELOPER

#8 Updated by Jeff McCune 10 months ago

Merged into 3.x

As: 3.0.0-rc5-22-g6070035

#9 Updated by Jeff McCune 10 months ago

Merged into master

As: 3.0.0-rc5-43-g3175043

#10 Updated by Jeff McCune 10 months ago

16188 filed to capture the filebucket { puppet: } issue.

#11 Updated by Matthaus Owens 9 months ago

Released in Puppet 3.0.0-rc6. Release pending for 2.7.x

#12 Updated by Matthaus Owens 7 months ago

  • Status changed from Merged - Pending Release to Closed

Released in Puppet 2.7.20

Also available in: Atom PDF