Continuum
  1. Continuum
  2. CONTINUUM-2212

RuntimeException when the project shouldn't build and no buildresult exist

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.3 (Beta)
    • Fix Version/s: 1.3.3 (Beta)
    • Component/s: Core system
    • Labels:
      None
    • Complexity:
      Intermediate
    • Number of attachments :
      0

      Description

      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.

        Activity

        Hide
        Emmanuel Venisse added a comment -

        Fixed in r.770064

        Show
        Emmanuel Venisse added a comment - Fixed in r.770064

          People

          • Assignee:
            Emmanuel Venisse
            Reporter:
            Emmanuel Venisse
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: