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/cmd/gomote: warn when gomote binary is too old #30929

Open
bradfitz opened this issue Mar 19, 2019 · 6 comments
Open

x/build/cmd/gomote: warn when gomote binary is too old #30929

bradfitz opened this issue Mar 19, 2019 · 6 comments

Comments

@bradfitz
Copy link
Contributor

@bradfitz bradfitz commented Mar 19, 2019

A common gomote complaint is that the set of builders has changed since the last time the user built the gomote binary.

We could pretty easily get it from the server instead.

/cc @ianlancetaylor

@gopherbot
Copy link

@gopherbot gopherbot commented Mar 19, 2019

Change https://golang.org/cl/168341 mentions this issue: cmd/coordinator: add a JSON mode to the /builders handler

Loading

gopherbot pushed a commit to golang/build that referenced this issue Mar 21, 2019
And add a test that indirectly verifies that the BuildConfig and
HostConfig are JSON serializable. They weren't due to an exported func.

But that exported func shouldn't be exported, so unexport it and move
more policy into dashboard/builders.go. (There's been a number of
recent cleanup CLs to move all policy into dashboard/builders.go
instead of sprinkled all over the coordinator)

A future CL will use this JSON in gomote create.

Updates golang/go#30929

Change-Id: I726eaf6a4f3eeaab27d31e2642cb7642111ccd67
Reviewed-on: https://go-review.googlesource.com/c/build/+/168341
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
@gopherbot
Copy link

@gopherbot gopherbot commented Mar 27, 2019

Change https://golang.org/cl/169678 mentions this issue: cmd/gomote: get list of buildlet types from server

Loading

@gopherbot gopherbot closed this in f1b4be0 Mar 27, 2019
@bradfitz
Copy link
Contributor Author

@bradfitz bradfitz commented Mar 27, 2019

I did create and thought that was enough, but other parts of gomote still use the hard-coded info.

Reopening.

Loading

@bradfitz bradfitz reopened this Mar 27, 2019
@gopherbot
Copy link

@gopherbot gopherbot commented Apr 2, 2019

Change https://golang.org/cl/170397 mentions this issue: cmd/gomote: add -firewall flag to run, defaulting to off

Loading

gopherbot pushed a commit to golang/build that referenced this issue Apr 2, 2019
While debugging golang/go#25386 I found that the firewall defaulting
to on made debugging modules hard. So make gomote default to
no outbound firewall and make it opt-in for people who
want to reproduce the builder more.

Also in this CL: start to use server's builder config, not local state
(follow up to CL 169678 which was incomplete). It's still incomplete
in this CL, but there's now a panic with more useful information to
users telling them to update their binary.

Updates golang/go#30929

Change-Id: I17bded71919af1e7a9181866a1349eb72da40051
Reviewed-on: https://go-review.googlesource.com/c/build/+/170397
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
@bradfitz bradfitz changed the title x/build/cmd/gomote: get list of buildlets from the server x/build/cmd/gomote: get buildlet configs from the server Apr 12, 2019
@bradfitz
Copy link
Contributor Author

@bradfitz bradfitz commented May 29, 2019

This stalled a bit because I realized https://farmer.golang.org/builders?mode=json wasn't sufficient, given how many unexported fields are in dashboard.BuildConfig and HostConfig.

Maybe instead we should just hash it all server-side and have the client check that its hash matches, otherwise warm loudly to the user that their gomote binary is old. We could even pull both sides' dates from their module info and tell them how old it is.

Loading

@bradfitz bradfitz changed the title x/build/cmd/gomote: get buildlet configs from the server x/build/cmd/gomote: warn when gomote binary is too old May 29, 2019
@bradfitz bradfitz removed their assignment May 29, 2019
@dmitshur
Copy link
Contributor

@dmitshur dmitshur commented Sep 16, 2019

Another possible instance of this problem is in #33309 (comment) (see last paragraph of the comment).

However, just fetching https://farmer.golang.org/builders?mode=json wouldn't have been sufficient, because the problem was that gomote was old enough to be missing a flag and not setting an env var. We probably need something to tell if the binary itself is too old. Maybe module versions and the module mirror can come in handy.

Loading

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
3 participants