Граф коммитов

1595 Коммитов

Автор SHA1 Сообщение Дата
Dmitri Shuralyov 0eda5f7a6a maintner: skip incomplete CLs in ForeachOpenCL
CL 107296 has created a GerritCL.complete method and started
using it to enforce non-nil Meta and Commit fields in GerritCL
that are returned to the client.

It was used in ForeachCLUnsorted to skip incomplete CLs when
iterating over the gp.cls map, but due to an oversight, it
was not added to ForeachOpenCL. As a result, it was possible
for incomplete CLs to be iterated over via ForeachOpenCL.
This change fixes that by adding the missing complete check.

Update TestGerritMetaNonNil test to check ForeachOpenCL too.

Add missing period at the end of a sentence in ForeachCLUnsorted
documentation.

Fixes golang/go#27536.

Change-Id: I453d0f2b2b2793ed1b8a55bae1c2254906d74792
Reviewed-on: https://go-review.googlesource.com/135677
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-09-18 15:15:53 +00:00
Dmitri Shuralyov 1d8c3548c0 internal/gophers: restore valid Gerrit emails
CL 132995 made a lot of changes to the gophers table based on
the output of gopherstats -mode=find-gerrit-gophers, which is
a new cmd/gopherstats mode added in that very CL.

The current implementation of Person.mergeIDs makes it so that
the first email seen is considered the Gerrit email.

Many of the additions of CL 132995 did not take that into account,
causing the Gerrit field to change for some gophers incorrectly.

