Skip to content

Commit

Permalink
internal/gomote: specify workdir to buildlet as an absolute path
Browse files Browse the repository at this point in the history
Currently, the workdir passed to the buildlet is a relative path, but
this breaks an assumption in the buildlet about the --workdir flag
always being absolute or empty (if empty, it is set to an absolute
path). This results in a bunch of things breaking because a bunch of
codepaths in handleExec in the buildlet expect an absolute path.

At least, that's my current theory. If this doesn't work, then I'll
revert the change to set --workdir and dig deeper.

Change-Id: I3a484e336f997804c0aaaaae02d0af0f00cb6e9b
Reviewed-on: https://go-review.googlesource.com/c/build/+/616917
Reviewed-by: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
  • Loading branch information
mknyszek committed Oct 1, 2024
1 parent 0d13565 commit cc0b884
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/gomote/swarming.go
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,7 @@ if __name__ == "__main__":
os.remove(buildlet_path)
urllib.request.urlretrieve("https://storage.googleapis.com/go-builder-data/buildlet.%s-%s", buildlet_path)
make_executable(os.getcwd() + sep + buildlet_file)
subprocess.run(["%s", buildlet_path, "--workdir=.", "--coordinator=gomotessh.golang.org:443", "--reverse-type=swarming-task", "-swarming-bot", "-halt=false"], shell=False, env=os.environ.copy())
subprocess.run(["%s", buildlet_path, "--workdir="+os.getcwd(), "--coordinator=gomotessh.golang.org:443", "--reverse-type=swarming-task", "-swarming-bot", "-halt=false"], shell=False, env=os.environ.copy())
`
return fmt.Sprintf(cmd, goos, goarch, golangbuildBin)
}
Expand Down

0 comments on commit cc0b884

Please sign in to comment.