Issue #5719 has been updated by Daniel Pittman.

> This makes it so you can’t load both Puppet and Dashboard at the same time.
> It’s an easy fix:
>
> -  module Resource
> +  class Resource

I generally like this idea, but I am concerned that this introduces
potentially horribly complicated situations that will result in other
crazy failures.  Specifically, the Dashboard code declares a bunch of
stub objects that are only used to support YAML deserialization of the
Puppet report objects.  They are not intended to do anything but work
around quirks of the Ruby system, and our reports being the strict
model of the objects that implement them.

(Also, loading the two at the same time has, historically, been an
explicit non-goal for the projects, so we could quite reasonably have
code on either side that assumes the behaviour is *not* the same as
the other, for the same object.)

I have no idea what code in Dashboard might potentially call accessors
that, when Puppet is loaded, cause behaviour to occur that is
absolutely unexpected.

Nick Lewis, meanwhile, had a strategy that I understand allowed us to
do away with these dummy objects entirely in Dashboard when we unpack
those reports.  A safer strategy might be to head down that path, and
make sure we don't need the dummy objects at all.
----------------------------------------
Bug #5719: Dashboard tries to declare Puppet::Resource as a module
https://projects.puppetlabs.com/issues/5719

Author: Luke Kanies
Status: Accepted
Priority: Normal
Assignee: 
Category: 
Target version: 
Keywords: 
Branch: 
Affected URL: 
Affected Dashboard version: 


This makes it so you can't load both Puppet and Dashboard at the same time.  
It's an easy fix:
<pre>
diff --git a/lib/puppet/report.rb b/lib/puppet/report.rb
index 37ec1de..d13a7ec 100644
--- a/lib/puppet/report.rb
+++ b/lib/puppet/report.rb
@@ -58,7 +58,7 @@ module Puppet #:nodoc:
     end
   end
 
-  module Resource
+  class Resource
     class Status
     end
   end
</pre>


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to