Overall, that CL caused the following changes to gophers:

	Github field changes:
	tal@whatexit.org: GitHub="" -> "TomOnTime"
	Carl Henrik Lunde: GitHub="" -> "chlunde"
	Dieter Plaetinck: GitHub="" -> "Dieterbe"
	Diogo Pinela: GitHub="" -> "dpinela"
	Frank Schroeder: GitHub="" -> "magiconair"
	Gregory Man: GitHub="" -> "gregory-m"
	Jan Berktold: GitHub="" -> "JanBerktold"
	Jean de Klerk: GitHub="" -> "jadekler"
	Josselin Costanzi: GitHub="" -> "josselin-c"
	Martin Garton: GitHub="MartinGarton" -> "mjgarton"
	Matt Harden: GitHub="" -> "nerdatmath"
	Michael Darakananda: GitHub="" -> "pongad"
	Mostyn Bramley-Moore: GitHub="" -> "mostynb"
	Nicholas Maniscalco: GitHub="" -> "nicholasmaniscalco"
	Roland Illig: GitHub="" -> "rillig"
	Yasha Bubnov: GitHub="" -> "ybubnov"
	Zheng Xu: GitHub="" -> "Zheng-Xu"
	ltnwgl: GitHub="" -> "gengliangwang"
	oiooj: GitHub="" -> "oiooj"
	thoeni: GitHub="" -> "thoeni"

	Gerrit field changes:
	Andrew Bonventre: Gerrit="andybons@golang.org" -> "365204+andybons@users.noreply.github.com"
	Carl Mastrangelo: Gerrit="notcarl@google.com" -> "carl.mastrangelo@gmail.com"
	Chris McGee: Gerrit="sirnewton_01@yahoo.ca" -> "newton688@gmail.com"
	Eric Lagergren: Gerrit="ericscottlagergren@gmail.com" -> "eric@ericlagergren.com"
	Filippo Valsorda: Gerrit="filippo@golang.org" -> "6195@62eb7196-b449-3ce5-99f1-c037f21e1705"
	Guillaume J. Charmes: Gerrit="guillaume@charmes.net" -> "gcharmes@magicleap.com"
	Harshavardhana: Gerrit="hrshvardhana@gmail.com" -> "harsha@minio.io"
	Jean de Klerk: Gerrit="jadekler@gmail.com" -> "deklerk@google.com"
	Joe Tsai: Gerrit="joetsai@google.com" -> "joetsai@digital-static.net"
	Martin Möhrmann: Gerrit="moehrmann@google.com" -> "martisch@uos.de"
	Matthew Dempsky: Gerrit="mdempsky@google.com" -> "matthew@dempsky.org"
	Olivier Poitrey: Gerrit="rs@dailymotion.com" -> "rs@netflix.com"
	Paul Jolly: Gerrit="paul@myitcv.org.uk" -> "paul@myitcv.io"
	Ralph Corderoy: Gerrit="ralph@inputplus.co.uk" -> "ralph.corderoy@gmail.com"
	Raul Silvera: Gerrit="rsilvera@google.com" -> "rauls5382@gmail.com"
	Richard Miller: Gerrit="miller.research@gmail.com" -> "millerresearch@gmail.com"
	Sebastien Binet: Gerrit="seb.binet@gmail.com" -> "binet@cern.ch"
	Tobias Klauser: Gerrit="tobias.klauser@gmail.com" -> "tklauser@distanz.ch"
	Vitor De Mario: Gerrit="vitordemario@gmail.com" -> "vitor.demario@mendelics.com.br"

	Googler field changes:
	Aaron Kemp: Googler=false -> true
	Jason Hall: Googler=false -> true
	Jean de Klerk: Googler=false -> true

	(It also caused many emails to be added, but I'm not considering
	those changes since they're not relevant to golang/go#27517 and
	aren't causing harm.)

All of the Github and Googler field changes are good,
but not all of the Gerrit field changes are good.
I've manually checked them against the
go-review.googlesource.com Gerrit server,
and classified them as follows:

	bad  Andrew Bonventre: Gerrit="andybons@golang.org" -> "365204+andybons@users.noreply.github.com"
	bad  Carl Mastrangelo: Gerrit="notcarl@google.com" -> "carl.mastrangelo@gmail.com"
	ok   Chris McGee: Gerrit="sirnewton_01@yahoo.ca" -> "newton688@gmail.com"
	bad  Eric Lagergren: Gerrit="ericscottlagergren@gmail.com" -> "eric@ericlagergren.com"
	bad  Filippo Valsorda: Gerrit="filippo@golang.org" -> "6195@62eb7196-b449-3ce5-99f1-c037f21e1705"
	bad  Guillaume J. Charmes: Gerrit="guillaume@charmes.net" -> "gcharmes@magicleap.com"
	bad  Harshavardhana: Gerrit="hrshvardhana@gmail.com" -> "harsha@minio.io"
	ok   Jean de Klerk: Gerrit="jadekler@gmail.com" -> "deklerk@google.com"
	bad  Joe Tsai: Gerrit="joetsai@google.com" -> "joetsai@digital-static.net"
	bad  Martin Möhrmann: Gerrit="moehrmann@google.com" -> "martisch@uos.de"
	bad  Matthew Dempsky: Gerrit="mdempsky@google.com" -> "matthew@dempsky.org"
	ok   Olivier Poitrey: Gerrit="rs@dailymotion.com" -> "rs@netflix.com"
	bad  Paul Jolly: Gerrit="paul@myitcv.org.uk" -> "paul@myitcv.io"
	bad  Ralph Corderoy: Gerrit="ralph@inputplus.co.uk" -> "ralph.corderoy@gmail.com"
	bad  Raul Silvera: Gerrit="rsilvera@google.com" -> "rauls5382@gmail.com"
	ok   Richard Miller: Gerrit="miller.research@gmail.com" -> "millerresearch@gmail.com"
	bad  Sebastien Binet: Gerrit="seb.binet@gmail.com" -> "binet@cern.ch"
	bad  Tobias Klauser: Gerrit="tobias.klauser@gmail.com" -> "tklauser@distanz.ch"
	bad  Vitor De Mario: Gerrit="vitordemario@gmail.com" -> "vitor.demario@mendelics.com.br"

I considered any @google.com -> non-@google.com changes as bad.
For the rest, it was based on which email was recognized by the
Gerrit server and had more activity overall, as well as recently.

This CL undoes all the bad Gerrit field changes, reverting them
to their original pre-CL 132995 values. It also changes the Gerrit
email for Gopherbot, and cleans up my own entry. That leaves just:

	Gerrit field changes:
	Chris McGee: Gerrit="sirnewton_01@yahoo.ca" -> "newton688@gmail.com"
	Jean de Klerk: Gerrit="jadekler@gmail.com" -> "deklerk@google.com"
	Olivier Poitrey: Gerrit="rs@dailymotion.com" -> "rs@netflix.com"
	Richard Miller: Gerrit="miller.research@gmail.com" -> "millerresearch@gmail.com"

In future CLs, we'll need to be careful with the order in which
emails are added, until golang/go#27631 is resolved.

Updates golang/go#27631.
Fixes golang/go#27517.

Change-Id: I6bd289af6ea2c50c293c4576de3873658994b98a
Reviewed-on: https://go-review.googlesource.com/135456
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-09-14 21:44:00 +00:00
Dmitri Shuralyov 431df8c332 cmd/gerritbot: update gerritChangeRE for new Gerrit output format
Gerrit has changed the format it uses for the Change URL in its output.
It used to be something like:

	remote: SUCCESS
	remote:
	remote: New Changes:
	remote:   https://go-review.googlesource.com/#/c/dl/+/134117 remove blank line from codereview.cfg

Now it is:

	remote: SUCCESS
	remote:
	remote: New Changes:
	remote:   https://go-review.googlesource.com/c/dl/+/134117 remove blank line from codereview.cfg

(The '#' path element in the Change URL is removed.)

Update the regexp to match, and add a test for it.

This fix will likely cause the previously unposted "This PR has been
imported to Gerrit for code review" comments to get posted during
next pull request activity, since they haven't already been.

Fixes golang/go#27561.
Updates golang/go#27504.

Change-Id: I37a75ddb8d879017ebd887c651ca74a6ad6b892d
Reviewed-on: https://go-review.googlesource.com/134175
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-09-10 20:54:19 +00:00
Dmitri Shuralyov a196f5a8e8 maintner/maintnerd, cmd/gerritbot, cmd/gitmirror: add golang/dl to whitelist
In golang/go#23223, we've created a new subrepository:

	https://go.googlesource.com/dl

Unlike other subrepositories, there isn't a mirror on GitHub yet:

	https://github.com/golang/dl (404 at this moment)

We want to include it in the whitelist for mirroring to GitHub,
including mirroring its pull requests to Gerrit. The motivation is to
make this subrepository consistent with all others and prevent people
from running into an unexpected situation when some repos are mirrored
but some aren't.

We don't actually expect much contribution activity to the dl subrepo,
because it's very narrow in scope and mostly generated code.

Updates golang/go#26949.

Change-Id: Id995bb3d97b8eb328e6c6bba6714bc74fbefb942
Reviewed-on: https://go-review.googlesource.com/133896
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-09-07 17:28:19 +00:00
Dmitri Shuralyov 9e0b3a09e0 app/appengine: hide and stop testing release-branch.go1.9
Per policy, we only support and test the past two releases
(currently Go 1.11 and Go 1.10).

Previously:

-	https://golang.org/cl/95555 removed Go 1.8.
-	https://golang.org/cl/77931 removed Go 1.7.
-	https://golang.org/cl/37466 removed Go 1.6.
-	https://golang.org/cl/31767 removed Go 1.5.
-	https://golang.org/cl/20843 removed Go 1.4.

Fixes golang/go#27541.

Change-Id: Ia42e9caae2bd6737ded22d871eeb24d00a06fa4a
Reviewed-on: https://go-review.googlesource.com/133895
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-09-06 20:14:24 +00:00
Dmitri Shuralyov c946330f10 dashboard: add aix-ppc64 builder
This is a starting point for adding an aix-ppc64 reverse builder.
There can be further adjustments made to it as needed.

Updates golang/go#27160.

Change-Id: I8a61adbe21f1a08265df9a206d94bb04e880a508
Reviewed-on: https://go-review.googlesource.com/131335
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-09-06 19:07:56 +00:00
Than McIntosh 51a99ec6a9 devapp/owners: add myself as reviewer for cmd/link, debug/dwarf
Change-Id: I57f81d556f5e4cea45d7291236f18e53420ada10
Reviewed-on: https://go-review.googlesource.com/133775
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-09-06 14:14:58 +00:00
Tobias Klauser 5dc26f454c devapp/owner: add tklauser to contacts for syscall, add entry for internal/syscall/unix
Change-Id: I2457324b5934771b109b6df4f67f8ac60daabfbc
Reviewed-on: https://go-review.googlesource.com/131515
Reviewed-by: Andrew Bonventre <andybons@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-09-06 08:21:05 +00:00
Filippo Valsorda e038c27d37 devapp/owners: assign x/crypto/ssh to @hanwen
Change-Id: I369650910df6a06c0998f0094841789c8ead6eec
Reviewed-on: https://go-review.googlesource.com/133615
Reviewed-by: Han-Wen Nienhuys <hanwen@google.com>
2018-09-06 07:56:09 +00:00
Brad Fitzpatrick 1329dced3a cmd/coordinator: delete some ancient, unused shutdown code
The coordinator used to run on GCE and for some reason (graceful
upgrades, freeing up memory leaks?), the process would exit after it
had been up for 10 minutes and had no work to do.

Delete that. We run on Kubernetes now and don't need graceful upgrades
and shouldn't be leaking resources. (If we do, we should be fixing
that instead.)

