There has been a long running concept to turn #suggests into an optional form of #depends, so it would have the same effect as depends if the cookbook is found in terms of triggering a download and loading in the right order, but wouldn't cause a failure if that cookbook wasn't found. Maybe after I get this dialect stuff squared away I'll write up that patch :)
--Noah
On Oct 2, 2013, at 5:26 PM, Bryan Taylor < "> > wrote:
>
> I agree. I'd like to see a notion of "conditional dependence", so that java depends on windows OR me setting an opt-out flag that says I won't ever windows. I sometimes go in and edit these dependencies out of the metadata before I load it to my chef server. It happens a lot with yum or apt as well.
>
> From: Blake Irvin < "> >
> Date: Wednesday, October 2, 2013 6:17 PM
> To: " "> Dev" < "> >
> Subject: [chef-dev] dependency spaghetti
>
> (Please redirect me if this is the wrong list)
>
> We seem to be in a place as a Chef community where the 'depends' feature of cookbook metadata is getting used a little bit too freely.
>
> For example, the 'java' cookbook includes a 'depends' for the 'windows' cookbook - this means that I'm forced to download the 'windows' cookbook to all of my *nix machines. Messy at best.
>
> Shouldn't we be using 'suggests'? Or better yet, shouldn't we reserve dependency for cases where a cookbook really *must* have another cookbook available to it to compile (and, shouldn't we avoid tightly-coupled dependencies whenever possible because we don't wan to be brittle)?
>
> This is especially painful for us because we are currently seeing very slow download rates from hosted Chef (about 60kbps), so downloading addt'l cookbooks makes things noticeably slower.
>
> (Another great example of dependency hell is installing the 'nagios' cookbook, which requires 'apache', which requires 'php', which in turn requires 'mysql' - yet it's not really true that all of these things are intrinsically tied together - we are losing the things we've learned from the Unix model and service-oriented architectures when we staple things to each other this way.)
>
> Okay, so that got a little bit ranty, but that's because I really like Chef and I hate to see a slim, sexy, powerful tool get bloated and brittle for no good reason.
>
> Discuss!
>
>
> Blake
Archive powered by MHonArc 2.6.16.