Replace our current builder pattern (Dockerfile.0) in favor
of multi-stage builds. This simplifies maintenance by not
having builder artifacts exist outside of the image, reducing
the number of files to maintain and steps to take in the Makefile.
Change-Id: I5c90acc3ed4a302bd8d0850ed0ffe243c07a6c08
Reviewed-on: https://go-review.googlesource.com/99557
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Allow any origin to make cross-origin requests to get builder
statuses.
Also fixes a bug with an ineffectual Header().Set(...) call since
WriteHeader was called before it.
Change-Id: Ic2867624a286dad7268ddb94c3bb5afb52bf84ac
Reviewed-on: https://go-review.googlesource.com/98995
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Pull requests are now in the maintner corpus via *maintner.GitHubIssue.
We don't want to count them as issues, since they're not issues in a
strict sense.
Follows https://golang.org/cl/69590
and ecd998cade.
Change-Id: Ia89e89e263626e661633f888c24070073f6fe567
Reviewed-on: https://go-review.googlesource.com/97797
Run-TryBot: Dmitri Shuralyov <dmitri@shuralyov.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This reverts the status changes to devapp from CL 96416
This will go into its own server instead.
Updates golang/go#21315
Updates golang/go#22603
Change-Id: Icb17a5915124241b2ef97a1ee2e9a0e4298784ce
Reviewed-on: https://go-review.googlesource.com/97516
Reviewed-by: Andrew Bonventre <andybons@golang.org>
Instead of checking only against the last revision of a GitHub PR,
check to see if the Gerrit commit message matches that of the one
determined by the PR, which is the source of truth due to
GerritBot’s one-way nature.
Also deletes some dead code and adds a dry-run flag.
Fixesgolang/go#23756
Change-Id: Ib2f93ebaf3f6af274f62d0e6b1e8bcab89fb7109
Reviewed-on: https://go-review.googlesource.com/96999
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
The message generated by the commitMessage method
does not always match the one that Gerrit sees.
This is because the commit-msg hook runs git stripspace
and has different logic for placing the Change-Id.
Remove the commit-msg hook and insert a Change-Id
(a SHA-1 hash preceded with an I) using the Pull
Request’s ID and run git stripspace on the generated
commit message.
This is preparation for updating the Gerrit CL once
the title or description changes.
Also updates Dockerfile.0 to use 1.10 and disable
cgo so that building doesn’t emit errors.
Updates golang/go#23756
Change-Id: Ib437d3e9c1496ad1bee6268afcbe7c766eb82bde
Reviewed-on: https://go-review.googlesource.com/96995
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
GitHub has docs on valid values. On many repos in the
GoogleCloudPlatform org, I observed that this field is indeed a string.
Change-Id: I19fd4871f741c6e44968ec7a2dda9f1ef93ae128
Reviewed-on: https://go-review.googlesource.com/96835
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Also bump Go from 1.8 to 1.10, and change how the static binary is
built to avoid warnings during link.
Updates golang/go#21315
Updates golang/go#22603
Change-Id: I426491d48f787a77cb3eea4dff4d11f474236548
Reviewed-on: https://go-review.googlesource.com/96416
Reviewed-by: Andrew Bonventre <andybons@golang.org>
A query '/imfeelinghelpful?pkg=net,cmd/go' only redirects to random
issues with the prefix 'net' or 'cmd/go'. This allows individuals to
browse random issues for packages they have specialized in.
Fixesgolang/go#20955
Change-Id: I786975fc9f6ea87269176039a3e9233a3500cf06
Reviewed-on: https://go-review.googlesource.com/95275
Reviewed-by: Andrew Bonventre <andybons@golang.org>
If an error were to occur in corpusUpdateLoop's call of
initCorpus, b.corpus would have been nil after the continue,
causing a nil pointer dereference.
Change-Id: I0257fca95141eb9e9c1a48466f5d95df87ad5e76
Reviewed-on: https://go-review.googlesource.com/96200
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
As lint is moving to Gerrit for its source of truth, add it to the
appropriate whitelists.
Change-Id: I4ce4d9eb6ebd9dbe847a83030c71c38103116bc3
Reviewed-on: https://go-review.googlesource.com/96035
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
gopherbot was setting vgo stuff to Unreleased, and then to vgo.
Change-Id: Ic97aaccf6d4db998dbb659455798b98a551714b6
Reviewed-on: https://go-review.googlesource.com/95584
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
If the Change-Id is not present in the footer section of the
git commit, then Gerrit will complain.
Fixesgolang/go#23931
Change-Id: I0d6a435d489218c465fc90c3c79151f56254e915
Reviewed-on: https://go-review.googlesource.com/95636
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Go 1.11 will not support Windows XP, as pre-announced (per policy) at
https://golang.org/doc/go1.10#ports which says:
Go 1.10 is the last release that will run on Windows XP or Windows
Vista. Go 1.11 will require Windows 7 or later.
It was fun while it lasted.
Fixesgolang/go#10267
Change-Id: I1929088be00c938621cc106acdb276ffcb93c8cc
Reviewed-on: https://go-review.googlesource.com/95576
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
No particular reason, other than using the latests to find any bugs.
And Go 1.8 is no longer supported. I guess we skipped Go 1.9.
Change-Id: I9a342c226ae53c7cc28a4b8e75b8d8e7834da917
Reviewed-on: https://go-review.googlesource.com/95575
Reviewed-by: Andrew Bonventre <andybons@golang.org>
Previously, it would reset commits based on the number reported
by GitHub. This would cause issues if there was a merge commit
due to them having more than one parent. So GitHub would report
three commits, but one of them was a merge commit so the number
would be off and it would push the wrong change.
Change-Id: I1d16c7cabdb96c9cef45ce0b802c1c5abd12e2de
Reviewed-on: https://go-review.googlesource.com/94636
Reviewed-by: Jonathan Nieder <jrn@google.com>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
Previous versions were available via GerritProject.remote, but that
symbol is not exported and can't be used by callers of this package.
Update test for go-github API change in google/go-github#816, so the
tests can pass locally. Since go-github isn't vendored, it's understood
that the latest upstream version is targeted.
Change-Id: Ib4b78abacb19d73f95df2215b4a248a24376ae10
Reviewed-on: https://go-review.googlesource.com/95136
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
git-codereview will complain otherwise (plus it should be properly
formatted)
Change-Id: I9fa4ebec347f39a0a6ed0d79ddf369a9bcecd868
Reviewed-on: https://go-review.googlesource.com/94716
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Then use it from gitmirror and maintnerd.
Updates golang/go#23853
Change-Id: I8112f004638667894676c04fa218a7ced10422ac
Reviewed-on: https://go-review.googlesource.com/94836
Reviewed-by: Andrew Bonventre <andybons@golang.org>
These gitlock dep updates were supposed to be part of https://golang.org/cl/93755
It doesn't build otherwise, as other stuff in x/build/* required new
GitHub API symbols, even if this CL doesn't end up calling them.
Change-Id: Icc202f3bab85b38fd1182aaa97e81f74b90e3b0f
Reviewed-on: https://go-review.googlesource.com/94435
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
GerritBot retrieves all open PRs each time the maintner corpus
is updated since maintner doesn’t support PRs yet and some
additional info is needed from GitHub (the PR branch’s HEAD
SHA value in particular).
Currently the GitHub client doesn’t take advantage of conditional
requests, which causes us to needlessly take a hit in our API
quota, counting against all maintner users.
Use the returned Etag response header to make conditional requests
for PRs so that they don’t count against our rate limit unless
a change to the PR has been observed.
Change-Id: Ie984e94cc7cc4d254cbd7c7f4e92ca3f5bf688ba
Reviewed-on: https://go-review.googlesource.com/93835
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
If the PR branch gets out of date with origin/master, then the
current method of checking out a branch to track origin/master
and then merging in the changes will have unintended side effects
of including all changes since the PR branch became out of date.
Check out a branch tracking FETCH_HEAD after fetching the pull/N/head
github magic ref and perform the necessary incantations from there.
Change-Id: Ic771b9202714b975469fa956a926a64758ef54d1
Reviewed-on: https://go-review.googlesource.com/93516
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Use maintner as a fast-path to determine whether comments are
duplicates or not.
Update golang/go#18517
Change-Id: I3ddc380e6e202371903ce62ae9e4c07e9805c1ed
Reviewed-on: https://go-review.googlesource.com/93435
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>