Also it appears that this code no longer does anything.

Change-Id: I9b5f2881692117b7c99dd2e513ee146f43170791
Reviewed-on: https://go-review.googlesource.com/132075
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2018-09-04 20:50:33 +00:00
Filippo Valsorda 60936c8225 devapp/owners: assign encoding/asn1 to filippo and agl (secondary)
Sigh.

Change-Id: I86f6611db2883d56d3dc903c92b03c3a319c1704
Reviewed-on: https://go-review.googlesource.com/133357
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-09-04 20:42:49 +00:00
Greg Steuck c2cb18f653 env/openbsd-amd64: use version 6.3, make disklabel readable
Updates golang/go#26833

Restrictive root umask prevented ftp running as unprivileged user from reading disklabel file.

Change-Id: I40b2d5b29881ea3733d245f7705cf33c73d4f7dd
GitHub-Last-Rev: 99fd276d45
GitHub-Pull-Request: golang/build#12
Reviewed-on: https://go-review.googlesource.com/133115
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-09-04 06:35:08 +00:00
Brad Fitzpatrick 2e0240947e cmd/gopherstats, internal/gophers: add more stats, more gophers
It's perf time at Google, so it's time to answer the ol' "What Would
You Say You Do Here?" question.

So, time to update gopherstats with more stats & update the gophers
package in the process.

