ClusterHQ/flocker — pull request #597 by wallrj (2014-08-20 13:00:53+00:00)
Title: A wrapper around gatherResults which logs failures from a list of deferreds - fixes 296

Here's another design sketch.

I'm not sure if this is the generic solution that @itamarst had in mind when we were discussing this in https://github.com/ClusterHQ/flocker/pull/563#issuecomment-52213838

There are actually a bunch of Twisted tickets proposing improvements / replacements to DeferredList and gatherResults.

I thought about how I might address some of those, but nothing really sprang to mind.

* http://twistedmatrix.com/trac/ticket/5061
* http://twistedmatrix.com/trac/ticket/4977
* http://twistedmatrix.com/trac/ticket/4919

The discussions in those tickets seem to suggest that there should be a suite of `gatherResults`-like functions for different use cases. I guess the logging of errors is one such use-case but a function called `gather_deferreds_and_log_errors` seemed a bit long winded.

I tried to make the logger configurable, with a view to using Eliot logging in the future, but I guess might just write another wrapper for that.

Anyway, up for design review and discussion.