Uploaded image for project: 'Continuum'
  1. Continuum
  2. CONTINUUM-2546

Distributed builds not always building with dependency changes



    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.4.0 (Beta)
    • Fix Version/s: None
    • Component/s: Distributed Builds
    • Environment:
      CentOS release 5.5 (Final)

      java version "1.6.0_20"
      Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
      Java HotSpot(TM) Server VM (build 16.3-b01, mixed mode)


      We were having problems with our distributed builds not always building when dependencies changed. I traced the issue into:

       org.apache.continuum.builder.distributed.DefaultDistributedBuildService.shouldBuild(Map<String, Object>)

      which contains this code fragment:

      Date date = ContinuumBuildConstant.getLatestUpdateDate( context );
      if ( date != null && oldBuildResult.getLastChangedDate() >= date.getTime() )
          log.info( "No changes found, not building (projectId=" + projectId + ")" );
          return false;
      else if ( date != null && changes.isEmpty() )
          // fresh checkout from build agent that's why changes is empty
          log.info( "Changes found in the current project, building (projectId=" + projectId + ")" );
          return true;

      We seem to be getting caught out by the first test. (There's only one agent building this project btw). I think "oldBuildResult" may be the BuildResult for the current build

      I tried commenting out the first piece of logic. This resulted in everything building at every scheduled run because the second test always passes for an existing project with no changes in it.

      For now I've commented out ALL of the code above and things seem to be behaving the way I expect.




            • Assignee:
              ctan Maria Catherine R. Tan
              sfcoy Stephen Coy
            • Votes:
              0 Vote for this issue
              0 Start watching this issue


              • Created: