Skip to content

Commit

Permalink
Fix machine config parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
mhmdiaa committed Jul 25, 2024
1 parent 7a92add commit cc2d8d1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cmd/execute/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ func readConfigMachines(config *map[string]interface{}, isTool bool, maximumMach
} else if isLarge {
execMachines.Large = numberOfMachines
} else if isDefault {
execMachines.Default = maximumMachines.Default
execMachines.Default = numberOfMachines
}

}
Expand Down
8 changes: 2 additions & 6 deletions cmd/execute/execute.go
Original file line number Diff line number Diff line change
Expand Up @@ -983,9 +983,7 @@ func prepareForExec(objectPath string) *types.WorkflowVersionDetailed {
if workflow != nil && newWorkflowName == "" {
// Executing an existing workflow
wfVersion = GetLatestWorkflowVersion(workflow.ID, fleet.ID)
if configFile == "" {
executionMachines = wfVersion.MaxMachines
} else {
if configFile != "" {
update, updatedWfVersion, newPrimitiveNodes := readConfig(configFile, wfVersion, nil)
if update {
uploadFilesIfNeeded(newPrimitiveNodes)
Expand Down Expand Up @@ -1042,9 +1040,7 @@ func prepareForExec(objectPath string) *types.WorkflowVersionDetailed {
}
update := false
var updatedWfVersion *types.WorkflowVersionDetailed
if configFile == "" {
executionMachines = copiedWfVersion.MaxMachines
} else {
if configFile != "" {
update, updatedWfVersion, primitiveNodes = readConfig(configFile, copiedWfVersion, nil)
}

Expand Down

0 comments on commit cc2d8d1

Please sign in to comment.