Change-Id: I0e0981f40a1229f943130621bd55acedffc7a583
Reviewed-on: https://go-review.googlesource.com/132995
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-09-04 06:27:53 +00:00
Andrew Bonventre 952c4101bf cmd/gerritbot: autoassign reviewers on changes
Look for changes that haven’t had any human aside from the author
on them and assign reviewers/CCs based on entries in golang.org/s/owners.
If no owners can be found, the tag 'no-owners' is added to the
change to prevent gopherbot from making unneeded API calls.

Also updates gopherbot's Dockerfile to use 1.11 and update deps.

Change-Id: I2650a10dd324532d86bc902be419c5f29ae980db
Reviewed-on: https://go-review.googlesource.com/121018
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-09-03 22:18:01 +00:00
Kevin Burke 978be913b4 devapp/owners: add kevinburke
Change-Id: I3c158c332017997bb493b96086af65852aa422cb
Reviewed-on: https://go-review.googlesource.com/132415
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-08-31 18:18:11 +00:00
Andrew Bonventre 84ca227964 devapp: update contributor summit signup issue
Change-Id: Id19d7b8130ce89595c05231bbb3cf7d54b20edea
Reviewed-on: https://go-review.googlesource.com/132255
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-08-30 16:18:10 +00:00
Daniel Martí 6f834499dc devapp/owners: add myself to encoding/json
Done more stuff there recently and it needs attention, so it seems like
a right fit.

Change-Id: I6344ccc5da83c0cfecd7a7f2ecc1399497e0de03
Reviewed-on: https://go-review.googlesource.com/131285
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-08-27 03:47:02 +00:00
Katie Hockman d32424dc8b cmd/release: remove the tour from the releases
This removes the tour from the release binary for go1.12.x and later
releases, lowering the size of each release. It will now redirect to
tour.golang.org, unless the user runs "go get -u golang.org/x/tour" to
cache it locally, in which case the local copy will be preferred.

The release size was 170.0 MiB for go1.11rc1, this change reduces the
size by 6.3 MiB, a 3.7% reduction. After this change, and others which
reduced the release size, the release candidate is now 115.2 MiB.

Updates golang/go#27151

Change-Id: I6687c34f3d4ae161c5e6df1f7af8cf3adc016fc4
Reviewed-on: https://go-review.googlesource.com/131156
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-08-24 19:14:47 +00:00
Katie Hockman 2cb401a52b cmd/gopherbot: allow backporting to the upcoming Go release
This change gives gopherbot support to backport to the next major
release (current release + 1). Previously, attempting a backport to
a future release would create backports for the last two major
Go releases. These changes will not affected "please backport" comments
which do not indicate a backport number, as gopherbot should not open
an issue for the future release without being explicitly asked to do so.

Fixes golang/go#27040

Change-Id: I0096680c2ce2e164e6d80203bcf257dadaa97138
Reviewed-on: https://go-review.googlesource.com/131077
Reviewed-by: Filippo Valsorda <filippo@golang.org>
2018-08-23 21:00:43 +00:00
Katie Hockman 8dcad780e3 cmd/release: remove the blog from the releases
This removes the blog from the release binary, greatly lowering the size
of each release. It will now redirect to blog.golang.org, unless the user
runs "go get -u golang.org/x/blog" to cache it locally, in which case the
release-shipped godoc will prefer the local copy of the blog.

Currently, the blog is growing at ~2MB a year, thus including the blog in
every new go version release will continue to grow the releases over time.

The release size was 170MB for go1.11rc1, this change reduces the size
by 34MB, a 20% reduction.

Fixes golang/go#21917

Change-Id: I53bf0c416c2085da10b6bb70f8aa6cae8e826dc3
Reviewed-on: https://go-review.googlesource.com/130575
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-08-22 01:10:48 +00:00
Filippo Valsorda 92cee07cd2 vcs-test: fix deployment and systemd socket association
Quoting https://cloud.google.com/compute/docs/access/create-enable-service-accounts-for-instances
under "Best Practices":

> Grant the instance the https://www.googleapis.com/auth/cloud-platform
> scope to allow full access to all Google Cloud APIs, so that the IAM
> permissions of the instance are completely determined by the IAM roles
> of the service account.

Updates golang/go#27127

