Return-Path: X-Original-To: apmail-incubator-bloodhound-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-bloodhound-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8C325E171 for ; Tue, 29 Jan 2013 06:48:00 +0000 (UTC) Received: (qmail 97352 invoked by uid 500); 29 Jan 2013 06:48:00 -0000 Delivered-To: apmail-incubator-bloodhound-dev-archive@incubator.apache.org Received: (qmail 97316 invoked by uid 500); 29 Jan 2013 06:47:59 -0000 Mailing-List: contact bloodhound-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: bloodhound-dev@incubator.apache.org Delivered-To: mailing list bloodhound-dev@incubator.apache.org Received: (qmail 97288 invoked by uid 99); 29 Jan 2013 06:47:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Jan 2013 06:47:58 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.214.180] (HELO mail-ob0-f180.google.com) (209.85.214.180) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Jan 2013 06:47:52 +0000 Received: by mail-ob0-f180.google.com with SMTP id ef5so99485obb.11 for ; Mon, 28 Jan 2013 22:47:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type:x-gm-message-state; bh=HQKLUfvmpMcryAAL9Yc5aSqsDj4EA7fsyxR52/3fuqc=; b=ZzIqnxrKdLBDR40npVgLTTNcx6iOan31Iy0k6c71sAWXqdEttzS0I2CGJLkLSRlBLF AIz81O3ukUifwzo9bMya5c5Jq+cHpeVv6heazbOyB0I+Y3PNXU3jdSjRpzlsD78cAkCM cF7qg3qMPg96wnEBeQuBGorYbTasgbSUX0YAfWdV9Fv9G+tZv1IG007+6dldh/5iKPJK ZxhcGEpTPNAszpLsVjvRmNTT84kwDSgpVJG5ji7mJR6HLP07I3YcL+lZ5DCoseGr7oaI qljvuy3/rdrVFGrs1vWU0lC9L8418JEjB66XVyLNaKpbjiiqCmwPz4eucJYVCz7cLiOS SkGA== MIME-Version: 1.0 X-Received: by 10.60.32.134 with SMTP id j6mr374812oei.15.1359442051156; Mon, 28 Jan 2013 22:47:31 -0800 (PST) Received: by 10.76.153.201 with HTTP; Mon, 28 Jan 2013 22:47:31 -0800 (PST) In-Reply-To: References: Date: Tue, 29 Jan 2013 07:47:31 +0100 Message-ID: Subject: Re: Approach to track of plugin upgrades WAS: svn commit: r1437357 - /incubator/bloodhound/branches/bep_0003_multiproduct/bloodhound_multiproduct/multiproduct/api.py From: =?UTF-8?Q?Peter_Ko=C5=BEelj?= To: bloodhound-dev@incubator.apache.org Content-Type: multipart/alternative; boundary=e89a8fb1f07c8d4b0404d467c492 X-Gm-Message-State: ALoCoQlNMBeeBbLSmubZ7CnjIp2DcQu7fC9pePVbhGkIgThyddrFKsX+UvaSDRHPcAGNFqflxja4 X-Virus-Checked: Checked by ClamAV on apache.org --e89a8fb1f07c8d4b0404d467c492 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 28 January 2013 19:27, Olemis Lang wrote: > On 1/28/13, Jose Angel Franco Navarro wrote: > > Hi Peter and Olemis, > > :) > > I'm getting rid of top-posting > > > 2013/1/28, Peter Ko=C5=BEelj : > >> I got a bit confused with the wording so would like to clarify: > >> > >> 1. Plugin should have one or one per component > >> BaseEnvironmentSetupParticipant correct (as not one per version)? > > > > 1. Each plugin would have a single specialization of > > BaseEnvironmentSetupParticipant. The idea is to change the class that > > now implements IEnvironmentSetupParticipant to make her extend > > BaseEnvironmentSetupParticipant and provide the required methods. > > > > The code snippet in here might help to understand the whole idea . > > > https://issues.apache.org/bloodhound/wiki/Proposals/BEP-0005#reference-im= plementation > > So plugin developers are free to implement a single component > responsible for updating the database and environment or multiple > components . The BEP is only about the reusable framework to abstract > the interactions needed to carry out upgrades . > > >> 2. The BaseEnvironmentSetupParticipant::get_db_setup_contributors() > >> speaks > >> of db scripts but actual upgrades are contained in modules. Should thi= s > >> actually be get_upgrade_modules()? > > > > 2. I would rather prefer to change the docstring, not to limit the > > scope of the function in the future. > > > [...] > > I'm +0 about this . I'd just suggest to be consistent and keep source > code readable . > > >> 3. What is the benefit of having new tables separate from the free db > >> upgrades? > > > > 3. The benefits would be code reuse and higher testability of the > > environment upgrade. Once the algorithm to create the schema is > > stable, the plugins only provide data structures properly filled. > > Repetitive code to create the tables is placed in a single place and > > plugins only provide what is variable (their schema information). > > > > I also add that it's helpful because there are well-know recovery > strategies to deal with failures at table creation time . OTOH , while > performing free upgrades (... and notice that I did not say *free db > upgrades* considering the fact that other side effects outside DB are > allowed as well in that particular case) it is much more difficult to > recover from an error condition . Summarizing , it is possible to try > free upgrades only after asserting that no issues regarding DB tables > will be found . > > >> 4. If we have special support for db upgrades, have you considered > having > >> something for ini files as well (I imagine plugins will be adding > >> new/updating configuration entries as well) > >> > > > > 4. Not evaluated till now, contributions accepted ;-) > > In advance I would not do so . My reasoning is the following > > At initial plugin installation there should be no strong reason for > setting options explicitly . The =C2=ABright=C2=BB approach is to provide > default=3D... keyword arg in option definition and let the configuration > subsystem to fall back to this value at run-time . There's no need to > add a new entry in ini files to make related option work . > > Later on , while performing incremental upgrades site admins might > have already set the values they want , and IMO the upgrade process > should not be messing around and conflict with explicit admins > decisions . > > Anyway , if someone provides a use case , I could change my mind on > the subject . We could add that later too if it proves to be really > useful . > Sometimes there just isn't sensible default value and admin just has to fill in the blanks. The second case would be when plugins comes to a point where configuration reorganization is needed and upgrade can use the old config values to enumerate new ones automatically. But I would agree that this two rare cases alone do not justify a framework for this. > > -- > Regards, > > Olemis. > --e89a8fb1f07c8d4b0404d467c492--