Issue #13063 has been updated by James Turnbull.

I also strongly suggest running the whole thread by puppet-dev too. I am sure 
there are some edge cases we're going to exposure and more eyes etc.
----------------------------------------
Refactor #13063: Cleanup of settings / defaults definitions
https://projects.puppetlabs.com/issues/13063#change-56542

Author: Chris Price
Status: Accepted
Priority: High
Assignee: Chris Price
Category: settings
Target version: Telly
Affected Puppet version: 
Keywords: 
Branch: 


A few of the tickets that I’ve been working on for Telly (#7749) have brought 
me into repeated conflict with the way that our settings / defaults are 
implemented.  After discussion with other folks in the platform team area, I am 
proposing the following changes:

1. The #newsetting method in settings.rb will be greatly simplified, or perhaps 
go away entirely.  Right now it’s purpose is to attempt to guess what the type 
of a specific setting is via a case statement that in some cases involves 
regular expressions.  This seems unnecessary, and it seems like there is 
consensus to making the settings more strongly typed so that this guesswork can 
be removed.
2. In defaults.rb, there will no longer be some settings that are specified as 
arrays and others that are specified as hashes... they will all be specified as 
hashes.
3. All of the settings in defaults.rb will explicitly specify a setting type, 
with the possible exception of string settings.  Any setting that does not 
explicitly specify a type will be treated as a string setting.
4. The “setdefaults” method in settings.rb will be renamed to 
“definesettings()”, because we feel this is a more accurate description of what 
it is actually accomplishing.


There are several other changes that have been proposed, but I’d prefer to 
handle this somewhat incrementally so those are the only ones that I’d be 
likely to tackle during this iteration.  Future iterations might include:
1. Getting rid of the “sections” concept entirely
2. Differentiating between a “FileSetting” and a “DirectorySetting”
3. … can’t remember what else we talked about, will update this as things come 
to mind.


-- 
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