diff --git a/backend/src/v2/cmd/driver/main.go b/backend/src/v2/cmd/driver/main.go index 588d211521b8..9a9337ff4f05 100644 --- a/backend/src/v2/cmd/driver/main.go +++ b/backend/src/v2/cmd/driver/main.go @@ -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 { @@ -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)