Return-Path: Delivered-To: apmail-maven-continuum-dev-archive@www.apache.org Received: (qmail 31309 invoked from network); 14 Sep 2006 12:54:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 14 Sep 2006 12:54:26 -0000 Received: (qmail 61969 invoked by uid 500); 14 Sep 2006 12:54:25 -0000 Delivered-To: apmail-maven-continuum-dev-archive@maven.apache.org Received: (qmail 61949 invoked by uid 500); 14 Sep 2006 12:54:25 -0000 Mailing-List: contact continuum-dev-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: continuum-dev@maven.apache.org Delivered-To: mailing list continuum-dev@maven.apache.org Received: (qmail 61938 invoked by uid 99); 14 Sep 2006 12:54:25 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Sep 2006 05:54:25 -0700 Authentication-Results: idunn.apache.osuosl.org smtp.mail=kenney@apache.org; spf=permerror X-ASF-Spam-Status: No, hits=0.1 required=5.0 tests=FORGED_RCVD_HELO Received-SPF: error (idunn.apache.osuosl.org: domain apache.org from 131.174.93.58 cause and error) Received: from ([131.174.93.58:42435] helo=hermes.uci.kun.nl) by idunn.apache.osuosl.org (ecelerity 2.1 r(10620)) with ESMTP id 02/50-05408-0B059054 for ; Thu, 14 Sep 2006 05:54:19 -0700 Received: from fire.homenet.neonics.com (vhe-400042.sshn.net [195.169.216.194]) by hermes.uci.kun.nl (PMDF V6.2-X17 #30689) with ESMTP id <0J5L00HMJ2GBGP@hermes.uci.kun.nl> for continuum-dev@maven.apache.org; Thu, 14 Sep 2006 14:52:59 +0200 (MEST) Received: from [10.0.2.2] (forge@magma.homenet.neonics.com [10.0.2.2]) by fire.homenet.neonics.com (8.13.7/8.13.7/Debian-1) with ESMTP id k8ECqx9s032217 for ; Thu, 14 Sep 2006 14:52:59 +0200 Date: Thu, 14 Sep 2006 14:53:05 +0200 From: Kenney Westerhof Subject: Dependency triggered builds To: continuum-dev@maven.apache.org Message-id: <450950B1.900@apache.org> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=UTF-8 Content-transfer-encoding: 7bit User-Agent: Thunderbird 1.5.0.5 (X11/20060812) X-Spam-Status: No, score=-1.4 required=4.0 tests=ALL_TRUSTED autolearn=unavailable version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on fire.homenet.neonics.com X-Virus-Scanned: ClamAV 0.88.2/1882/Thu Sep 14 13:04:02 2006 on fire.homenet.neonics.com X-Virus-Status: Clean X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Sending again, it doesn't seem to have made the list. -------- Original Message -------- Subject: Dependency triggered builds Date: Thu, 14 Sep 2006 10:30:01 +0200 From: Kenney Westerhof To: continuum-dev@maven.apache.org Hi, I wanted to propose some solutions for triggering builds if dependencies are changed. (I mean: if project A depends on project B, and project B was updated/rebuilt, then A should also be rebuilt to check for any api breaking changes etc.). >From the top of my head I can name 2 distinct approaches: push and pull. PUSH: When project B was succesfully built (no need to trigger other builds for broken builds - no new artifact is available), Continuum will schedule forced builds for all projects that depend on the current project. PULL (1): MavenTwoContinuumProjectBuilder does an SCM check to see if there are any source changes. Add another check here to see if any dependencies have newer build Id's. This requires a 'lastKnownBuildId' field to be added to the project<->project relation (Dependency). PULL (2): Same thing, except we just check for the timestamp of dependency builds. If they're newer than ours, then run the build. PULL (3): Either one of the above, but not in the project builder, but as a task-entry-evaluator. Also the 'SCM' up2date check would be moved to an evaluator class (something like if ( `svn log CURRENT:HEAD | wc -l` > 0 ) {}: don't update the checkout, just check if it would be changed). If the first evaluator fails, the next one isn't called (I assume...). This is an 'AND' operation. We might also want to support an OR operation, (scmChanged || depsChanged). This is starting to look like a workflow. The advantage of this is that we can break down all the operations that are now hardcoded in the different build executors to separate actions that we can chain together, and add decision points. We could use Werkflow/OSWorkflow or some other engine, or just plexus, which already has a workflow engine (in the form of the taskQueue). For instance (without TaskEntryEvaluators): Each action defines it's outputs: yes/no/others as requirements. The first action would be 'CheckDependenciesChangedAction'. If this evaluates to 'yes', it schedules the 'yes' action, which would be the BuildProjectTask. When 'no', then schedule 'CheckSCMUpdatedAction'. and so on and so forth. With TaskEntryEvaluators this could also be done, as long as each evaluator can specify the next evaluator to run. But I think this is for 1.2; just wanted to bring it up for discussion. If there's no feedback on a preferred solution I'll go with either the PUSH or PULL 1/2 solutions, whichever is easiest. I'll do some research on what's there yet to support this. -- Kenney