diff --git a/cmd/execute/execute.go b/cmd/execute/execute.go index f6da571..1411110 100644 --- a/cmd/execute/execute.go +++ b/cmd/execute/execute.go @@ -87,33 +87,35 @@ var ExecuteCmd = &cobra.Command{ allNodes, roots = CreateTrees(version, false) - if maxMachines { - executionMachines = version.MaxMachines - } else if machineConfiguration != "" { - machines, err := parseMachineConfiguration(machineConfiguration) - if err != nil { - fmt.Printf("Error: %s\n", err) - os.Exit(1) - } - - if len(fleet.Machines) == 3 { - // 3 types of machines: small, medium, and large - executionMachines = machines - - if machines.Default != nil { - fmt.Printf("Error: you need to use the small-medium-large format to specify the numbers of machines (e.g. 1-2-3)") - os.Exit(1) - } - } else { - // 1 type of machine - executionMachines, err = handleSingleMachineType(*fleet, machines) + if executionMachines == (types.Machines{}) { + if maxMachines { + executionMachines = version.MaxMachines + } else if machineConfiguration != "" { + machines, err := parseMachineConfiguration(machineConfiguration) if err != nil { fmt.Printf("Error: %s\n", err) os.Exit(1) } + + if len(fleet.Machines) == 3 { + // 3 types of machines: small, medium, and large + executionMachines = machines + + if machines.Default != nil { + fmt.Printf("Error: you need to use the small-medium-large format to specify the numbers of machines (e.g. 1-2-3)") + os.Exit(1) + } + } else { + // 1 type of machine + executionMachines, err = handleSingleMachineType(*fleet, machines) + if err != nil { + fmt.Printf("Error: %s\n", err) + os.Exit(1) + } + } + } else { + executionMachines = setMachinesToMinimum(version.MaxMachines) } - } else { - executionMachines = setMachinesToMinimum(version.MaxMachines) } outputNodes := make([]string, 0) diff --git a/cmd/execute/watch.go b/cmd/execute/watch.go index 06d796e..134f2fb 100644 --- a/cmd/execute/watch.go +++ b/cmd/execute/watch.go @@ -67,6 +67,8 @@ func WatchRun(runID uuid.UUID, downloadPath string, nodesToDownload map[string]o mutex.Unlock() break } + version := output.GetWorkflowVersionByID(*run.WorkflowVersionInfo, uuid.Nil) + allNodes, roots := CreateTrees(version, false) out := "" out += fmt.Sprintf(fmtStr, "Name:", run.WorkflowName)