Redmine timed out on this, so I'm posting here.

On Wed, Sep 10, 2008 at 12:59 PM,  <[EMAIL PROTECTED]> wrote:
> Feature #614: Resource types should never have a default value for 'ensure'
>
> Author: luke
> Status: Accepted
> Priority: Normal
> Assigned to: community
> Category: RAL
> Target version:
> Complexity: Medium
> Patch: None
> Affected version: 0.24.4
> Keywords:
>
> Some of the resource types, e.g., 'user', have default values (usually
> 'present') for 'ensure', but most do not.
>
> All resource types that have this default should be switched not to have
> one.
>
> This is obviously going to involve some backward compatibility issues, so
> the initial steps should be to add compatibility warnings to these types
> when the default values are used, and then at some point in the future we
> actually make the change.

I would like to voice the opinion that this is a really bad idea for a
couple of reasons:

1) The defaults can be reasonably set to "the most common positive
action", which is where the bulk of them are already.  For package
this equates with "install", for users it's "present", etc.  The vast
majority of puppet code involves specifying a resource because you
need it, not because you don't.

2) Changing this mechanism means a not insignificant update of
essentially every puppet recipe ever written.  In our current repo, it
would mean updating somewhere in the neighborhood of 629 resources.

3) The counter argument, that explicit is better than implicit, is
true except where it conflicts with DRY. :)  In this instance, you can
make a really easy standard: if a resource has a common positive
action that does the least potential harm, it should be the default
action.  Otherwise, it should have no default action.  With things
like "package", if you remove the default, you'll be repeating
yourself like a crazy man.

In closing, just say no to feature #614. :)

I'm Adam Jacob, and I approve this message.

-- 
HJK Solutions - We Launch Startups - http://www.hjksolutions.com
Adam Jacob, Senior Partner
T: (206) 508-4759 E: [EMAIL PROTECTED]

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