Change-Id: Icceb3b17a12223199efd67d27f6bca2b71f8fadc
Reviewed-on: https://go-review.googlesource.com/130475
Reviewed-by: Andrew Bonventre <andybons@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-08-21 20:12:44 +00:00
Filippo Valsorda 0cb088d564 vcs-test/vcweb: enable ACME ALPN challenge and use autocert RSA fallback
The SNI challenge is not supported by Let's Encrypt anymore, replaced by
the ALPN one, which requires an extra config entry.

Also, autocert now knows how to do RSA fallback, so remove that code.

Updates golang/go#27127

Change-Id: I45f907101a7c7a57d1a8376208dba4afb10ed6fd
Reviewed-on: https://go-review.googlesource.com/130418
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-08-21 20:12:12 +00:00
Dmitri Shuralyov 08651b16af dashboard: bump plan9-386-v5 image to v6
plan9-386-v6 is a new plan9-386 image built with the change
done in CL 129098.

I tested it with cmd/debugnewvm on latest Go master commit,
and all stdlib tests passed, including TestVariousDeadlines.
(cmd/... tests didn't finish in time before cmd/debugnewvm
timed out.) Running it 3 more times, there was still one
TestVariousDeadlines failure and 2 successes, so we'll have
to keep watching it.

Updates golang/go#26945.

Change-Id: Ibd1e990e60c3a69a5fddede18d7a121fa319e79d
Reviewed-on: https://go-review.googlesource.com/130137
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-08-21 20:00:03 +00:00
David du Colombier e2a0be45fa env: disable aux/timesync in Plan 9 image
TestVariousDeadlines is regularly failing on
the plan9/386 builder running on GCE.

Richard Miller suspects that the failure
may be related to an issue in time measurement,
due to the clock going backward and forward.

A work around would be to disable auth/timesync
to prevent prevent the time from jumping around.

This changes fixes the Plan 9 image by disabling
aux/timesync before starting the buildlet.

Fixes golang/go#26945.

Change-Id: Ibe80cdcd1360cd9e40da70c2c454b6ba2eb44ce9
Reviewed-on: https://go-review.googlesource.com/129098
Reviewed-by: Richard Miller <millerresearch@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-08-21 19:56:29 +00:00
Brad Fitzpatrick 403c55142e buildenv: diagnose authentication problems in more places
Check when getting an oauth2.TokenSource, and when using it.

Change-Id: I1b240e5eafc23202d7d22d74d3f5cf9a59ca292e
Reviewed-on: https://go-review.googlesource.com/130315
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2018-08-21 03:24:00 +00:00
Brad Fitzpatrick f7da0f8f06 all: warn if user hasn't run gcloud auth application-default login
"gcloud auth application-default login" is NOT the same as
"gcloud auth login"

... which is super confusing.

Add a check for users.

We should probably add this in more places over time. Baby steps.

Change-Id: I4584f5b84b941fa6893eccd09fd61e8850538607
Reviewed-on: https://go-review.googlesource.com/130195
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2018-08-21 02:14:17 +00:00
Dmitri Shuralyov e3fe1605c3 internal/gophers: update Dmitri Shuralyov's emails
Add my @golang.org email.

Change-Id: Icb0fd9447e20e454a885a5fb19ad61733ae68f46
Reviewed-on: https://go-review.googlesource.com/129996
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-08-20 19:17:41 +00:00
Dmitri Shuralyov 558b07b93c env/plan9-386: add missing command in README
The ./make.bash command to create the image was missing, making the
text hard to understand.

Also modify the gcloud compute command example to use plan9-386-v6
as the VM image name, so that the example below makes more sense:

> Then update x/build/dashboard/builders.go with the new image version
> (e.g. "plan9-386-v5" to "plan9-386-v6").

Change-Id: I8c00ce4f255cb2dbff090539b3aafc99ffba2c4b
Reviewed-on: https://go-review.googlesource.com/129995
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-08-20 19:13:19 +00:00
Brad Fitzpatrick 5e1479f69a cmd/release: remove go/pkg/${GOOS}_${GOARCH}/cmd from releases
This saves a bunch of space, and users don't typically rebuild
cmd/compile, cmd/link, etc. If they want to, they still can, but
they'll have to pay the cost of rebuilding dependent libaries. No need
to ship them just in case.

On linux-amd64, this reduces the tar.gz size from 177,294,517 to
156,487,264 bytes, a 19.8 MiB, 12% reduction.

Change-Id: I784dcf2c6f15f8eee8b9eaa501a8d982b2627288
Reviewed-on: https://go-review.googlesource.com/129955
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-08-20 17:55:46 +00:00
Brad Fitzpatrick a57116b231 cmd/gopherbot: add task to remove "wait-release" from CLs for tree opening
Only runs manually. We can run this whenever the tree reopens.

