On 1/05/09 15:03, Luke Kanies wrote:
> On May 1, 2009, at 1:33 PM, Brice Figureau wrote:
> 
>> Since the last stream of patches coming in master, some tests are  
>> now failing.
>> This bunch of patches fixes them (except the daemontools ones which  
>> are taken
>> care by Bryan Allen).
>>
>> Note: all the snippets tests were failing because scope.rb and  
>> parser.rb tests
>> were activating storeconfigs, which since the last refactoring  
>> changes some
>> internal terminii to their active_record counterpart.
>> Since setting storeconfigs=false doesn't reset them to sane  
>> defaults, I hacked the
>> tests themselves to do it.
>> Maybe the correct fix could be:
>> * to change storeconfigs default's hook to reset those terminii to  
>> correct values
>> when set to false.
> 
> This would require modifying the Settings class - we can currently  
> force a setting's hook to get triggered when the setting is set, but  
> we can't force it to get triggered when the Settings instance is  
> cleared.  Most likely, the Settings class should trigger any hooks  
> marked 'call_on_define' when the Settings instance is cleared, as this  
> is effectively defining the value.
> 
> With that, then changing the storeconfigs (and async_storeconfigs)  
> hook would be sufficient.

Yes it's nice and easy, but which value should we send to the hook?
It's quite easy at start because we set it with the current value 
(usually the default one), but when clearing?

>> * make sure tests set storeconfigs=false afterward.
> 
> This would be a decent short-term solution and would work as long as  
> the hook were updated.

Which raises the following question. Which value should I use to reset 
the terminii settings?
And where can I store the previous settings in case we want to set the 
terminii back to their values?

>> * make sure storeconfig is true and rails exists in the various  
>> active_record
>> terminii.
> 
> This is kind of a catch-22, though - the terminii are only used if  
> storeconfigs is true, so having them make sure storeconfigs is true  
> would basically have a closed loop that never got used.

Yes, you're right, that was just to be really safe.
-- 
Brice Figureau
Days of Wonder
http://www.daysofwonder.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" 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-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to