fix(build): clear a killed boot test's container and volume first #16

Merged
openhands merged 1 commits from fix/worker-finish-job-on-stop into main 2026-10-25 22:33:31 +00:00
+4
View File
@@ -236,6 +236,10 @@ func bootCheck(gamesDir, id, agentImage string, wantOutside bool) (problems, ver
if err != nil { if err != nil {
return nil, nil, err return nil, nil, err
} }
// A boot test that was killed (worker restarted mid-build) leaves its container and volume behind,
// and the next deploy under the same name would trip over them
runCmd("docker", "rm", "-f", "boottest-"+id)
runCmd("docker", "volume", "rm", "-f", "boottest-"+id+"-data")
payloadCmd := exec.Command(self, "boottest-payload", "-games", gamesDir, id) payloadCmd := exec.Command(self, "boottest-payload", "-games", gamesDir, id)
var stderr bytes.Buffer var stderr bytes.Buffer
payloadCmd.Stderr = &stderr payloadCmd.Stderr = &stderr