Change-Id: I003a8b69fd212ec3040a26855796ba997f1a5943
Reviewed-on: https://go-review.googlesource.com/129817
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-08-20 17:00:42 +00:00
Brad Fitzpatrick a7c2d27481 env/plan9-386: remove docs on using make-basepin
The coordinator does it automatically these days.

Mention debugnewvm instead.

Change-Id: Ia3831ada77a89b1c763bc52a7723e586b7c7c024
Reviewed-on: https://go-review.googlesource.com/129915
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-08-20 16:58:51 +00:00
He Liu ef878539c7 cmd/gopherbot, cmd/gopherstats: update the use of github api
To integrate with go-github api changes that breaks the compiling:

- https://github.com/google/go-github/pull/910
- https://github.com/google/go-github/pull/972

Change-Id: I5597f50b9c44fe42acec1128617a25e1fdd09e10
GitHub-Last-Rev: 07754f92aa
GitHub-Pull-Request: golang/build#11
Reviewed-on: https://go-review.googlesource.com/129075
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2018-08-17 02:02:47 +00:00
Brad Fitzpatrick 5524b9ef25 all: stop using service accounts, prefer user creds
It's better to authenticate with an identity (e.g. foo@google.com),
rather than all of us copy/pasting a service account JSON (a glorified
access token) around and the server not knowing who's who.

I was previously misled into using service accounts because the gcloud
tool (when run on a GCE VM) strongly urges you not to use user
accounts and says you should be using service accounts instead. But
turns out that's because it assumes you'd never use GCE for
development and only for deployment. That is, gcloud assumes you'd
only use gcloud on desktop/laptop, and then deploy your binary to GCE
where the application itself would use service accounts. (We do use
service accounts for the application, but I also develop on a GCE VM.)

Also, the precursor helper function to FindDefaultCredentials (for
"Application Default Credentials") had a different search order for
credentials and prefered the GCE VM's service account instead of the
user-specific credentials. Now that FindDefaultCredentials uses a good
order we can remove some of our old complexity.

Change-Id: Ia888e264cfb88e977f3ff1a3a4bb583db70466ab
Reviewed-on: https://go-review.googlesource.com/129416
Reviewed-by: Andrew Bonventre <andybons@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
2018-08-15 17:50:03 +00:00
Dmitri Shuralyov 176bdadd9d cmd/buildlet: use a high ssh port on Linux when running under COS
When running in GCE's Container-Optimized OS (COS), we can't use
port 22, as the system's sshd is already using it. Our container
runs in the system network namespace, not isolated as is typical
in Docker or Kubernetes. So use port 2200 instead.

Remove an unnecessary type conversion.

Updates golang/go#26969.

Change-Id: Ic85e1f14529175106b9c7397186d3e9b5cb39c1c
Reviewed-on: https://go-review.googlesource.com/129356
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-08-14 22:14:26 +00:00
Filippo Valsorda b5f04f91c8 cmd/releasebot: add support for release candidates
Change-Id: If6553fa2b3f4a60f409186720f961f8eba4b7376
Reviewed-on: https://go-review.googlesource.com/129235
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-08-14 17:56:38 +00:00
Dmitri Shuralyov 405d638abf devapp, cmd/gopherbot: increase RAM in k8s config
Empirically, the maintner client uses just under 2 GB RAM while running.
However, during a maintner.ErrSplit situation, the RAM need spikes
beyond 2 GB, causing the apps to crash due to a hard limit of 2 GB RAM.
Increasing it to 4 GB should let them run crash-free during net splits.

Change-Id: I79deec74c0ddac4afb9e2ffb2ab19747a06bd53a
Reviewed-on: https://go-review.googlesource.com/128361
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-08-13 16:56:14 +00:00
Bryan C. Mills 69da2ad2cb cmd/buildlet/stage0: fix vet formatting warnings
Change-Id: I632036f04924b0b1d2211bda1dd7741f3cf225e1
Reviewed-on: https://go-review.googlesource.com/128635
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
2018-08-09 14:42:42 +00:00
Bryan C. Mills 0e768f6406 all: add module definitions
I computed these using a build of the Go toolchain from a working copy at
https://golang.org/cl/128136, patchset 12.

The versions selected by 'go mod tidy' needed two tweaks to pass tests:
go get golang.org/x/text@master
go get github.com/russross/blackfriday@v1

The x/text version bump is because the last tagged version (v0.3.0) is very old
(last December).

The blackfriday bump is because the repository made a breaking change (v2.0.0)
without changing the import path.

