John Sonnenschein wrote: > On 17-Sep-08, at 11:37 AM, Mark J. Nelson wrote: >> - I'm not thrilled with the explicit fallback from Monaco and/or >> BOO to DOO, especially not in the BugDB lookup method. I think the >> caller should be able to specify where to look for bugs, and how to >> prioritize those sources of info. See below. >> >> So the way I had envisioned something like this working would be to >> have two classes, something like "BugInfoServer" and "BugDB." >> >> The BugDB initializer would take a list of BugInfoServer objects, in >> priority order. For each lookup, test for validity of the bugid >> against each BugInfoServer (presumably via a class method) in turn, >> until you have exhausted the search space. Not sure whether a valid >> return should mean "stop searching," that probably depends on >> whether a bugid may be valid in multiple info servers. >> >> The BugInfoServer class would have (at least) two subclasses: >> Bugster (which would encompass both Monaco and BOO, depending on >> SWAN access) and Bugzilla (which would take a server argument, >> probably defaulting to DOO). >> >> Am I making this too complex and general? > > Well, you're right of course, What I wonder is if it makes sense to > meet halfway on that and keep what's there, as well as adding a list > of priorities to BugDB.__init__ ( something as simple as literally a > list might work ) > > __init__(self, forceBoo = false, priorities = [ "monaco", "boo", > "doo" ] ) ... for example ? > > thoughts?
Possibly. I still think that "monaco" and "boo" are separate instances of "bugster," and shouldn't be separately prioritized. They are really just different access paths to the same backing store. (Yes, I know that's not strictly true, but conceptually, it works.) Missing from that, but easily added, would be a flag to tell bugdb whether or not to query all servers, or stop at the first positive match. Missing from that, but not as easily added, is the flexibility of generalizing Bugzilla access, with d.o.o being a specific instance. This might not be important, especially if we find that the d.o.o instance is particularly customized. Anybody else? --Mark