fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fab-user] The meaning of failure


From: Christian Vest Hansen
Subject: Re: [Fab-user] The meaning of failure
Date: Sat, 5 Jul 2008 16:15:17 +0200

Er, thoughts? I tried it out in a local branch, got it to work, liked
how it turned out, merged and pushed.

So I'm calling #2 and #10 (from TODO) fixed. :)

The _fail function turned out to be a good idea, IMO.

On 7/5/08, Jeff Forcier <address@hidden> wrote:
> Hi Christian,
>
>  I'm poking at the failure code and Fabric seems a little inconsistent,
>  and I'm trying to figure out if it's just me.
>
>  On the one hand, local() and load() have the newer behavior set up,
>  where users can specify ignore, warn or abort, and other operations
>  are clearly intended to get this behavior as their docstrings mention
>  it. On the other hand, _on_hosts_do() and the strategies expect a
>  Boolean return value from operations and abort immediately on False.
>  That doesn't jive well with the concept of allowing users to state
>  they want errors ignored or simply warned about.
>
>  I think the best approach is to remove the "fail-fast" aspect of the
>  strategies and _on_hosts_do, i.e. to (for now) ignore the return
>  value, and to roll out the new behavior everywhere instead. I've got a
>  local commit where I refactored that behavior -- check failure code,
>  emit warning if warning, abort if abort -- to make this a bit easier.
>  That patch is attached for your perusal -- didn't want to push to
>  GitHub until I've actually changed functionality.
>
>  At one point I was wondering if exceptions would work well here, but I
>  don't think that's the case; we'd need more lines of code per
>  operation to deal with that correctly (especially concerning "ignore")
>  than if we just use a refactored _fail() function.
>
>  Anyway, do you have any thoughts on the matter? Anything I'm missing?
>
>  Thanks,
>
> Jeff
>
> _______________________________________________
>  Fab-user mailing list
>  address@hidden
>  http://lists.nongnu.org/mailman/listinfo/fab-user
>
>
>


-- 
Venlig hilsen / Kind regards,
Christian Vest Hansen.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]