Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/build: GOPROXY environment configuration issue with linux-amd64-wsl builder #42971

Open
bcmills opened this issue Dec 3, 2020 · 5 comments
Open
Assignees
Milestone

Comments

@bcmills
Copy link
Member

@bcmills bcmills commented Dec 3, 2020

Looking at the builder log in https://build.golang.org/log/26ea2fd1426a51a224b5d321915717e906ded84a, I see the following line. Note that it lists GOPROXY three different times and GOROOT_BOOTSTRAP twice:

:: Running /tmp/farm/go/bin/go with args ["/tmp/farm/go/bin/go" "test" "-short" "golang.org/x/crypto/..."] and env ["LANG=zh_CN.UTF-8" "PATH=/tmp/farm/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" "HOME=/home/gopher" "LOGNAME=gopher" "USER=gopher" "SHELL=/bin/bash" "INVOCATION_ID=fe969678216d4cceaebbdc436df708c2" "JOURNAL_STREAM=8:4142335" "GO_BUILDER_ENV=host-linux-amd64-wsl" "WORKDIR=/tmp/farm" "HTTPS_PROXY=http://proxy:8123" "HTTP_PROXY=http://proxy:8123" "GOPROXY=https://goproxy.io,direct" "WSL_DISTRO_NAME=Ubuntu" "WSL_INTEROP=/run/WSL/20_interop" "WSLENV=BASH_ENV/u" "GO_STAGE0_NET_DELAY=700ms" "GO_STAGE0_DL_DELAY=600ms" "GOROOT_BOOTSTRAP=/tmp/farm/go1.4" "GO_BUILDER_NAME=linux-amd64-wsl" "GO_BUILDER_FLAKY_NET=1" "GOROOT_BOOTSTRAP=/usr/lib/go" "GOROOT=/tmp/farm/go" "GOPATH=/tmp/farm/gopath" "GOPROXY=http://10.240.0.3:30157" "GOPROXY=https://proxy.golang.org" "TMPDIR=/tmp/farm/tmp" "GOCACHE=/tmp/farm/gocache"] in dir /tmp/farm/gopath/src/golang.org/x/crypto

The second GOROOT_BOOTSTRAP seems to come from here, and might be working as intended: https://github.com/golang/build/blob/a9f75ee9992b28221ceec0c56af51265ea857ce2/cmd/buildlet/buildlet.go#L263

The second GOPROXY setting comes from here: https://github.com/golang/build/blob/5f1e306b98a112c236997d393adc5c11405377ca/cmd/coordinator/coordinator.go#L2702

The third GOPROXY setting comes from here: https://github.com/golang/build/blob/b6220de1adc000cad31eadf59558e1d3a8e32205/dashboard/builders.go#L921-L925


Given that one of the tests in that log failed with an EOF error communicating with proxy.golang.org, I suspect that it really should be using the local GOPROXY default (https://goproxy.io,direct) instead of the cmd/go default. I'm not sure what needs to happen to fix that configuration.

CC @mengzhuo @cagedmantis @golang/release

@gopherbot gopherbot added this to the Unreleased milestone Dec 3, 2020
@bcmills bcmills changed the title x/build: environment configuration issue for linux-amd64-wsl builder x/build: GOPROXY environment configuration issue with linux-amd64-wsl builder Dec 3, 2020
@mengzhuo
Copy link
Contributor

@mengzhuo mengzhuo commented Dec 4, 2020

Please assign this issue to me. @bcmills
p.s. Why can't I assign this issue to myself?

@mengzhuo
Copy link
Contributor

@mengzhuo mengzhuo commented Dec 4, 2020

To other builders maintainer, linux-amd64-wsl using systemd to set the enviroment.

[Unit]
Description=Go Builder For WSL
After=network-online.target

[Service]
ExecStartPre=/bin/bash -c 'chmod -R u+w /tmp/farm; rm -rf /tmp/farm; /bin/mkdir -p /tmp/farm; true'
ExecStart=/home/gopher/go/bin/stage0
Environment=GO_BUILDER_ENV=host-linux-amd64-wsl
Environment=WORKDIR=/tmp/farm
Environment=HTTPS_PROXY=http://proxy:8123
Environment=HTTP_PROXY=http://proxy:8123
Environment=GOPROXY=https://goproxy.io,direct

User=gopher
WorkingDirectory=/home/gopher

Restart=always
RestartSec=5
StartLimitInterval=0

[Install]
WantedBy=multi-user.target
@dmitshur
Copy link
Member

@dmitshur dmitshur commented Dec 4, 2020

p.s. Why can't I assign this issue to myself?

@mengzhuo Take a look at https://golang.org/wiki/GitHubAccess#assignees.

@gopherbot
Copy link

@gopherbot gopherbot commented Dec 4, 2020

Change https://golang.org/cl/275332 mentions this issue: buildlet: check $workdir/go1.4 existance before append env

@gopherbot
Copy link

@gopherbot gopherbot commented Dec 4, 2020

Change https://golang.org/cl/275412 mentions this issue: cmd/coordinator,dashboard: add privateGoProxy setting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.