Skip to content

Commit

Permalink
Fixed "cannot save parameter" error message
Browse files Browse the repository at this point in the history
  • Loading branch information
hbelmiro committed Feb 14, 2024
1 parent 87db18e commit 53a2142
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions backend/src/v2/cmd/driver/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,12 @@ func drive() (err error) {
if err = writeFile(*iterationCountPath, []byte(fmt.Sprintf("%v", *execution.IterationCount))); err != nil {
return fmt.Errorf("failed to write iteration count to file: %w", err)
}
} else {
if *driverType == "ROOT_DAG" {
if err = writeFile(*iterationCountPath, []byte("0")); err != nil {
return fmt.Errorf("failed to write iteration count to file: %w", err)
}
}
}
if execution.Cached != nil {
if err = writeFile(*cachedDecisionPath, []byte(strconv.FormatBool(*execution.Cached))); err != nil {
Expand All @@ -205,6 +211,13 @@ func drive() (err error) {
if err = writeFile(*conditionPath, []byte(strconv.FormatBool(*execution.Condition))); err != nil {
return fmt.Errorf("failed to write condition to file: %w", err)
}
} else {
// nil is a valid value for Condition
if *driverType == "ROOT_DAG" || *driverType == "CONTAINER" {
if err = writeFile(*conditionPath, []byte("nil")); err != nil {
return fmt.Errorf("failed to write condition to file: %w", err)
}
}
}
if execution.PodSpecPatch != "" {
glog.Infof("output podSpecPatch=\n%s\n", execution.PodSpecPatch)
Expand Down

0 comments on commit 53a2142

Please sign in to comment.