With those changes, 'go test ./...' passes at the repo root.
('go test all' fails, possibly due to golang/go#26279.)

Updates golang/go#26279.
Updates golang/go#26872.

Change-Id: Ieac5327e4bddd2b78b981d7683beb98608708a3a
Reviewed-on: https://go-review.googlesource.com/128636
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-08-08 17:55:57 +00:00
Brad Fitzpatrick 843fd8823c cmd/xb: handle case where kubectl doesn't have a current-context
Change-Id: I8bad43c80458c4c85e8ca61a162e04b04312750f
Reviewed-on: https://go-review.googlesource.com/128335
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2018-08-07 22:15:32 +00:00
Dmitri Shuralyov e7a2a012f3 maintner: deduplicate issue references in parseGithubRefs
When parsing commit messages for references to GitHub issues,
parseGithubRefs used to add entries to GerritCL.GitHubIssueRefs
slice whenever there was a reference, even if that reference has
already appeared before.

The GitHubIssueRef type only contains minimal information about
a reference: the repository and the issue number. As a result,
there is very little to gain from tracking multiple references
separately. Most users of the API would likely prefer a list
of unique issue references than the raw list. So, change it to
return unique issue references only, and document that.

If in the future there is a need to track issue references
at a more granular level, where it matters whether there was
one or multiple references, the API can be revisited then.

Fixes golang/go#26113.

Change-Id: Ib51372736bcf49e3eae4cf111d0258733c742e61
Reviewed-on: https://go-review.googlesource.com/128119
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-08-07 00:39:16 +00:00
Dmitri Shuralyov dcbfa19f24 maintner: propagate and use internal invariants in finishProcessingCL
This change simplifies and cleans up finishProcessingCL. It documents
a precondition for finishProcessingCL that cl.Meta must be non-nil.

finishProcessingCL is only ever called on CLs that have been noted as
dirty via noteDirtyCL, and CLs are always given a non-nil Meta before
noteDirtyCL is called on them.

foreachCommitParent sounded like it called f on all parents of commit,
not including commit itself. In reality, it called f on commit as well.
Rename it to foreachCommit and improve its documentation to make this
more visible.

As a result, it becomes more clear that cl.Metas will contain at least
one element (e.g., at least mostRecentMetaCommit). Then, cl.Metas[0]
can be used to find the CL creation time.

Also change foreachCommit to return an error if a parent commit isn't
found. Otherwise, we'd be cutting the history walk short and the caller
wouldn't know. This shouldn't happen, but if it does, it'll be logged
(by finishProcessingCL).

Define a CL to be complete if its Meta and Commit fields are non-nil,
and the Metas slice contains at least 1 element. Use this to simplify
OwnerName and OwnerID methods and remove the no longer needed
firstMetaCommit method.

Finally, use the simplified finishProcessingCL to set cl.Created to
the actual creation time of the CL (rather than "last updated" time).
It's easy now, because we can deduce that len(cl.Metas) >= 1 is
guaranteed to be true, and therefore cl.Metas[0] will not panic.
There's no need to add guards or think about what to do if cl.Metas
is empty.

Document GerritCL.Created field, since it's exported.

Background

This change was started with the goal of fixing golang/go#24744.
It was hard to fix that bug with a short diff, because there were
too few guarantees inside finishProcessingCL that could be relied on.
I wanted to improve that as part of my fix.

We already established some guarantees for the user-facing CLs (i.e.,
that their Commit, Meta fields are non-nil and len(cl.Metas) >= 1).
I started propagating and using that property in a few more places
in internal code.

It allowed simplifications such as:

	 // OwnerName returns the name of the CL’s owner or an empty string on error.
	 func (cl *GerritCL) OwnerName() string {
	-	m := cl.firstMetaCommit()
	-	if m == nil {
	-		return ""
	-	}
	-	return m.Author.Name()
	+	if !cl.complete() {
	+		return ""
	+	}
	+	return cl.Metas[0].Commit.Author.Name()
	 }
	-
	-func (cl *GerritCL) firstMetaCommit() *GitCommit {
	-	m := cl.Meta
	-	if m == nil { // TODO: Can this actually happen, besides in one of the contrived tests? Remove?
	-		return nil
	-	}
	-	c := m.Commit
	-	for c != nil && len(c.Parents) > 0 {
	-		c = c.Parents[0] // Meta commits don’t have more than one parent.
	-	}
	-	return c
	-}

	 // complete reports whether cl is complete.
	 // A CL is considered complete if its Meta and Commit fields are non-nil,
	 // and the Metas slice contains at least 1 element.
	 func (cl *GerritCL) complete() bool {
	 	return cl.Meta != nil &&
	 		len(cl.Metas) >= 1 &&
	 		cl.Commit != nil
	 }

Also, previously, it was hard to be sure that the
gc, ok := ... line wouldn't panic:

	// called with Corpus.mu Locked
	func (gp *GerritProject) finishProcessingCL(cl *GerritCL) {

		// What happens if cl.Meta is nil?
		// Should there be a if cl.Meta == nil guard here?
		// What should it do if cl.Meta is indeed nil?
		gc, ok := c.gitCommit[cl.Meta.Commit.Hash]
		if !ok {
			log.Printf("WARNING: GerritProject(%q).finishProcessingCL failed to find CL %v hash %s",
				gp.ServerSlashProject(), cl.Number, cl.Meta.Commit.Hash)
			return
		}

By documenting that cl.Meta must be non-nil as a precondition of
finishProcessingCL, it became possible to know it won't panic:

	// finishProcessingCL fixes up invariants before the cl can be returned back to the user.
	// cl.Meta must be non-nil.
	//
	// called with Corpus.mu Locked
	func (gp *GerritProject) finishProcessingCL(cl *GerritCL) {

		// cl.Meta can't be nil due to precondition.
		gc, ok := c.gitCommit[cl.Meta.Commit.Hash]
		if !ok {
			log.Printf("WARNING: GerritProject(%q).finishProcessingCL failed to find CL %v hash %s",
				gp.ServerSlashProject(), cl.Number, cl.Meta.Commit.Hash)
			return
		}

(It would be a bug to call finishProcessingCL with a cl where
cl.Meta is nil, because it'd be violating the precondition.)

I think stating preconditions and propagating more internal invariants
is a good general direction, because it allows the code to be simpler
and easier to verify as being correct. Otherwise, one needs to keep
checking if fields are non-nil everywhere before using them and think
what to do if they are nil, and that's unpleasant.

Fixes golang/go#24744.

Change-Id: I07e362d52e30089a9ba03c30b04ad19b2c385722
Reviewed-on: https://go-review.googlesource.com/111877
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-08-06 16:50:14 +00:00
Kevin Burke 4639cd3919 cmd/racebuild: fix errors reported by go vet
Change-Id: I79b07beeb284386b1683cfb22f283b18caaee0ce
Reviewed-on: https://go-review.googlesource.com/127919
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-08-04 19:33:28 +00:00
Daniel Theophanes c1b72a71f2 gerrit: allow setAuth to fallthrough to netrc lookup
When git has no http cookies, the request for http cookies
will fail because git will exit(1). Ignore this failure
because the output is properly tested either way. This allows
authentication to fallthrough to the netrc lookup.

Correct the netrc lookup under windows. git reads the netrc
file as "_netrc" in the users home directory.

Add a warning at the end of the function that no authentication
was set.

Fixes golang/go#26782

Change-Id: I0ba94ff7fa4b6038d6117156dcc729ddf4616fdc
Reviewed-on: https://go-review.googlesource.com/127855
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-08-03 18:56:37 +00:00
Andrew Bonventre 24a3043779 maintner/maintnerd: increase RAM in k8s config
Change-Id: Iae6d90aa6692d4eaf247bde6834115d1b21ba514
Reviewed-on: https://go-review.googlesource.com/127677
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-08-02 22:18:53 +00:00
Andrew Bonventre 018bec1401 cmd/gerritbot: up RAM limits in k8s config
Change-Id: I0939e245f8dd2573e099491e0e014dc8571b6ebe
Reviewed-on: https://go-review.googlesource.com/127676
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-08-02 22:03:54 +00:00
Brad Fitzpatrick 6ab2be55de dashboard: test sub-repositories on s390x
Fixes golang/go#26131

Change-Id: I07e84c255a158b843168612cc3dad7688343ffb7
Reviewed-on: https://go-review.googlesource.com/127375
Reviewed-by: Michael Munday <mike.munday@ibm.com>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-08-02 22:02:28 +00:00
Andrew Bonventre 1fadf6bf5a devapp: check for error from s.initCorpus
Also remove superfluous newlines from log strings.

Change-Id: I2e0fb408f40e47af3f6ea5149113722b3e1db114
Reviewed-on: https://go-review.googlesource.com/127675
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2018-08-02 21:57:06 +00:00
Brad Fitzpatrick ec760fd405 cmd/gitmirror: update docs
Change-Id: If8b2dbde8001f6b89af52b34785bd894a6454e35
Reviewed-on: https://go-review.googlesource.com/127315
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-08-01 19:43:13 +00:00
Brad Fitzpatrick 0d762918c5 cmd/gitmirror: bump resources
Change-Id: I634ffe2a7844a27e88bb958fa20836eaf500e915
Reviewed-on: https://go-review.googlesource.com/127316
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-08-01 19:32:51 +00:00
Andrew Bonventre a697e2c998 devapp: add healthz endpoint and configure k8s readiness probe
This will allow for zero-downtime deployments, which will be
important for when services start relying on the /owners endpoint.

Change-Id: I4671dbbbf473ba07dbab585222d12832c3193fac
Reviewed-on: https://go-review.googlesource.com/127036
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-08-01 18:15:17 +00:00