Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Terrabuild/Contracts/ConfigOptions.fs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ type Options = {
MaxConcurrency: int
Force: bool
Retry: bool
Log: bool
LocalOnly: bool
StartedAt: DateTime
Targets: string set
Expand Down
5 changes: 4 additions & 1 deletion src/Terrabuild/Core/GraphPipeline/Action.fs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ let build (options: ConfigOptions.Options) (cache: Cache.ICache) (graph: GraphDe
let nodes = Concurrent.ConcurrentDictionary<string, GraphDef.Node>()
let scheduledNodeStatus = Concurrent.ConcurrentDictionary<string, bool>()
let hub = Hub.Create(options.MaxConcurrency)
let downloadExternalLogs =
if options.Log then GraphDef.NodeAction.Summary
else GraphDef.NodeAction.Ignore

let getNodeAction (node: GraphDef.Node) hasChildBuilding =
// task is forced to build
Expand Down Expand Up @@ -45,7 +48,7 @@ let build (options: ConfigOptions.Options) (cache: Cache.ICache) (graph: GraphDe
// task is cached
elif node.Artifacts = GraphDef.Artifacts.External then
Log.Debug("{NodeId} is external {Date}", node.Id, summary.EndedAt)
(GraphDef.NodeAction.Summary, summary.EndedAt)
(downloadExternalLogs, summary.EndedAt)
else
Log.Debug("{NodeId} is restorable {Date}", node.Id, summary.EndedAt)
(GraphDef.NodeAction.Restore, summary.EndedAt)
Expand Down
1 change: 1 addition & 0 deletions src/Terrabuild/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ let processCommandLine (parser: ArgumentParser<TerrabuildArgs>) (result: ParseRe
ConfigOptions.Options.MaxConcurrency = options.MaxConcurrency
ConfigOptions.Options.Force = options.Force
ConfigOptions.Options.Retry = options.Retry
ConfigOptions.Options.Log = log
ConfigOptions.Options.LocalOnly = options.LocalOnly
ConfigOptions.Options.StartedAt = options.StartedAt
ConfigOptions.Options.Targets = options.Targets
Expand Down