Skip to content

Commit

Permalink
internal/gomote: update package dependencies
Browse files Browse the repository at this point in the history
The cpython3 dependency should only be installed on Windows and
Darwin. We can't be sure that the package exists for all other
platforms.

Updates golang/go#63992

Change-Id: I1d1063efc830eb9d347c5e18c0989bc1f5fe727b
Reviewed-on: https://go-review.googlesource.com/c/build/+/542256
Reviewed-by: Dmitri Shuralyov <[email protected]>
Auto-Submit: Carlos Amedee <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Dmitri Shuralyov <[email protected]>
  • Loading branch information
cagedmantis authored and gopherbot committed Nov 15, 2023
1 parent da2c2fd commit 52b5fb2
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions internal/gomote/swarming.go
Original file line number Diff line number Diff line change
Expand Up @@ -830,20 +830,21 @@ func (ss *SwarmingServer) newSwarmingTask(ctx context.Context, name string, dime
if err != nil {
return "", err
}

packages := []*swarmpb.CipdPackage{
{Path: "tools/bin", PackageName: "infra/tools/luci-auth/" + cipdPlatform, Version: "latest"},
{Path: "tools", PackageName: "golang/bootstrap-go/" + cipdPlatform, Version: "latest"},
{Path: "tools", PackageName: "infra/3pp/tools/cpython3/" + cipdPlatform, Version: "latest"},
}
pythonBin := "python3"
if goos == "windows" {
pythonBin = `tools\bin\python3.exe`
} else if goos == "darwin" {
switch goos {
case "darwin":
pythonBin = `tools/bin/python3`
packages = append(packages, &swarmpb.CipdPackage{Path: "tools/bin", PackageName: "infra/tools/mac_toolchain/" + cipdPlatform, Version: "latest"})
packages = append(packages,
&swarmpb.CipdPackage{Path: "tools/bin", PackageName: "infra/tools/mac_toolchain/" + cipdPlatform, Version: "latest"},
&swarmpb.CipdPackage{Path: "tools", PackageName: "infra/3pp/tools/cpython3/" + cipdPlatform, Version: "latest"})
case "windows":
pythonBin = `tools\bin\python3.exe`
packages = append(packages, &swarmpb.CipdPackage{Path: "tools", PackageName: "infra/3pp/tools/cpython3/" + cipdPlatform, Version: "latest"})
}

req := &swarmpb.NewTaskRequest{
Name: name,
Priority: 20, // 30 is the priority for builds
Expand Down

0 comments on commit 52b5fb2

Please sign in to comment.