diff --git a/src/Terrabuild/Core/Build.fs b/src/Terrabuild/Core/Build.fs index db3cb5db..b90a8cfd 100644 --- a/src/Terrabuild/Core/Build.fs +++ b/src/Terrabuild/Core/Build.fs @@ -261,10 +261,6 @@ let run (options: ConfigOptions.Options) (cache: Cache.ICache) (api: Contracts.I Log.Debug("{NodeId} must rebuild because force requested", node.Id) TaskRequest.Build, buildNode() - elif maxCompletionChildren = DateTime.MaxValue then - Log.Debug("{NodeId} must rebuild because child is rebuilding", node.Id) - TaskRequest.Build, buildNode() - elif node.Cache <> Terrabuild.Extensibility.Cacheability.Never then let cacheEntryId = GraphDef.buildCacheKey node match cache.TryGetSummaryOnly allowRemoteCache cacheEntryId with @@ -276,6 +272,11 @@ let run (options: ConfigOptions.Options) (cache: Cache.ICache) (api: Contracts.I Log.Debug("{NodeId} must rebuild because node is failed and retry requested", node.Id) TaskRequest.Build, buildNode() + // task is older than children + elif summary.EndedAt <= maxCompletionChildren then + Log.Debug("{NodeId} must rebuild because child is rebuilding", node.Id) + TaskRequest.Build, buildNode() + // task is cached else Log.Debug("{NodeId} is marked as used", node.Id)