continuum-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Venisse (JIRA)" <j...@codehaus.org>
Subject [jira] Created: (CONTINUUM-2212) RuntimeException when the project shouldn't build and no buildresult exist
Date Thu, 30 Apr 2009 04:37:44 GMT
RuntimeException when the project shouldn't build and no buildresult exist
--------------------------------------------------------------------------

                 Key: CONTINUUM-2212
                 URL: http://jira.codehaus.org/browse/CONTINUUM-2212
             Project: Continuum
          Issue Type: Bug
          Components: Core system
    Affects Versions: 1.3.3
            Reporter: Emmanuel Venisse


>From Christian Schulte:

this commit
 <http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java?r1=760766&r2=764863>

leads to

2009-04-29 01:04:32,744 [Thread-48] ERROR
org.apache.continuum.taskqueueexecutor.ParallelBuildsThreadedTaskQueueExecutor
 - Error executing task
edu.emory.mathcs.backport.java.util.concurrent.ExecutionException:
java.lang.RuntimeException: Missing key 'build-id'.
       at
edu.emory.mathcs.backport.java.util.concurrent.FutureTask.getResult(FutureTask.java:299)
       at
edu.emory.mathcs.backport.java.util.concurrent.FutureTask.get(FutureTask.java:128)
       at
org.apache.continuum.taskqueueexecutor.ParallelBuildsThreadedTaskQueueExecutor$ExecutorRunnable.waitForTask(ParallelBuildsThreadedTaskQueueExecutor.java:169)
       at
org.apache.continuum.taskqueueexecutor.ParallelBuildsThreadedTaskQueueExecutor$ExecutorRunnable.run(ParallelBuildsThreadedTaskQueueExecutor.java:131)
Caused by: java.lang.RuntimeException: Missing key 'build-id'.
       at
org.apache.maven.continuum.core.action.AbstractContinuumAction.getObject(AbstractContinuumAction.java:274)
       at
org.apache.maven.continuum.core.action.AbstractContinuumAction.getString(AbstractContinuumAction.java:238)
       at
org.apache.maven.continuum.core.action.AbstractContinuumAction.getBuildId(AbstractContinuumAction.java:138)
       at
org.apache.maven.continuum.buildcontroller.DefaultBuildController.endBuild(DefaultBuildController.java:216)
       at
org.apache.maven.continuum.buildcontroller.DefaultBuildController.build(DefaultBuildController.java:192)
       at
org.apache.maven.continuum.buildcontroller.BuildProjectTaskExecutor.executeTask(BuildProjectTaskExecutor.java:48)
       at
org.apache.continuum.taskqueueexecutor.ParallelBuildsThreadedTaskQueueExecutor$ExecutorRunnable$1.run(ParallelBuildsThreadedTaskQueueExecutor.java:120)
       at
edu.emory.mathcs.backport.java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:442)
       at
edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:176)
       at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:987)
       at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:528)
       at java.lang.Thread.run(Thread.java:619)


The attached patch fixes that and also stops setting the project's state
to ERROR when there is no build result available since that is also the
case when a project should not build. See the finally clause in method
build(...)

       finally
       {
           endBuild( context );
       }

endBuild is also called when it was detected that a project should not
build and thus has no build result. So the attached patch

a) fixes the RuntimeException
b) stops Continuum from constantly rebuilding projects for which no
changes were detected. Without this change a project's state got set to
ERROR forcing a rebuild when it was detected that it simply should not
build. So what happened was:

- detect that a project does not need to be build (project has no build
result) and keep the old project state.
- call endBuild without a build result which sets the state to ERROR
forcing a rebuild next time.
- next time project is build due to ERROR state and maybe succeeds
- thereafter it is again detected that the project does not need to be
build and the state again is set to ERROR

Leads to constant rebuilding.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message