Skip to content

Commit

Permalink
Merge pull request #363 from JoshuaKrstic/experiments
Browse files Browse the repository at this point in the history
Make launcher host tmp directory before experiment fetch
  • Loading branch information
JoshuaKrstic committed Sep 18, 2023
2 parents c2f108f + ee76386 commit d4994a5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions launcher/launcher/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,20 @@ func main() {
return
}

if err := os.MkdirAll(launcherfile.HostTmpPath, 0744); err != nil {
logger.Printf("failed to create %s: %v", launcherfile.HostTmpPath, err)
}
experimentsFile := path.Join(launcherfile.HostTmpPath, experimentDataFile)

args := fmt.Sprintf("-output=%s", experimentsFile)
err = exec.Command(binaryPath, args).Run()
if err != nil {
logger.Printf("failure during experiment sync: %v", err)
logger.Printf("failure during experiment sync: %v\n", err)
}

e, err := experiments.New(experimentsFile)
if err != nil {
logger.Printf("failed to read experiment file %v\n", err)
logger.Printf("failed to read experiment file: %v\n", err)
// do not fail if experiment retrieval fails
}
launchSpec.Experiments = e
Expand Down

0 comments on commit d4994a5

Please sign in to comment.