incubator-bloodhound-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olemis Lang <ole...@gmail.com>
Subject Re: [Apache Bloodhound] #404: Populate default schema on product addition
Date Fri, 22 Feb 2013 15:48:26 GMT
On 2/22/13, Jure Zitnik <jure@digiverse.si> wrote:
> On 2/22/13 10:12 AM, Olemis Lang wrote:
>> On 2/22/13, Apache Bloodhound <bloodhound-dev@incubator.apache.org>
>> wrote:
>
[...]
>
>>> Comment (by matevzb):
>>>
>>>   Initial implementation in r1448946, until we consolidate on extending
>>> the
>>>   IEnvironmentSetupParticipant on Product creation.
>>>
>> *Up to this point* , that should never happen and MUST not be supported .
>>
> How I see things will evolve is the following - we won't be changing
> IEnvironmentSetupParticipant interface. I should be kept untouched to
> keep the backward compatibility with existing plugins. As discussed in
> one of the previous threads, the interface will still be used as before
> but on per product basis.

Environment setup process should be completely apart of product scope
. It's a TRAC_ADMIN tasks i.e. nothing to do with anything you'd like
to do in product scope . Besides it blocks system execution (i.e.
upgrade msg, DB schema modifications, revert on error , etc, etc, etc
...) and we should not be doing such things ... or otherwise stated
TRAC_ADMIN should be doing that once and products will only be able to
use what is available in global environment , no more ...

> As trac.env.EnvironmentSetup (the class that
> sets up default resources) implements that interface,

Also notice that setup participants list in product environments will
always be empty by design .

> after implementing
> the #404 and #406, the default system tables (for newly added product)
> will be automatically populated by EnvironmentSetup so there will be no
> more need for the code introduced with this commit.
>

For default data and other similar stuff product listeners (or alike)
should be enough .

IMO the price to pay for not adding a few lines is too high . Besides
EnvironmentSetup class may also implement product change listener
interfaces and populate them with default data just like it does for
environments . Such refactoring will not be hard to install in place
and IMO it's the right way to go ... or otherwise stated the opposite
way MUST NOT be the way to go .

-- 
Regards,

Olemis.

Mime
View raw message