From 34de2c6a96654e00a2352c88f40c5a9865e21b29 Mon Sep 17 00:00:00 2001 From: Pierre Chalamet Date: Thu, 25 Dec 2025 22:57:53 +0000 Subject: [PATCH 1/2] rework requirement computation --- .vscode/launch.json | 2 +- .../Core/GraphPipeline/Batch.fs | 6 +- src/Terrabuild/Core/GraphDef.fs | 1 + src/Terrabuild/Core/GraphPipeline/Action.fs | 15 ++- src/Terrabuild/Core/GraphPipeline/Batch.fs | 5 +- src/Terrabuild/Core/GraphPipeline/Cascade.fs | 67 ++++----- src/Terrabuild/Core/GraphPipeline/Node.fs | 18 +-- src/Terrabuild/Program.fs | 6 +- .../results/terrabuild-debug.action.json | 3 +- .../basic/results/terrabuild-debug.batch.json | 3 +- .../results/terrabuild-debug.cascade.json | 3 +- .../basic/results/terrabuild-debug.node.json | 3 +- .../results/terrabuild-debug.action.json | 25 ++-- .../results/terrabuild-debug.batch.json | 44 +++--- .../results/terrabuild-debug.cascade.json | 69 +++------- .../results/terrabuild-debug.info.md | 6 +- .../results/terrabuild-debug.node.json | 25 ++-- .../results/terrabuild-debug.action.json | 12 +- .../results/terrabuild-debug.batch.json | 12 +- .../results/terrabuild-debug.cascade.json | 12 +- .../results/terrabuild-debug.node.json | 12 +- .../results/terrabuild-debug.action.json | 9 +- .../results/terrabuild-debug.batch.json | 9 +- .../results/terrabuild-debug.cascade.json | 9 +- .../results/terrabuild-debug.node.json | 9 +- .../results/terrabuild-debug.action.json | 38 ++++-- .../results/terrabuild-debug.batch.json | 126 +++++++++-------- .../results/terrabuild-debug.cascade.json | 127 ++++-------------- tests/simple/results/terrabuild-debug.info.md | 8 +- .../simple/results/terrabuild-debug.node.json | 38 ++++-- 30 files changed, 350 insertions(+), 372 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index a3d3937d..00b18c27 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -12,7 +12,7 @@ // "args": ["run", "build", "test", "--workspace", "tests/simple", "--parallel", "1", "--debug", "--log" ], // "args": ["run", "build", "test", "plan", "apply", "--workspace", "tests/indirect-target", "--parallel", "1", "--debug", "--log" ], - "args": ["run", "build", "--workspace", "../../matis/matis-next", "--retry", "--debug", "--local-only", "--log" ], + "args": ["run", "build", "--workspace", "../../matis/matis-next", "--configuration", "local", "--retry", "--debug", "--local-only", "--log", "--what-if" ], // "args": ["run", "build", "--workspace", "tests/cluster-layers", "--force", "--debug", "-p", "1", "--whatif" ], // "args": ["run", "build", "--workspace", "tests/cluster-layers", "--force", "--debug", "-p", "1", "--whatif" ], diff --git a/src/Terrabuild.Tests/Core/GraphPipeline/Batch.fs b/src/Terrabuild.Tests/Core/GraphPipeline/Batch.fs index e1b4b284..a0b6a5af 100644 --- a/src/Terrabuild.Tests/Core/GraphPipeline/Batch.fs +++ b/src/Terrabuild.Tests/Core/GraphPipeline/Batch.fs @@ -21,7 +21,8 @@ let ``check partition computation``() = Node.Artifacts = ArtifactMode.Workspace Node.Action = action Node.Build = BuildMode.Auto - Node.Batch = BatchMode.Partition } + Node.Batch = BatchMode.Partition + Node.Required = true } let addNode (node: Node) nodes = nodes |> Map.add node.Id node @@ -88,7 +89,8 @@ let ``check partition/all computation``() = Node.Artifacts = ArtifactMode.Workspace Node.Action = action Node.Build = BuildMode.Auto - Node.Batch = group } + Node.Batch = group + Node.Required = true } let addNode (node: Node) nodes = nodes |> Map.add node.Id node diff --git a/src/Terrabuild/Core/GraphDef.fs b/src/Terrabuild/Core/GraphDef.fs index e8789deb..4c182188 100644 --- a/src/Terrabuild/Core/GraphDef.fs +++ b/src/Terrabuild/Core/GraphDef.fs @@ -61,6 +61,7 @@ type Node = { Build: BuildMode Batch: BatchMode Action: RunAction + Required: bool } diff --git a/src/Terrabuild/Core/GraphPipeline/Action.fs b/src/Terrabuild/Core/GraphPipeline/Action.fs index 5b9d98a3..3c35024c 100644 --- a/src/Terrabuild/Core/GraphPipeline/Action.fs +++ b/src/Terrabuild/Core/GraphPipeline/Action.fs @@ -1,7 +1,6 @@ module GraphPipeline.Action - open System open Collections open Serilog @@ -17,7 +16,7 @@ let build (options: ConfigOptions.Options) (cache: Cache.ICache) (graph: Graph) let getNodeAction (node: Node) hasChildBuilding = // task is forced to build - if node.Action = RunAction.Exec then + if node.Build = BuildMode.Always then Log.Debug("{NodeId} is marked for build", node.Id) (RunAction.Exec, DateTime.MaxValue) @@ -90,8 +89,16 @@ let build (options: ConfigOptions.Options) (cache: Cache.ICache) (graph: Graph) | Status.SubscriptionError edi -> forwardInvalidArg("Failed to compute actions", edi.SourceException) - let nodes = graph.Nodes |> Map.addMap (nodes |> Seq.map (|KeyValue|) |> Map.ofSeq) - let rootNodes = graph.RootNodes |> Set.filter (fun nodeId -> nodes[nodeId].Action <> RunAction.Ignore) + let mutable nodes = graph.Nodes |> Map.addMap (nodes |> Seq.map (|KeyValue|) |> Map.ofSeq) + let rootNodes = + graph.RootNodes + |> Set.filter (fun nodeId -> nodes[nodeId].Action = RunAction.Exec) + + // root node to execute are required + rootNodes + |> Set.iter (fun nodeId -> + let node = { nodes[nodeId] with Required = true } + nodes <- nodes |> Map.add node.Id node) let graph = { graph with diff --git a/src/Terrabuild/Core/GraphPipeline/Batch.fs b/src/Terrabuild/Core/GraphPipeline/Batch.fs index 00c9fc0c..03f44cee 100644 --- a/src/Terrabuild/Core/GraphPipeline/Batch.fs +++ b/src/Terrabuild/Core/GraphPipeline/Batch.fs @@ -72,7 +72,7 @@ let computeBatches (graph: Graph) = graph.Nodes |> Seq.choose (fun (KeyValue(_, node)) -> match node with - | { Action = RunAction.Exec; ClusterHash = Some clusterHash } -> Some (clusterHash, node) + | { Action = RunAction.Exec; ClusterHash = Some clusterHash; Required = true } -> Some (clusterHash, node) | _ -> None) |> Seq.groupBy fst |> Seq.collect (fun (clusterHash, items) -> @@ -192,7 +192,8 @@ let private createBatchNodes (options: ConfigOptions.Options) (configuration: Co GraphDef.Node.TargetHash = headNode.TargetHash GraphDef.Node.Action = RunAction.Exec GraphDef.Node.Build = headNode.Build - GraphDef.Node.Batch = headNode.Batch } + GraphDef.Node.Batch = headNode.Batch + GraphDef.Node.Required = false } Some (batch.BatchId, batchNode) ) diff --git a/src/Terrabuild/Core/GraphPipeline/Cascade.fs b/src/Terrabuild/Core/GraphPipeline/Cascade.fs index ad2cabad..b9396acb 100644 --- a/src/Terrabuild/Core/GraphPipeline/Cascade.fs +++ b/src/Terrabuild/Core/GraphPipeline/Cascade.fs @@ -1,39 +1,40 @@ module GraphPipeline.Cascade -open System.Collections.Generic open Collections open GraphDef -open Serilog let build (graph: Graph) = - // For each node: have we already processed it as "required"? - // false means "seen but only processed as not-required" - let processedRequired = Dictionary() - let mutable requiredNodes = Set.empty - - let rec propagate parentIsRequired nodeId = - let node = graph.Nodes[nodeId] - - if node.Action <> RunAction.Ignore then - let nodeRequired = parentIsRequired || node.Action = RunAction.Exec - - match processedRequired.TryGetValue(nodeId) with - | true, alreadyRequired when alreadyRequired || not nodeRequired -> - // Already processed with >= this requiredness - () - | _ -> - // Either first time, or upgrade from not-required -> required - processedRequired[nodeId] <- nodeRequired - if nodeRequired then - Log.Debug("Node {NodeId} is marked as required", nodeId) - requiredNodes <- requiredNodes |> Set.add node.Id - node.Dependencies |> Seq.iter (propagate nodeRequired) - - graph.RootNodes |> Seq.iter (propagate false) - - // keep only runnable root nodes - let rootNodes = - graph.RootNodes - |> Set.filter (fun rootNodeId -> requiredNodes |> Set.contains rootNodeId) - - { graph with Graph.RootNodes = rootNodes } + + let node2dependents = + graph.Nodes + |> Seq.collect (fun (KeyValue(nodeId, node)) -> node.Dependencies |> Seq.map (fun depId -> depId, nodeId)) + |> Seq.groupBy fst + |> Map.ofSeq + |> Map.map (fun _ depIds -> depIds |> Seq.map snd |> Set.ofSeq) + + let leafNodes = graph.Nodes |> Map.filter (fun _ node -> node.Dependencies |> Set.isEmpty) + + let mutable nodes = graph.Nodes + + let mutable nodeRequirements = Map.empty + let rec getNodeRequirements nodeId = + match nodeRequirements |> Map.tryFind nodeId with + | Some requirement -> requirement + | _ -> + let node = nodes[nodeId] + let isRequired = + if node.Required then node.Required + else + node2dependents + |> Map.tryFind nodeId + |> Option.map (Seq.exists getNodeRequirements) + |> Option.defaultValue false + + nodeRequirements <- nodeRequirements |> Map.add nodeId isRequired + let node = { node with Required = isRequired } + nodes <- nodes |> Map.add node.Id node + isRequired + + leafNodes.Keys |> Seq.iter (fun leafNodeId -> getNodeRequirements leafNodeId |> ignore) + + { graph with Graph.Nodes = nodes } diff --git a/src/Terrabuild/Core/GraphPipeline/Node.fs b/src/Terrabuild/Core/GraphPipeline/Node.fs index cc301ebc..190f8788 100644 --- a/src/Terrabuild/Core/GraphPipeline/Node.fs +++ b/src/Terrabuild/Core/GraphPipeline/Node.fs @@ -147,24 +147,15 @@ let build (options: ConfigOptions.Options) (configuration: Configuration.Workspa let build = let defaultForce = if options.Force then BuildMode.Always else BuildMode.Auto targetConfig.Build |> Option.defaultValue defaultForce - let buildAction = - if build = BuildMode.Always then RunAction.Exec - else RunAction.Ignore + let required = build = BuildMode.Always let targetOutput = if cache = ArtifactMode.None then Set.empty else targetConfig.Outputs let targetClusterHash = - if batchable then - let batchContent = [ - targetConfig.Hash - $"{buildAction}" - ] - let batchHash = batchContent |> Hash.sha256strings - Some batchHash - else - None + if batchable then Some targetConfig.Hash + else None let node = { Node.Id = nodeId @@ -184,8 +175,9 @@ let build (options: ConfigOptions.Options) (configuration: Configuration.Workspa Node.ClusterHash = targetClusterHash Node.ProjectHash = projectConfig.Hash Node.TargetHash = targetHash + Node.Action = RunAction.Ignore + Node.Required = required } - Node.Action = buildAction } if allNodes.TryAdd(nodeId, node) |> not then raiseBugError "Unexpected graph building race" if processedNodes.TryAdd(nodeId, true) then processNode() diff --git a/src/Terrabuild/Program.fs b/src/Terrabuild/Program.fs index a4540b0c..6d4cbde3 100644 --- a/src/Terrabuild/Program.fs +++ b/src/Terrabuild/Program.fs @@ -143,12 +143,12 @@ let processCommandLine (parser: ArgumentParser) (result: ParseRe let graph = GraphPipeline.Action.build options cache graph if options.Debug then graph |> Json.Serialize |> IO.writeTextFile (logFile $"action.json") - let graph = GraphPipeline.Batch.build options config graph - if options.Debug then graph |> Json.Serialize |> IO.writeTextFile (logFile $"batch.json") - let graph = GraphPipeline.Cascade.build graph if options.Debug then graph |> Json.Serialize |> IO.writeTextFile (logFile $"cascade.json") + let graph = GraphPipeline.Batch.build options config graph + if options.Debug then graph |> Json.Serialize |> IO.writeTextFile (logFile $"batch.json") + if options.Debug then let markdown = [ diff --git a/tests/basic/results/terrabuild-debug.action.json b/tests/basic/results/terrabuild-debug.action.json index e2892556..6974b227 100644 --- a/tests/basic/results/terrabuild-debug.action.json +++ b/tests/basic/results/terrabuild-debug.action.json @@ -25,7 +25,8 @@ "artifacts": "none", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true } }, "rootNodes": [ diff --git a/tests/basic/results/terrabuild-debug.batch.json b/tests/basic/results/terrabuild-debug.batch.json index e2892556..6974b227 100644 --- a/tests/basic/results/terrabuild-debug.batch.json +++ b/tests/basic/results/terrabuild-debug.batch.json @@ -25,7 +25,8 @@ "artifacts": "none", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true } }, "rootNodes": [ diff --git a/tests/basic/results/terrabuild-debug.cascade.json b/tests/basic/results/terrabuild-debug.cascade.json index e2892556..6974b227 100644 --- a/tests/basic/results/terrabuild-debug.cascade.json +++ b/tests/basic/results/terrabuild-debug.cascade.json @@ -25,7 +25,8 @@ "artifacts": "none", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true } }, "rootNodes": [ diff --git a/tests/basic/results/terrabuild-debug.node.json b/tests/basic/results/terrabuild-debug.node.json index e2892556..8a490d83 100644 --- a/tests/basic/results/terrabuild-debug.node.json +++ b/tests/basic/results/terrabuild-debug.node.json @@ -25,7 +25,8 @@ "artifacts": "none", "build": "always", "batch": "all", - "action": "exec" + "action": "ignore", + "required": true } }, "rootNodes": [ diff --git a/tests/cluster-layers/results/terrabuild-debug.action.json b/tests/cluster-layers/results/terrabuild-debug.action.json index c04723b2..04ef68bd 100644 --- a/tests/cluster-layers/results/terrabuild-debug.action.json +++ b/tests/cluster-layers/results/terrabuild-debug.action.json @@ -45,7 +45,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#b:build": { "id": "workspace/path#b:build", @@ -92,7 +93,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#c:build": { "id": "workspace/path#c:build", @@ -140,7 +142,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#d:build": { "id": "workspace/path#d:build", @@ -158,7 +161,7 @@ ], "projectHash": "E27EE8CFF9BD151E97E09A8A953929B6DC5E4E242F0EB1BD94FD92562DFC1EB6", "targetHash": "F59792CEAF216E5D8146633727BF9C85E5B5D86F6806D1424676E0100DA55430", - "clusterHash": "6EE8E1E7205ABAE10C58BC4B6DA4CA7129380A596049BBC2264C973C2C5331F1", + "clusterHash": "89F54C1D6CCEDA2279E58F176EEC7D265891E610EFCBC76C9725473565B6A245", "operations": [ { "image": "mcr.microsoft.com/dotnet/sdk:9.0.202", @@ -182,7 +185,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#e:build": { "id": "workspace/path#e:build", @@ -200,7 +204,7 @@ ], "projectHash": "0913D77CAAD0C42E3E5521DA44216CEEB02C56ADB452C6F1999EA983DC9C9BFB", "targetHash": "DF61287AD8999932BA40DAB1C891C748A8210C4D6648EE24113F45428CE8A63C", - "clusterHash": "6EE8E1E7205ABAE10C58BC4B6DA4CA7129380A596049BBC2264C973C2C5331F1", + "clusterHash": "89F54C1D6CCEDA2279E58F176EEC7D265891E610EFCBC76C9725473565B6A245", "operations": [ { "image": "mcr.microsoft.com/dotnet/sdk:9.0.202", @@ -224,7 +228,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#f:build": { "id": "workspace/path#f:build", @@ -264,7 +269,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#g:build": { "id": "workspace/path#g:build", @@ -303,7 +309,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true } }, "rootNodes": [ diff --git a/tests/cluster-layers/results/terrabuild-debug.batch.json b/tests/cluster-layers/results/terrabuild-debug.batch.json index 73a6a751..9ab1474a 100644 --- a/tests/cluster-layers/results/terrabuild-debug.batch.json +++ b/tests/cluster-layers/results/terrabuild-debug.batch.json @@ -1,17 +1,17 @@ { "nodes": { - "F70FB9771D3A25FF284341B3968EE16E89A06E4DC8A5812C084767C247D0D79A": { - "id": "F70FB9771D3A25FF284341B3968EE16E89A06E4DC8A5812C084767C247D0D79A", - "projectId": "F70FB9771D3A25FF284341B3968EE16E89A06E4DC8A5812C084767C247D0D79A", + "E9F9EAB602D8614CED8FCEE27AE1A6FC62F00B8884B792287351A7EE49CF7C1A": { + "id": "E9F9EAB602D8614CED8FCEE27AE1A6FC62F00B8884B792287351A7EE49CF7C1A", + "projectId": "E9F9EAB602D8614CED8FCEE27AE1A6FC62F00B8884B792287351A7EE49CF7C1A", "projectDir": ".", "target": "build", "dependencies": [ "workspace/path#c:build" ], "outputs": [], - "projectHash": "F70FB9771D3A25FF284341B3968EE16E89A06E4DC8A5812C084767C247D0D79A", + "projectHash": "E9F9EAB602D8614CED8FCEE27AE1A6FC62F00B8884B792287351A7EE49CF7C1A", "targetHash": "F59792CEAF216E5D8146633727BF9C85E5B5D86F6806D1424676E0100DA55430", - "clusterHash": "6EE8E1E7205ABAE10C58BC4B6DA4CA7129380A596049BBC2264C973C2C5331F1", + "clusterHash": "89F54C1D6CCEDA2279E58F176EEC7D265891E610EFCBC76C9725473565B6A245", "operations": [ { "image": "mcr.microsoft.com/dotnet/sdk:9.0.202", @@ -19,7 +19,7 @@ "envs": {}, "metaCommand": "@dotnet restore", "command": "dotnet", - "arguments": "restore .terrabuild/F70FB9771D3A25FF284341B3968EE16E89A06E4DC8A5812C084767C247D0D79A.sln", + "arguments": "restore .terrabuild/E9F9EAB602D8614CED8FCEE27AE1A6FC62F00B8884B792287351A7EE49CF7C1A.sln", "errorLevel": 0 }, { @@ -28,14 +28,15 @@ "envs": {}, "metaCommand": "@dotnet build", "command": "dotnet", - "arguments": "build .terrabuild/F70FB9771D3A25FF284341B3968EE16E89A06E4DC8A5812C084767C247D0D79A.sln --no-restore --configuration Debug", + "arguments": "build .terrabuild/E9F9EAB602D8614CED8FCEE27AE1A6FC62F00B8884B792287351A7EE49CF7C1A.sln --no-restore --configuration Debug", "errorLevel": 0 } ], "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": false }, "workspace/path#a:build": { "id": "workspace/path#a:build", @@ -82,7 +83,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#b:build": { "id": "workspace/path#b:build", @@ -129,7 +131,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#c:build": { "id": "workspace/path#c:build", @@ -177,7 +180,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#d:build": { "id": "workspace/path#d:build", @@ -195,7 +199,7 @@ ], "projectHash": "E27EE8CFF9BD151E97E09A8A953929B6DC5E4E242F0EB1BD94FD92562DFC1EB6", "targetHash": "F59792CEAF216E5D8146633727BF9C85E5B5D86F6806D1424676E0100DA55430", - "clusterHash": "6EE8E1E7205ABAE10C58BC4B6DA4CA7129380A596049BBC2264C973C2C5331F1", + "clusterHash": "89F54C1D6CCEDA2279E58F176EEC7D265891E610EFCBC76C9725473565B6A245", "operations": [ { "image": "mcr.microsoft.com/dotnet/sdk:9.0.202", @@ -219,7 +223,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#e:build": { "id": "workspace/path#e:build", @@ -237,7 +242,7 @@ ], "projectHash": "0913D77CAAD0C42E3E5521DA44216CEEB02C56ADB452C6F1999EA983DC9C9BFB", "targetHash": "DF61287AD8999932BA40DAB1C891C748A8210C4D6648EE24113F45428CE8A63C", - "clusterHash": "6EE8E1E7205ABAE10C58BC4B6DA4CA7129380A596049BBC2264C973C2C5331F1", + "clusterHash": "89F54C1D6CCEDA2279E58F176EEC7D265891E610EFCBC76C9725473565B6A245", "operations": [ { "image": "mcr.microsoft.com/dotnet/sdk:9.0.202", @@ -261,7 +266,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#f:build": { "id": "workspace/path#f:build", @@ -301,7 +307,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#g:build": { "id": "workspace/path#g:build", @@ -340,7 +347,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true } }, "rootNodes": [ @@ -348,7 +356,7 @@ "workspace/path#g:build" ], "batches": { - "F70FB9771D3A25FF284341B3968EE16E89A06E4DC8A5812C084767C247D0D79A": [ + "E9F9EAB602D8614CED8FCEE27AE1A6FC62F00B8884B792287351A7EE49CF7C1A": [ "workspace/path#d:build", "workspace/path#e:build" ] diff --git a/tests/cluster-layers/results/terrabuild-debug.cascade.json b/tests/cluster-layers/results/terrabuild-debug.cascade.json index 73a6a751..04ef68bd 100644 --- a/tests/cluster-layers/results/terrabuild-debug.cascade.json +++ b/tests/cluster-layers/results/terrabuild-debug.cascade.json @@ -1,42 +1,5 @@ { "nodes": { - "F70FB9771D3A25FF284341B3968EE16E89A06E4DC8A5812C084767C247D0D79A": { - "id": "F70FB9771D3A25FF284341B3968EE16E89A06E4DC8A5812C084767C247D0D79A", - "projectId": "F70FB9771D3A25FF284341B3968EE16E89A06E4DC8A5812C084767C247D0D79A", - "projectDir": ".", - "target": "build", - "dependencies": [ - "workspace/path#c:build" - ], - "outputs": [], - "projectHash": "F70FB9771D3A25FF284341B3968EE16E89A06E4DC8A5812C084767C247D0D79A", - "targetHash": "F59792CEAF216E5D8146633727BF9C85E5B5D86F6806D1424676E0100DA55430", - "clusterHash": "6EE8E1E7205ABAE10C58BC4B6DA4CA7129380A596049BBC2264C973C2C5331F1", - "operations": [ - { - "image": "mcr.microsoft.com/dotnet/sdk:9.0.202", - "variables": [], - "envs": {}, - "metaCommand": "@dotnet restore", - "command": "dotnet", - "arguments": "restore .terrabuild/F70FB9771D3A25FF284341B3968EE16E89A06E4DC8A5812C084767C247D0D79A.sln", - "errorLevel": 0 - }, - { - "image": "mcr.microsoft.com/dotnet/sdk:9.0.202", - "variables": [], - "envs": {}, - "metaCommand": "@dotnet build", - "command": "dotnet", - "arguments": "build .terrabuild/F70FB9771D3A25FF284341B3968EE16E89A06E4DC8A5812C084767C247D0D79A.sln --no-restore --configuration Debug", - "errorLevel": 0 - } - ], - "artifacts": "managed", - "build": "always", - "batch": "all", - "action": "exec" - }, "workspace/path#a:build": { "id": "workspace/path#a:build", "projectId": "workspace/path#a", @@ -82,7 +45,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#b:build": { "id": "workspace/path#b:build", @@ -129,7 +93,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#c:build": { "id": "workspace/path#c:build", @@ -177,7 +142,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#d:build": { "id": "workspace/path#d:build", @@ -195,7 +161,7 @@ ], "projectHash": "E27EE8CFF9BD151E97E09A8A953929B6DC5E4E242F0EB1BD94FD92562DFC1EB6", "targetHash": "F59792CEAF216E5D8146633727BF9C85E5B5D86F6806D1424676E0100DA55430", - "clusterHash": "6EE8E1E7205ABAE10C58BC4B6DA4CA7129380A596049BBC2264C973C2C5331F1", + "clusterHash": "89F54C1D6CCEDA2279E58F176EEC7D265891E610EFCBC76C9725473565B6A245", "operations": [ { "image": "mcr.microsoft.com/dotnet/sdk:9.0.202", @@ -219,7 +185,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#e:build": { "id": "workspace/path#e:build", @@ -237,7 +204,7 @@ ], "projectHash": "0913D77CAAD0C42E3E5521DA44216CEEB02C56ADB452C6F1999EA983DC9C9BFB", "targetHash": "DF61287AD8999932BA40DAB1C891C748A8210C4D6648EE24113F45428CE8A63C", - "clusterHash": "6EE8E1E7205ABAE10C58BC4B6DA4CA7129380A596049BBC2264C973C2C5331F1", + "clusterHash": "89F54C1D6CCEDA2279E58F176EEC7D265891E610EFCBC76C9725473565B6A245", "operations": [ { "image": "mcr.microsoft.com/dotnet/sdk:9.0.202", @@ -261,7 +228,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#f:build": { "id": "workspace/path#f:build", @@ -301,7 +269,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#g:build": { "id": "workspace/path#g:build", @@ -340,17 +309,13 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true } }, "rootNodes": [ "workspace/path#f:build", "workspace/path#g:build" ], - "batches": { - "F70FB9771D3A25FF284341B3968EE16E89A06E4DC8A5812C084767C247D0D79A": [ - "workspace/path#d:build", - "workspace/path#e:build" - ] - } + "batches": {} } \ No newline at end of file diff --git a/tests/cluster-layers/results/terrabuild-debug.info.md b/tests/cluster-layers/results/terrabuild-debug.info.md index 310f52f4..592ebdfb 100644 --- a/tests/cluster-layers/results/terrabuild-debug.info.md +++ b/tests/cluster-layers/results/terrabuild-debug.info.md @@ -16,7 +16,7 @@ flowchart TD classDef build stroke:red,stroke-width:3px classDef restore stroke:orange,stroke-width:3px classDef ignore stroke:black,stroke-width:3px -F70FB9771D3A25FF284341B3968EE16E89A06E4DC8A5812C084767C247D0D79A("build +E9F9EAB602D8614CED8FCEE27AE1A6FC62F00B8884B792287351A7EE49CF7C1A("build .") workspace/path#a:build("build a A") @@ -32,8 +32,8 @@ workspace/path#f:build("build f F") workspace/path#g:build("build g G") -F70FB9771D3A25FF284341B3968EE16E89A06E4DC8A5812C084767C247D0D79A --> workspace/path#c:build -class F70FB9771D3A25FF284341B3968EE16E89A06E4DC8A5812C084767C247D0D79A ignore +E9F9EAB602D8614CED8FCEE27AE1A6FC62F00B8884B792287351A7EE49CF7C1A --> workspace/path#c:build +class E9F9EAB602D8614CED8FCEE27AE1A6FC62F00B8884B792287351A7EE49CF7C1A ignore class workspace/path#a:build ignore class workspace/path#b:build ignore workspace/path#c:build --> workspace/path#a:build diff --git a/tests/cluster-layers/results/terrabuild-debug.node.json b/tests/cluster-layers/results/terrabuild-debug.node.json index c04723b2..796a2e97 100644 --- a/tests/cluster-layers/results/terrabuild-debug.node.json +++ b/tests/cluster-layers/results/terrabuild-debug.node.json @@ -45,7 +45,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "ignore", + "required": true }, "workspace/path#b:build": { "id": "workspace/path#b:build", @@ -92,7 +93,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "ignore", + "required": true }, "workspace/path#c:build": { "id": "workspace/path#c:build", @@ -140,7 +142,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "ignore", + "required": true }, "workspace/path#d:build": { "id": "workspace/path#d:build", @@ -158,7 +161,7 @@ ], "projectHash": "E27EE8CFF9BD151E97E09A8A953929B6DC5E4E242F0EB1BD94FD92562DFC1EB6", "targetHash": "F59792CEAF216E5D8146633727BF9C85E5B5D86F6806D1424676E0100DA55430", - "clusterHash": "6EE8E1E7205ABAE10C58BC4B6DA4CA7129380A596049BBC2264C973C2C5331F1", + "clusterHash": "89F54C1D6CCEDA2279E58F176EEC7D265891E610EFCBC76C9725473565B6A245", "operations": [ { "image": "mcr.microsoft.com/dotnet/sdk:9.0.202", @@ -182,7 +185,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "ignore", + "required": true }, "workspace/path#e:build": { "id": "workspace/path#e:build", @@ -200,7 +204,7 @@ ], "projectHash": "0913D77CAAD0C42E3E5521DA44216CEEB02C56ADB452C6F1999EA983DC9C9BFB", "targetHash": "DF61287AD8999932BA40DAB1C891C748A8210C4D6648EE24113F45428CE8A63C", - "clusterHash": "6EE8E1E7205ABAE10C58BC4B6DA4CA7129380A596049BBC2264C973C2C5331F1", + "clusterHash": "89F54C1D6CCEDA2279E58F176EEC7D265891E610EFCBC76C9725473565B6A245", "operations": [ { "image": "mcr.microsoft.com/dotnet/sdk:9.0.202", @@ -224,7 +228,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "ignore", + "required": true }, "workspace/path#f:build": { "id": "workspace/path#f:build", @@ -264,7 +269,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "ignore", + "required": true }, "workspace/path#g:build": { "id": "workspace/path#g:build", @@ -303,7 +309,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "ignore", + "required": true } }, "rootNodes": [ diff --git a/tests/indirect-target/results/terrabuild-debug.action.json b/tests/indirect-target/results/terrabuild-debug.action.json index b43c1c57..e257529f 100644 --- a/tests/indirect-target/results/terrabuild-debug.action.json +++ b/tests/indirect-target/results/terrabuild-debug.action.json @@ -23,7 +23,8 @@ "artifacts": "none", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#b:apply": { "id": "workspace/path#b:apply", @@ -50,7 +51,8 @@ "artifacts": "none", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#b:plan": { "id": "workspace/path#b:plan", @@ -75,7 +77,8 @@ "artifacts": "none", "build": "auto", "batch": "all", - "action": "exec" + "action": "exec", + "required": false }, "workspace/path#c:build": { "id": "workspace/path#c:build", @@ -100,7 +103,8 @@ "artifacts": "none", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true } }, "rootNodes": [ diff --git a/tests/indirect-target/results/terrabuild-debug.batch.json b/tests/indirect-target/results/terrabuild-debug.batch.json index b43c1c57..d1bc102d 100644 --- a/tests/indirect-target/results/terrabuild-debug.batch.json +++ b/tests/indirect-target/results/terrabuild-debug.batch.json @@ -23,7 +23,8 @@ "artifacts": "none", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#b:apply": { "id": "workspace/path#b:apply", @@ -50,7 +51,8 @@ "artifacts": "none", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#b:plan": { "id": "workspace/path#b:plan", @@ -75,7 +77,8 @@ "artifacts": "none", "build": "auto", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#c:build": { "id": "workspace/path#c:build", @@ -100,7 +103,8 @@ "artifacts": "none", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true } }, "rootNodes": [ diff --git a/tests/indirect-target/results/terrabuild-debug.cascade.json b/tests/indirect-target/results/terrabuild-debug.cascade.json index b43c1c57..d1bc102d 100644 --- a/tests/indirect-target/results/terrabuild-debug.cascade.json +++ b/tests/indirect-target/results/terrabuild-debug.cascade.json @@ -23,7 +23,8 @@ "artifacts": "none", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#b:apply": { "id": "workspace/path#b:apply", @@ -50,7 +51,8 @@ "artifacts": "none", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#b:plan": { "id": "workspace/path#b:plan", @@ -75,7 +77,8 @@ "artifacts": "none", "build": "auto", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#c:build": { "id": "workspace/path#c:build", @@ -100,7 +103,8 @@ "artifacts": "none", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true } }, "rootNodes": [ diff --git a/tests/indirect-target/results/terrabuild-debug.node.json b/tests/indirect-target/results/terrabuild-debug.node.json index b8aa2fa6..78119e8b 100644 --- a/tests/indirect-target/results/terrabuild-debug.node.json +++ b/tests/indirect-target/results/terrabuild-debug.node.json @@ -23,7 +23,8 @@ "artifacts": "none", "build": "always", "batch": "all", - "action": "exec" + "action": "ignore", + "required": true }, "workspace/path#b:apply": { "id": "workspace/path#b:apply", @@ -50,7 +51,8 @@ "artifacts": "none", "build": "always", "batch": "all", - "action": "exec" + "action": "ignore", + "required": true }, "workspace/path#b:plan": { "id": "workspace/path#b:plan", @@ -75,7 +77,8 @@ "artifacts": "none", "build": "auto", "batch": "all", - "action": "ignore" + "action": "ignore", + "required": false }, "workspace/path#c:build": { "id": "workspace/path#c:build", @@ -100,7 +103,8 @@ "artifacts": "none", "build": "always", "batch": "all", - "action": "exec" + "action": "ignore", + "required": true } }, "rootNodes": [ diff --git a/tests/multirefs/results/terrabuild-debug.action.json b/tests/multirefs/results/terrabuild-debug.action.json index a16aeb59..c22c836c 100644 --- a/tests/multirefs/results/terrabuild-debug.action.json +++ b/tests/multirefs/results/terrabuild-debug.action.json @@ -26,7 +26,8 @@ "artifacts": "none", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#b:build": { "id": "workspace/path#b:build", @@ -53,7 +54,8 @@ "artifacts": "none", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#c:build": { "id": "workspace/path#c:build", @@ -78,7 +80,8 @@ "artifacts": "none", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true } }, "rootNodes": [ diff --git a/tests/multirefs/results/terrabuild-debug.batch.json b/tests/multirefs/results/terrabuild-debug.batch.json index a16aeb59..c22c836c 100644 --- a/tests/multirefs/results/terrabuild-debug.batch.json +++ b/tests/multirefs/results/terrabuild-debug.batch.json @@ -26,7 +26,8 @@ "artifacts": "none", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#b:build": { "id": "workspace/path#b:build", @@ -53,7 +54,8 @@ "artifacts": "none", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#c:build": { "id": "workspace/path#c:build", @@ -78,7 +80,8 @@ "artifacts": "none", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true } }, "rootNodes": [ diff --git a/tests/multirefs/results/terrabuild-debug.cascade.json b/tests/multirefs/results/terrabuild-debug.cascade.json index a16aeb59..c22c836c 100644 --- a/tests/multirefs/results/terrabuild-debug.cascade.json +++ b/tests/multirefs/results/terrabuild-debug.cascade.json @@ -26,7 +26,8 @@ "artifacts": "none", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#b:build": { "id": "workspace/path#b:build", @@ -53,7 +54,8 @@ "artifacts": "none", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#c:build": { "id": "workspace/path#c:build", @@ -78,7 +80,8 @@ "artifacts": "none", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true } }, "rootNodes": [ diff --git a/tests/multirefs/results/terrabuild-debug.node.json b/tests/multirefs/results/terrabuild-debug.node.json index a16aeb59..25ddefc7 100644 --- a/tests/multirefs/results/terrabuild-debug.node.json +++ b/tests/multirefs/results/terrabuild-debug.node.json @@ -26,7 +26,8 @@ "artifacts": "none", "build": "always", "batch": "all", - "action": "exec" + "action": "ignore", + "required": true }, "workspace/path#b:build": { "id": "workspace/path#b:build", @@ -53,7 +54,8 @@ "artifacts": "none", "build": "always", "batch": "all", - "action": "exec" + "action": "ignore", + "required": true }, "workspace/path#c:build": { "id": "workspace/path#c:build", @@ -78,7 +80,8 @@ "artifacts": "none", "build": "always", "batch": "all", - "action": "exec" + "action": "ignore", + "required": true } }, "rootNodes": [ diff --git a/tests/simple/results/terrabuild-debug.action.json b/tests/simple/results/terrabuild-debug.action.json index 7b0d66ed..4ca5e32c 100644 --- a/tests/simple/results/terrabuild-debug.action.json +++ b/tests/simple/results/terrabuild-debug.action.json @@ -14,7 +14,7 @@ ], "projectHash": "BFA142C31E6CAB62B959D3F12487449D39254989D7E4B7E8B34952BEA70B037E", "targetHash": "5D9DCF588514A786A54955C1422F996E5B6D77D2878E88317E1B11BD4A723F68", - "clusterHash": "3F3BBC731ABDD261E20BDC129EF24EFF8D5549CFF358E7BAA604F3D74D2DFA7D", + "clusterHash": "F8D51FB2860142179111E84F61779ED89C44532A76FF7B0A82854EEC9A268DFD", "operations": [ { "image": "guergeiro/pnpm:20-10", @@ -44,7 +44,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "@pnpm#npm-lib:build": { "id": "@pnpm#npm-lib:build", @@ -58,7 +59,7 @@ ], "projectHash": "C4BE5CC3B6E75E8F683FC2C89BA662764E82F51A6B6A168CFEE0EB289903F7E1", "targetHash": "530C83EBA93EFB32A674A25A875C49C92A11ED6752CB7E45B56AF866DB92DA53", - "clusterHash": "3F3BBC731ABDD261E20BDC129EF24EFF8D5549CFF358E7BAA604F3D74D2DFA7D", + "clusterHash": "F8D51FB2860142179111E84F61779ED89C44532A76FF7B0A82854EEC9A268DFD", "operations": [ { "image": "guergeiro/pnpm:20-10", @@ -88,7 +89,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#deployments/terraform-deploy:build": { "id": "workspace/path#deployments/terraform-deploy:build", @@ -129,7 +131,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#libraries/dotnet-lib:build": { "id": "workspace/path#libraries/dotnet-lib:build", @@ -144,7 +147,7 @@ ], "projectHash": "B283ADA4D6EDB9C93E3A2740B0544DAA995CF1F933299919847FC7004A441C8B", "targetHash": "E65F3FEA2CDD29BE950ACA21FAC549D64F754FA69F12FE6D662BD6A17BACF9C2", - "clusterHash": "D0068D247E4F29F8A9970B09D7B99545F013110066B6E22B37D53F616F573994", + "clusterHash": "3CA5AE131AA04144ED0B54B7683F5A2B8972393E71713DC586BBF94F53BA3BDD", "operations": [ { "image": "mcr.microsoft.com/dotnet/sdk:9.0.202", @@ -170,7 +173,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#libraries/shell-lib:build": { "id": "workspace/path#libraries/shell-lib:build", @@ -195,7 +199,8 @@ "artifacts": "none", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#projects/dotnet-app:build": { "id": "workspace/path#projects/dotnet-app:build", @@ -213,7 +218,7 @@ ], "projectHash": "D81A2A29701892A62EB4DBB40947B66822A2EB64F6C42684091F2399359A9332", "targetHash": "2E1F8B86FB9AAE5AC3BAAC88DCEAFBDBB8A083EEB38F5DBA551D2EFD31B27328", - "clusterHash": "D0068D247E4F29F8A9970B09D7B99545F013110066B6E22B37D53F616F573994", + "clusterHash": "3CA5AE131AA04144ED0B54B7683F5A2B8972393E71713DC586BBF94F53BA3BDD", "operations": [ { "image": "mcr.microsoft.com/dotnet/sdk:9.0.202", @@ -239,7 +244,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#projects/make-app:build": { "id": "workspace/path#projects/make-app:build", @@ -273,7 +279,8 @@ "artifacts": "none", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#projects/open-api:build": { "id": "workspace/path#projects/open-api:build", @@ -299,7 +306,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#projects/rust-app:build": { "id": "workspace/path#projects/rust-app:build", @@ -328,7 +336,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#tests/playwright:test": { "id": "workspace/path#tests/playwright:test", @@ -364,7 +373,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true } }, "rootNodes": [ diff --git a/tests/simple/results/terrabuild-debug.batch.json b/tests/simple/results/terrabuild-debug.batch.json index 1272c002..b5018108 100644 --- a/tests/simple/results/terrabuild-debug.batch.json +++ b/tests/simple/results/terrabuild-debug.batch.json @@ -1,82 +1,84 @@ { "nodes": { - "14A78A1501AFF6333D1FF5A6011BEACBBF52A6C04FB7B5882B117B7F486A46D9": { - "id": "14A78A1501AFF6333D1FF5A6011BEACBBF52A6C04FB7B5882B117B7F486A46D9", - "projectId": "14A78A1501AFF6333D1FF5A6011BEACBBF52A6C04FB7B5882B117B7F486A46D9", + "1565C663A6AA8DD76CC475B61F6DA9891C4B6088668874E4C620C276749985A8": { + "id": "1565C663A6AA8DD76CC475B61F6DA9891C4B6088668874E4C620C276749985A8", + "projectId": "1565C663A6AA8DD76CC475B61F6DA9891C4B6088668874E4C620C276749985A8", "projectDir": ".", "target": "build", "dependencies": [], "outputs": [], - "projectHash": "14A78A1501AFF6333D1FF5A6011BEACBBF52A6C04FB7B5882B117B7F486A46D9", - "targetHash": "E65F3FEA2CDD29BE950ACA21FAC549D64F754FA69F12FE6D662BD6A17BACF9C2", - "clusterHash": "D0068D247E4F29F8A9970B09D7B99545F013110066B6E22B37D53F616F573994", + "projectHash": "1565C663A6AA8DD76CC475B61F6DA9891C4B6088668874E4C620C276749985A8", + "targetHash": "5D9DCF588514A786A54955C1422F996E5B6D77D2878E88317E1B11BD4A723F68", + "clusterHash": "F8D51FB2860142179111E84F61779ED89C44532A76FF7B0A82854EEC9A268DFD", "operations": [ { - "image": "mcr.microsoft.com/dotnet/sdk:9.0.202", + "image": "guergeiro/pnpm:20-10", "platform": "linux/amd64", "variables": [], - "envs": {}, - "metaCommand": "@dotnet restore", - "command": "dotnet", - "arguments": "restore .terrabuild/14A78A1501AFF6333D1FF5A6011BEACBBF52A6C04FB7B5882B117B7F486A46D9.sln", + "envs": { + "CI": "true" + }, + "metaCommand": "@pnpm install", + "command": "pnpm", + "arguments": "--recursive --filter ./projects/npm-app --filter ./libraries/npm-lib install --link-workspace-packages", "errorLevel": 0 }, { - "image": "mcr.microsoft.com/dotnet/sdk:9.0.202", + "image": "guergeiro/pnpm:20-10", "platform": "linux/amd64", "variables": [], - "envs": {}, - "metaCommand": "@dotnet build", - "command": "dotnet", - "arguments": "build .terrabuild/14A78A1501AFF6333D1FF5A6011BEACBBF52A6C04FB7B5882B117B7F486A46D9.sln --no-restore --configuration Debug", + "envs": { + "CI": "true" + }, + "metaCommand": "@pnpm build", + "command": "pnpm", + "arguments": "--recursive --filter ./projects/npm-app --filter ./libraries/npm-lib run build", "errorLevel": 0 } ], "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": false }, - "577FDA009FE819C8E72C3183372BF7070AA7BB84CB823855E17AF5C0EE960D4B": { - "id": "577FDA009FE819C8E72C3183372BF7070AA7BB84CB823855E17AF5C0EE960D4B", - "projectId": "577FDA009FE819C8E72C3183372BF7070AA7BB84CB823855E17AF5C0EE960D4B", + "5FF221712FFC15D83449C90E8FCD4C9742CCDDDBD9437B76A2A3D29911DB071B": { + "id": "5FF221712FFC15D83449C90E8FCD4C9742CCDDDBD9437B76A2A3D29911DB071B", + "projectId": "5FF221712FFC15D83449C90E8FCD4C9742CCDDDBD9437B76A2A3D29911DB071B", "projectDir": ".", "target": "build", "dependencies": [], "outputs": [], - "projectHash": "577FDA009FE819C8E72C3183372BF7070AA7BB84CB823855E17AF5C0EE960D4B", - "targetHash": "5D9DCF588514A786A54955C1422F996E5B6D77D2878E88317E1B11BD4A723F68", - "clusterHash": "3F3BBC731ABDD261E20BDC129EF24EFF8D5549CFF358E7BAA604F3D74D2DFA7D", + "projectHash": "5FF221712FFC15D83449C90E8FCD4C9742CCDDDBD9437B76A2A3D29911DB071B", + "targetHash": "E65F3FEA2CDD29BE950ACA21FAC549D64F754FA69F12FE6D662BD6A17BACF9C2", + "clusterHash": "3CA5AE131AA04144ED0B54B7683F5A2B8972393E71713DC586BBF94F53BA3BDD", "operations": [ { - "image": "guergeiro/pnpm:20-10", + "image": "mcr.microsoft.com/dotnet/sdk:9.0.202", "platform": "linux/amd64", "variables": [], - "envs": { - "CI": "true" - }, - "metaCommand": "@pnpm install", - "command": "pnpm", - "arguments": "--recursive --filter ./projects/npm-app --filter ./libraries/npm-lib install --link-workspace-packages", + "envs": {}, + "metaCommand": "@dotnet restore", + "command": "dotnet", + "arguments": "restore .terrabuild/5FF221712FFC15D83449C90E8FCD4C9742CCDDDBD9437B76A2A3D29911DB071B.sln", "errorLevel": 0 }, { - "image": "guergeiro/pnpm:20-10", + "image": "mcr.microsoft.com/dotnet/sdk:9.0.202", "platform": "linux/amd64", "variables": [], - "envs": { - "CI": "true" - }, - "metaCommand": "@pnpm build", - "command": "pnpm", - "arguments": "--recursive --filter ./projects/npm-app --filter ./libraries/npm-lib run build", + "envs": {}, + "metaCommand": "@dotnet build", + "command": "dotnet", + "arguments": "build .terrabuild/5FF221712FFC15D83449C90E8FCD4C9742CCDDDBD9437B76A2A3D29911DB071B.sln --no-restore --configuration Debug", "errorLevel": 0 } ], "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": false }, "@pnpm#npm-app:build": { "id": "@pnpm#npm-app:build", @@ -92,7 +94,7 @@ ], "projectHash": "BFA142C31E6CAB62B959D3F12487449D39254989D7E4B7E8B34952BEA70B037E", "targetHash": "5D9DCF588514A786A54955C1422F996E5B6D77D2878E88317E1B11BD4A723F68", - "clusterHash": "3F3BBC731ABDD261E20BDC129EF24EFF8D5549CFF358E7BAA604F3D74D2DFA7D", + "clusterHash": "F8D51FB2860142179111E84F61779ED89C44532A76FF7B0A82854EEC9A268DFD", "operations": [ { "image": "guergeiro/pnpm:20-10", @@ -122,7 +124,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "@pnpm#npm-lib:build": { "id": "@pnpm#npm-lib:build", @@ -136,7 +139,7 @@ ], "projectHash": "C4BE5CC3B6E75E8F683FC2C89BA662764E82F51A6B6A168CFEE0EB289903F7E1", "targetHash": "530C83EBA93EFB32A674A25A875C49C92A11ED6752CB7E45B56AF866DB92DA53", - "clusterHash": "3F3BBC731ABDD261E20BDC129EF24EFF8D5549CFF358E7BAA604F3D74D2DFA7D", + "clusterHash": "F8D51FB2860142179111E84F61779ED89C44532A76FF7B0A82854EEC9A268DFD", "operations": [ { "image": "guergeiro/pnpm:20-10", @@ -166,7 +169,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#deployments/terraform-deploy:build": { "id": "workspace/path#deployments/terraform-deploy:build", @@ -207,7 +211,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#libraries/dotnet-lib:build": { "id": "workspace/path#libraries/dotnet-lib:build", @@ -222,7 +227,7 @@ ], "projectHash": "B283ADA4D6EDB9C93E3A2740B0544DAA995CF1F933299919847FC7004A441C8B", "targetHash": "E65F3FEA2CDD29BE950ACA21FAC549D64F754FA69F12FE6D662BD6A17BACF9C2", - "clusterHash": "D0068D247E4F29F8A9970B09D7B99545F013110066B6E22B37D53F616F573994", + "clusterHash": "3CA5AE131AA04144ED0B54B7683F5A2B8972393E71713DC586BBF94F53BA3BDD", "operations": [ { "image": "mcr.microsoft.com/dotnet/sdk:9.0.202", @@ -248,7 +253,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#libraries/shell-lib:build": { "id": "workspace/path#libraries/shell-lib:build", @@ -273,7 +279,8 @@ "artifacts": "none", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#projects/dotnet-app:build": { "id": "workspace/path#projects/dotnet-app:build", @@ -291,7 +298,7 @@ ], "projectHash": "D81A2A29701892A62EB4DBB40947B66822A2EB64F6C42684091F2399359A9332", "targetHash": "2E1F8B86FB9AAE5AC3BAAC88DCEAFBDBB8A083EEB38F5DBA551D2EFD31B27328", - "clusterHash": "D0068D247E4F29F8A9970B09D7B99545F013110066B6E22B37D53F616F573994", + "clusterHash": "3CA5AE131AA04144ED0B54B7683F5A2B8972393E71713DC586BBF94F53BA3BDD", "operations": [ { "image": "mcr.microsoft.com/dotnet/sdk:9.0.202", @@ -317,7 +324,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#projects/make-app:build": { "id": "workspace/path#projects/make-app:build", @@ -351,7 +359,8 @@ "artifacts": "none", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#projects/open-api:build": { "id": "workspace/path#projects/open-api:build", @@ -377,7 +386,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#projects/rust-app:build": { "id": "workspace/path#projects/rust-app:build", @@ -406,7 +416,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#tests/playwright:test": { "id": "workspace/path#tests/playwright:test", @@ -442,7 +453,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true } }, "rootNodes": [ @@ -453,13 +465,13 @@ "workspace/path#tests/playwright:test" ], "batches": { - "14A78A1501AFF6333D1FF5A6011BEACBBF52A6C04FB7B5882B117B7F486A46D9": [ - "workspace/path#libraries/dotnet-lib:build", - "workspace/path#projects/dotnet-app:build" - ], - "577FDA009FE819C8E72C3183372BF7070AA7BB84CB823855E17AF5C0EE960D4B": [ + "1565C663A6AA8DD76CC475B61F6DA9891C4B6088668874E4C620C276749985A8": [ "@pnpm#npm-app:build", "@pnpm#npm-lib:build" + ], + "5FF221712FFC15D83449C90E8FCD4C9742CCDDDBD9437B76A2A3D29911DB071B": [ + "workspace/path#libraries/dotnet-lib:build", + "workspace/path#projects/dotnet-app:build" ] } } \ No newline at end of file diff --git a/tests/simple/results/terrabuild-debug.cascade.json b/tests/simple/results/terrabuild-debug.cascade.json index 1272c002..4ca5e32c 100644 --- a/tests/simple/results/terrabuild-debug.cascade.json +++ b/tests/simple/results/terrabuild-debug.cascade.json @@ -1,83 +1,5 @@ { "nodes": { - "14A78A1501AFF6333D1FF5A6011BEACBBF52A6C04FB7B5882B117B7F486A46D9": { - "id": "14A78A1501AFF6333D1FF5A6011BEACBBF52A6C04FB7B5882B117B7F486A46D9", - "projectId": "14A78A1501AFF6333D1FF5A6011BEACBBF52A6C04FB7B5882B117B7F486A46D9", - "projectDir": ".", - "target": "build", - "dependencies": [], - "outputs": [], - "projectHash": "14A78A1501AFF6333D1FF5A6011BEACBBF52A6C04FB7B5882B117B7F486A46D9", - "targetHash": "E65F3FEA2CDD29BE950ACA21FAC549D64F754FA69F12FE6D662BD6A17BACF9C2", - "clusterHash": "D0068D247E4F29F8A9970B09D7B99545F013110066B6E22B37D53F616F573994", - "operations": [ - { - "image": "mcr.microsoft.com/dotnet/sdk:9.0.202", - "platform": "linux/amd64", - "variables": [], - "envs": {}, - "metaCommand": "@dotnet restore", - "command": "dotnet", - "arguments": "restore .terrabuild/14A78A1501AFF6333D1FF5A6011BEACBBF52A6C04FB7B5882B117B7F486A46D9.sln", - "errorLevel": 0 - }, - { - "image": "mcr.microsoft.com/dotnet/sdk:9.0.202", - "platform": "linux/amd64", - "variables": [], - "envs": {}, - "metaCommand": "@dotnet build", - "command": "dotnet", - "arguments": "build .terrabuild/14A78A1501AFF6333D1FF5A6011BEACBBF52A6C04FB7B5882B117B7F486A46D9.sln --no-restore --configuration Debug", - "errorLevel": 0 - } - ], - "artifacts": "managed", - "build": "always", - "batch": "all", - "action": "exec" - }, - "577FDA009FE819C8E72C3183372BF7070AA7BB84CB823855E17AF5C0EE960D4B": { - "id": "577FDA009FE819C8E72C3183372BF7070AA7BB84CB823855E17AF5C0EE960D4B", - "projectId": "577FDA009FE819C8E72C3183372BF7070AA7BB84CB823855E17AF5C0EE960D4B", - "projectDir": ".", - "target": "build", - "dependencies": [], - "outputs": [], - "projectHash": "577FDA009FE819C8E72C3183372BF7070AA7BB84CB823855E17AF5C0EE960D4B", - "targetHash": "5D9DCF588514A786A54955C1422F996E5B6D77D2878E88317E1B11BD4A723F68", - "clusterHash": "3F3BBC731ABDD261E20BDC129EF24EFF8D5549CFF358E7BAA604F3D74D2DFA7D", - "operations": [ - { - "image": "guergeiro/pnpm:20-10", - "platform": "linux/amd64", - "variables": [], - "envs": { - "CI": "true" - }, - "metaCommand": "@pnpm install", - "command": "pnpm", - "arguments": "--recursive --filter ./projects/npm-app --filter ./libraries/npm-lib install --link-workspace-packages", - "errorLevel": 0 - }, - { - "image": "guergeiro/pnpm:20-10", - "platform": "linux/amd64", - "variables": [], - "envs": { - "CI": "true" - }, - "metaCommand": "@pnpm build", - "command": "pnpm", - "arguments": "--recursive --filter ./projects/npm-app --filter ./libraries/npm-lib run build", - "errorLevel": 0 - } - ], - "artifacts": "managed", - "build": "always", - "batch": "all", - "action": "exec" - }, "@pnpm#npm-app:build": { "id": "@pnpm#npm-app:build", "projectId": "@pnpm#npm-app", @@ -92,7 +14,7 @@ ], "projectHash": "BFA142C31E6CAB62B959D3F12487449D39254989D7E4B7E8B34952BEA70B037E", "targetHash": "5D9DCF588514A786A54955C1422F996E5B6D77D2878E88317E1B11BD4A723F68", - "clusterHash": "3F3BBC731ABDD261E20BDC129EF24EFF8D5549CFF358E7BAA604F3D74D2DFA7D", + "clusterHash": "F8D51FB2860142179111E84F61779ED89C44532A76FF7B0A82854EEC9A268DFD", "operations": [ { "image": "guergeiro/pnpm:20-10", @@ -122,7 +44,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "@pnpm#npm-lib:build": { "id": "@pnpm#npm-lib:build", @@ -136,7 +59,7 @@ ], "projectHash": "C4BE5CC3B6E75E8F683FC2C89BA662764E82F51A6B6A168CFEE0EB289903F7E1", "targetHash": "530C83EBA93EFB32A674A25A875C49C92A11ED6752CB7E45B56AF866DB92DA53", - "clusterHash": "3F3BBC731ABDD261E20BDC129EF24EFF8D5549CFF358E7BAA604F3D74D2DFA7D", + "clusterHash": "F8D51FB2860142179111E84F61779ED89C44532A76FF7B0A82854EEC9A268DFD", "operations": [ { "image": "guergeiro/pnpm:20-10", @@ -166,7 +89,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#deployments/terraform-deploy:build": { "id": "workspace/path#deployments/terraform-deploy:build", @@ -207,7 +131,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#libraries/dotnet-lib:build": { "id": "workspace/path#libraries/dotnet-lib:build", @@ -222,7 +147,7 @@ ], "projectHash": "B283ADA4D6EDB9C93E3A2740B0544DAA995CF1F933299919847FC7004A441C8B", "targetHash": "E65F3FEA2CDD29BE950ACA21FAC549D64F754FA69F12FE6D662BD6A17BACF9C2", - "clusterHash": "D0068D247E4F29F8A9970B09D7B99545F013110066B6E22B37D53F616F573994", + "clusterHash": "3CA5AE131AA04144ED0B54B7683F5A2B8972393E71713DC586BBF94F53BA3BDD", "operations": [ { "image": "mcr.microsoft.com/dotnet/sdk:9.0.202", @@ -248,7 +173,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#libraries/shell-lib:build": { "id": "workspace/path#libraries/shell-lib:build", @@ -273,7 +199,8 @@ "artifacts": "none", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#projects/dotnet-app:build": { "id": "workspace/path#projects/dotnet-app:build", @@ -291,7 +218,7 @@ ], "projectHash": "D81A2A29701892A62EB4DBB40947B66822A2EB64F6C42684091F2399359A9332", "targetHash": "2E1F8B86FB9AAE5AC3BAAC88DCEAFBDBB8A083EEB38F5DBA551D2EFD31B27328", - "clusterHash": "D0068D247E4F29F8A9970B09D7B99545F013110066B6E22B37D53F616F573994", + "clusterHash": "3CA5AE131AA04144ED0B54B7683F5A2B8972393E71713DC586BBF94F53BA3BDD", "operations": [ { "image": "mcr.microsoft.com/dotnet/sdk:9.0.202", @@ -317,7 +244,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#projects/make-app:build": { "id": "workspace/path#projects/make-app:build", @@ -351,7 +279,8 @@ "artifacts": "none", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#projects/open-api:build": { "id": "workspace/path#projects/open-api:build", @@ -377,7 +306,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#projects/rust-app:build": { "id": "workspace/path#projects/rust-app:build", @@ -406,7 +336,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true }, "workspace/path#tests/playwright:test": { "id": "workspace/path#tests/playwright:test", @@ -442,7 +373,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "exec", + "required": true } }, "rootNodes": [ @@ -452,14 +384,5 @@ "workspace/path#projects/rust-app:build", "workspace/path#tests/playwright:test" ], - "batches": { - "14A78A1501AFF6333D1FF5A6011BEACBBF52A6C04FB7B5882B117B7F486A46D9": [ - "workspace/path#libraries/dotnet-lib:build", - "workspace/path#projects/dotnet-app:build" - ], - "577FDA009FE819C8E72C3183372BF7070AA7BB84CB823855E17AF5C0EE960D4B": [ - "@pnpm#npm-app:build", - "@pnpm#npm-lib:build" - ] - } + "batches": {} } \ No newline at end of file diff --git a/tests/simple/results/terrabuild-debug.info.md b/tests/simple/results/terrabuild-debug.info.md index 165b8d23..8a89e7ae 100644 --- a/tests/simple/results/terrabuild-debug.info.md +++ b/tests/simple/results/terrabuild-debug.info.md @@ -16,9 +16,9 @@ flowchart TD classDef build stroke:red,stroke-width:3px classDef restore stroke:orange,stroke-width:3px classDef ignore stroke:black,stroke-width:3px -14A78A1501AFF6333D1FF5A6011BEACBBF52A6C04FB7B5882B117B7F486A46D9("build +1565C663A6AA8DD76CC475B61F6DA9891C4B6088668874E4C620C276749985A8("build .") -577FDA009FE819C8E72C3183372BF7070AA7BB84CB823855E17AF5C0EE960D4B("build +5FF221712FFC15D83449C90E8FCD4C9742CCDDDBD9437B76A2A3D29911DB071B("build .") #pnpm#npm-app:build("build npm_app projects/npm-app") @@ -40,8 +40,8 @@ workspace/path#projects/rust-app:build("build projects/rust-app") workspace/path#tests/playwright:test("test playwright_test tests/playwright") -class 14A78A1501AFF6333D1FF5A6011BEACBBF52A6C04FB7B5882B117B7F486A46D9 ignore -class 577FDA009FE819C8E72C3183372BF7070AA7BB84CB823855E17AF5C0EE960D4B ignore +class 1565C663A6AA8DD76CC475B61F6DA9891C4B6088668874E4C620C276749985A8 ignore +class 5FF221712FFC15D83449C90E8FCD4C9742CCDDDBD9437B76A2A3D29911DB071B ignore #pnpm#npm-app:build --> #pnpm#npm-lib:build class #pnpm#npm-app:build ignore class #pnpm#npm-lib:build ignore diff --git a/tests/simple/results/terrabuild-debug.node.json b/tests/simple/results/terrabuild-debug.node.json index 7b0d66ed..99b8f979 100644 --- a/tests/simple/results/terrabuild-debug.node.json +++ b/tests/simple/results/terrabuild-debug.node.json @@ -14,7 +14,7 @@ ], "projectHash": "BFA142C31E6CAB62B959D3F12487449D39254989D7E4B7E8B34952BEA70B037E", "targetHash": "5D9DCF588514A786A54955C1422F996E5B6D77D2878E88317E1B11BD4A723F68", - "clusterHash": "3F3BBC731ABDD261E20BDC129EF24EFF8D5549CFF358E7BAA604F3D74D2DFA7D", + "clusterHash": "F8D51FB2860142179111E84F61779ED89C44532A76FF7B0A82854EEC9A268DFD", "operations": [ { "image": "guergeiro/pnpm:20-10", @@ -44,7 +44,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "ignore", + "required": true }, "@pnpm#npm-lib:build": { "id": "@pnpm#npm-lib:build", @@ -58,7 +59,7 @@ ], "projectHash": "C4BE5CC3B6E75E8F683FC2C89BA662764E82F51A6B6A168CFEE0EB289903F7E1", "targetHash": "530C83EBA93EFB32A674A25A875C49C92A11ED6752CB7E45B56AF866DB92DA53", - "clusterHash": "3F3BBC731ABDD261E20BDC129EF24EFF8D5549CFF358E7BAA604F3D74D2DFA7D", + "clusterHash": "F8D51FB2860142179111E84F61779ED89C44532A76FF7B0A82854EEC9A268DFD", "operations": [ { "image": "guergeiro/pnpm:20-10", @@ -88,7 +89,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "ignore", + "required": true }, "workspace/path#deployments/terraform-deploy:build": { "id": "workspace/path#deployments/terraform-deploy:build", @@ -129,7 +131,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "ignore", + "required": true }, "workspace/path#libraries/dotnet-lib:build": { "id": "workspace/path#libraries/dotnet-lib:build", @@ -144,7 +147,7 @@ ], "projectHash": "B283ADA4D6EDB9C93E3A2740B0544DAA995CF1F933299919847FC7004A441C8B", "targetHash": "E65F3FEA2CDD29BE950ACA21FAC549D64F754FA69F12FE6D662BD6A17BACF9C2", - "clusterHash": "D0068D247E4F29F8A9970B09D7B99545F013110066B6E22B37D53F616F573994", + "clusterHash": "3CA5AE131AA04144ED0B54B7683F5A2B8972393E71713DC586BBF94F53BA3BDD", "operations": [ { "image": "mcr.microsoft.com/dotnet/sdk:9.0.202", @@ -170,7 +173,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "ignore", + "required": true }, "workspace/path#libraries/shell-lib:build": { "id": "workspace/path#libraries/shell-lib:build", @@ -195,7 +199,8 @@ "artifacts": "none", "build": "always", "batch": "all", - "action": "exec" + "action": "ignore", + "required": true }, "workspace/path#projects/dotnet-app:build": { "id": "workspace/path#projects/dotnet-app:build", @@ -213,7 +218,7 @@ ], "projectHash": "D81A2A29701892A62EB4DBB40947B66822A2EB64F6C42684091F2399359A9332", "targetHash": "2E1F8B86FB9AAE5AC3BAAC88DCEAFBDBB8A083EEB38F5DBA551D2EFD31B27328", - "clusterHash": "D0068D247E4F29F8A9970B09D7B99545F013110066B6E22B37D53F616F573994", + "clusterHash": "3CA5AE131AA04144ED0B54B7683F5A2B8972393E71713DC586BBF94F53BA3BDD", "operations": [ { "image": "mcr.microsoft.com/dotnet/sdk:9.0.202", @@ -239,7 +244,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "ignore", + "required": true }, "workspace/path#projects/make-app:build": { "id": "workspace/path#projects/make-app:build", @@ -273,7 +279,8 @@ "artifacts": "none", "build": "always", "batch": "all", - "action": "exec" + "action": "ignore", + "required": true }, "workspace/path#projects/open-api:build": { "id": "workspace/path#projects/open-api:build", @@ -299,7 +306,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "ignore", + "required": true }, "workspace/path#projects/rust-app:build": { "id": "workspace/path#projects/rust-app:build", @@ -328,7 +336,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "ignore", + "required": true }, "workspace/path#tests/playwright:test": { "id": "workspace/path#tests/playwright:test", @@ -364,7 +373,8 @@ "artifacts": "managed", "build": "always", "batch": "all", - "action": "exec" + "action": "ignore", + "required": true } }, "rootNodes": [ From 8e203659a0decf4b2a7d4f85453ee47f731b47d0 Mon Sep 17 00:00:00 2001 From: Pierre Chalamet Date: Fri, 26 Dec 2025 00:13:01 +0000 Subject: [PATCH 2/2] fix cascade computation --- .vscode/launch.json | 4 ++-- src/Terrabuild/Core/GraphPipeline/Cascade.fs | 14 ++++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 00b18c27..ab3315dc 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -12,12 +12,12 @@ // "args": ["run", "build", "test", "--workspace", "tests/simple", "--parallel", "1", "--debug", "--log" ], // "args": ["run", "build", "test", "plan", "apply", "--workspace", "tests/indirect-target", "--parallel", "1", "--debug", "--log" ], - "args": ["run", "build", "--workspace", "../../matis/matis-next", "--configuration", "local", "--retry", "--debug", "--local-only", "--log", "--what-if" ], + // "args": ["run", "build", "--workspace", "../../matis/matis-next", "--configuration", "local", "--retry", "--debug", "--local-only", "--log", "--what-if" ], + "args": ["run", "build", "test", "dist", "--configuration", "Debug", "--log", "--debug", "--parallel", "1", "--retry" ], // "args": ["run", "build", "--workspace", "tests/cluster-layers", "--force", "--debug", "-p", "1", "--whatif" ], // "args": ["run", "build", "--workspace", "tests/cluster-layers", "--force", "--debug", "-p", "1", "--whatif" ], // "args": ["run", "plan", "dist", "build", "test", "--workspace", "../insights", "--log", "-c", "dev", "--debug", "-p", "1", "--whatif" ], - // "args": ["run", "build", "test", "dist", "--log", "--debug", "--parallel", "1", "--retry", "--local-only", "-p", "terrabuild" ], // "args": [ "run", "build", "--workspace", "tests/basic", "--parallel", "1", "--force", "--debug", "--log" ], // "args": ["run", "build", "--workspace", "tests/simple", "--debug", "--parallel", "1", "--force" ], // "cwd": "${workspaceFolder}/tests/indirect-target", diff --git a/src/Terrabuild/Core/GraphPipeline/Cascade.fs b/src/Terrabuild/Core/GraphPipeline/Cascade.fs index b9396acb..233710a5 100644 --- a/src/Terrabuild/Core/GraphPipeline/Cascade.fs +++ b/src/Terrabuild/Core/GraphPipeline/Cascade.fs @@ -2,6 +2,7 @@ module GraphPipeline.Cascade open Collections open GraphDef +open Serilog let build (graph: Graph) = @@ -12,8 +13,6 @@ let build (graph: Graph) = |> Map.ofSeq |> Map.map (fun _ depIds -> depIds |> Seq.map snd |> Set.ofSeq) - let leafNodes = graph.Nodes |> Map.filter (fun _ node -> node.Dependencies |> Set.isEmpty) - let mutable nodes = graph.Nodes let mutable nodeRequirements = Map.empty @@ -23,18 +22,21 @@ let build (graph: Graph) = | _ -> let node = nodes[nodeId] let isRequired = - if node.Required then node.Required + if node.Required then + node.Required else node2dependents |> Map.tryFind nodeId - |> Option.map (Seq.exists getNodeRequirements) - |> Option.defaultValue false + |> Option.defaultValue Set.empty + |> Seq.exists getNodeRequirements + Log.Debug("Node {NodeId} has requirement {Requirement}", node.Id, isRequired) nodeRequirements <- nodeRequirements |> Map.add nodeId isRequired let node = { node with Required = isRequired } nodes <- nodes |> Map.add node.Id node isRequired - leafNodes.Keys |> Seq.iter (fun leafNodeId -> getNodeRequirements leafNodeId |> ignore) + for nodeId in graph.Nodes.Keys do + getNodeRequirements nodeId |> ignore { graph with Graph.Nodes = nodes }