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

149 Коммитов

Автор SHA1 Сообщение Дата
Dmitri Shuralyov 3848b4733c maintner: set GitHubComment.Updated to UTC when cmut.Updated is non-nil
This change fixes a copy-paste mistake from CL 38137, where the wrong
time variable was set to UTC when cmut.Updated is non-nil.

Change-Id: I4dc62abf9b70b52b700e3b6b688fa8adbc502d98
Reviewed-on: https://go-review.googlesource.com/111645
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-05-06 15:32:44 +00:00
Chris Broadfoot b360853c44 maintner: add support for team assignment
GitHub reviews can be assigned to teams.

Change-Id: I675944c40619635e554d083cfa4fd6e332315f9b
Reviewed-on: https://go-review.googlesource.com/101955
Reviewed-by: Chris Broadfoot <cbro@golang.org>
2018-05-01 20:13:38 +00:00
Filippo Valsorda 86f50f009a all: replace "gcloud docker" with "docker"
From the "gcloud docker" output:

WARNING: `gcloud docker` will not be supported for Docker client
versions above 18.03. Please use `gcloud auth configure-docker` to
configure `docker` to use `gcloud` as a credential helper, then use
`docker` as you would for non-GCR registries.

Not adding "gcloud auth configure-docker" to the Makefiles as it spams
and there are implicit required authentication steps already anyway.

Change-Id: I5bd1177e82d30a6590126a307bee01d0acee9d6a
Reviewed-on: https://go-review.googlesource.com/108560
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-04-20 23:51:18 +00:00
Brad Fitzpatrick dd35151f24 maintner: track hashtag edits on GerritMeta, make HashtagEdits method faster
Updates golang/go#24836

Change-Id: I75cae7de574af7525964bdf420328d3e553a044c
Reviewed-on: https://go-review.googlesource.com/107305
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-04-17 02:28:26 +00:00
Brad Fitzpatrick 0b261d0443 maintner: add hashtag mutation accessors on GerritMeta
Updates golang/go#24836

Change-Id: Id529f12dba54366d49feb112662473ca214ba2f6
Reviewed-on: https://go-review.googlesource.com/107297
Reviewed-by: Chris Broadfoot <cbro@golang.org>
2018-04-16 21:12:23 +00:00
Kevin Burke 4213dcbc0a cmd/gitmirror, cmd/gopherbot, maintner/maintnerd: fix Docker build
The Docker build didn't have the x/time/rate dependency. Also run Go
1.10 instead of Go 1.8.

Verified that this works by building the Dockerfile locally.

Change-Id: Id55bbb3e8cb81ba112351d4558a318939c22d8a5
Reviewed-on: https://go-review.googlesource.com/106985
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-04-16 16:49:00 +00:00
Brad Fitzpatrick ce9aca4b8e maintner: change type/name of GerritCL meta fields, ensure Meta always non-nil
They were of type GitCommit, but we want to hang the useful methods
off the existing GerritMeta wrapper.

This was the plan earlier (when the GerritMeta type was added), but
that earlier CL didn't go all the way and convert callers.

This will likely break some maintner-using code, but there aren't many
callers.

Also, document & enforce that Meta & Commit are always non-nil when
enumerating CLs and when looking up CLs. Previously, two deleted CLs
didn't have this property, as the Gerrit server was returning a ref
for a version of the commit, but no meta ref. Filter those out.

Fixes golang/go#22060
Fixes golang/go#21984

Change-Id: I67727977c7a25e750f51a6ff7f3e00aaf960ef9f
Reviewed-on: https://go-review.googlesource.com/107296
Reviewed-by: Dmitri Shuralyov <dmitri@shuralyov.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-04-15 21:06:32 +00:00
Chris Broadfoot f744882202 maintner: add option for GitHub rate limiting (10 qps by default)
GitHub gets upset when you send it too many requests. We do have some
backoff, but it's handled per-repo, rather than across all GitHub
requests. This adds a global GitHub limiter to add more control.

Change-Id: I42898d25cf66a93970d96e922743b766f9a21c3f
Reviewed-on: https://go-review.googlesource.com/101919
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-04-11 21:14:27 +00:00
Dmitri Shuralyov 5e2fb0da4c maintner/cmd/maintserve: update .woff2 MIME type to "font/woff2"
Since February 2017, the proper MIME type is "font/woff" for WOFF 1.0 and
"font/woff2" for WOFF 2.0. Prior to February 2017, the standard MIME type
for WOFF 1.0 was "application/font-woff", but it is now deprecated.

References:

-	https://www.iana.org/assignments/media-types/media-types.xhtml
-	https://tools.ietf.org/html/rfc8081

Change-Id: I8d5c04a9f74a2647197179fde4865b3db2d99708
Reviewed-on: https://go-review.googlesource.com/100435
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-03-13 20:21:28 +00:00
Dmitri Shuralyov 13b1c06671 maintner/cmd/maintserve: don't count PRs as issues
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>
2018-03-01 00:32:11 +00:00
Chris Broadfoot 34b4188793 maintner: update DismissedReviewEvent "state" field from int to string
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>
2018-02-23 22:17:11 +00:00
Andrew Bonventre 0389b41937 maintner,cmd/gerritbot,cmd/gitmirror: add golang/lint to whitelist
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>
2018-02-21 21:53:32 +00:00
Andrew Bonventre 40943d646d maintnerd,cmd/gerritbot: add golang/vgo to whitelists
Change-Id: I30e0a6ec666a06eae3e8444490d96fabcab3333e
Reviewed-on: https://go-review.googlesource.com/95515
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-02-20 18:59:13 +00:00
Dmitri Shuralyov 398adf893f maintner: add GerritCL.CommitAtVersion method
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>
2018-02-19 17:27:22 +00:00
Brad Fitzpatrick 629ea14e94 internal/gitauth: new package to write out git cookies file
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>
2018-02-16 15:58:06 +00:00
Brad Fitzpatrick b6e015da0e maintner/maintnerd: fix use of tini
Updates golang/go#23705

Change-Id: Ia66e3c16bda3357daf4796f3eafb50b2eb019223
Reviewed-on: https://go-review.googlesource.com/93082
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-02-09 19:48:01 +00:00
Brad Fitzpatrick 3e2c190e9c maintner/maintnerd: wrap maintnerd in tini init process to reap zombies
Updates golang/go#23705

Change-Id: If0e7826ab75aae46dc7b79306d36d6cd3f07a041
Reviewed-on: https://go-review.googlesource.com/93077
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-02-09 19:27:28 +00:00
Andrew Bonventre 2cb4072a4a maintner/maintnerd: add additional GitHub projects to "go" config
Update golang/go#18517

Change-Id: Icdc131236092f15c51effafa71329e280979a0ef
Reviewed-on: https://go-review.googlesource.com/93135
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-02-09 19:12:03 +00:00
Brad Fitzpatrick c4be133125 cmd/pubsubhelper, maintner/maintnerd: enable HTTP ACME challenges
Updates golang/go#23627

Change-Id: Iaf24b403e12266e7c426bf6311b7f20f9cc6df83
Reviewed-on: https://go-review.googlesource.com/90915
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-01-31 17:25:53 +00:00
Andrew Bonventre 7dd1e7da00 maintner,cmd/gerritbot: post to GitHub when new Gerrit comments are made
Adds an Owner() method to GerritCL that returns the GitPerson author of
the Gerrit change’s first commit, which is how Gerrit assigns the owner.

Updates golang/go#18517

Change-Id: I27cf185d5c68db44732170d583f1851491f2d8a3
Reviewed-on: https://go-review.googlesource.com/87157
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-01-11 14:54:48 +00:00
Kevin Burke 125f04e1fc maintner: add 3 new fields to GithubIssueEvent
GithubIssueEvent added three new fields: Requested Reviewer, Review
Requester, and Dismissed Review. Parse these fields from the API JSON
and also handle them in the Protobuf file.

Fixes golang/go#23151.

Change-Id: I07f2004f300223045636c3e32027468b29dd6329
Reviewed-on: https://go-review.googlesource.com/84375
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-12-20 02:53:21 +00:00
Kevin Burke 3f648ee4ce maintner: add examples
Demonstrate how to load data from a network source and how to load
data from a local disk source.

Change-Id: I1710eca8a1b3be7b7f7458de6aa5d3372934450a
Reviewed-on: https://go-review.googlesource.com/84377
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-12-19 22:08:30 +00:00
Brad Fitzpatrick fd5ece6d24 maintner: account for CLs changing branches
Fixes golang/go#23007

Change-Id: I1e791d1a96033e77edf077909c2a20afaea511c3
Reviewed-on: https://go-review.googlesource.com/83635
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2017-12-13 02:53:10 +00:00
Andrew Bonventre 92d565a7cf devapp,maintner: use ID instead of text for HelpWanted label
Add *GitHubIssue.HasLabelID method to maintner API.

Since the text will change to “help wanted”, adjust the logic to
make it a bit more future-proof.

Updates golang/go#22329

Change-Id: I22e9f06d6e2aca8ae4da31532f9cde2317a709ff
Reviewed-on: https://go-review.googlesource.com/83297
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-12-11 19:26:47 +00:00
Kevin Burke ef994b999e maintner: update Dockerfile deps
Currently the Dockerfile fails to build because maintner calls
github.Issue.IsPullRequest(), which was only added recently.

I'm not sure if we only want to update one dep (or if there is a way
to) or update all of them but this updates all of them.

Change-Id: I224074770512acfffbe18c8860a6361a5e78b2ff
Reviewed-on: https://go-review.googlesource.com/80475
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-11-29 04:02:48 +00:00
Kevin Burke c3ffc0d35c maintner/godata: skip tests in short mode
We shouldn't try to download the entire golang/go corpus on CI/build
machines, it's too slow and can OOM smaller CI machines. See
https://travis-ci.org/kevinburke/build/jobs/308673490 for an example.

Change-Id: I77b2a2162f8ce5bfbd3d7435122b6640c5d840b0
Reviewed-on: https://go-review.googlesource.com/80395
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-11-28 22:17:12 +00:00
Brad Fitzpatrick 26626971b6 maintner: misc fixes and tests
As far as I can tell, the data structure inconsistency check that
panic-failed earlier has been fixed by the last few CLs (the
"finishProcessing" ones). The new tests double check.

Also, fix up Footer to not allocate by changing the requirement of its
argument.

And fix a failing test that was crashing due to its *Gerrit not being
initialized in a non-Gerrit test.

Fixes golang/go#22753 (already fixed, but now tested)

Change-Id: If09cfad6f69d8b3c97410f3e4c3a2e2281c666a5
Reviewed-on: https://go-review.googlesource.com/78155
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-11-18 03:29:02 +00:00
Brad Fitzpatrick 02c3a3603b maintner: add a missing finishProcessing call
We also need to call finishProcessing (added in golang.org/cl/77690) to whenever
we append to the mutation log.

Otherwise we never finish building data structures needed when
maintner is used in mutation-generation & API server mode.

Fixes golang/go#22763 again.

Change-Id: I55270cd43f03bee0524df188c589ac01ab8fafda
Reviewed-on: https://go-review.googlesource.com/78540
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2017-11-17 22:29:40 +00:00
Brad Fitzpatrick 04dbfb5668 maintner: fix label counting, which affected trybot work-to-do caching
A recent CL (golang.org/cl/77690) broke how labelChanges was
incremented. It needs to be renamed and tested, but this gets trybots
working again.

Fixes golang/go#22763

Change-Id: I068fc66bbde283291191f41acdc436876232e88b
Reviewed-on: https://go-review.googlesource.com/78536
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2017-11-17 20:56:21 +00:00
Andrew Bonventre ee43607332 maintner,cmd/gerritbot: minimal processing for changes
+ Adds a Footer method to maintner.GerritCL that returns the value
  of a git footer with the given name.
+ Iterates through whitelisted GitHub repos and Gerrit projects
  looking for changes to update. Handles the case where no update
  is required.

Update: golang/go#18517

Change-Id: Id133df6956b7213752059a0b0e84dd76ee8ea620
Reviewed-on: https://go-review.googlesource.com/76374
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-11-17 20:40:19 +00:00
Brad Fitzpatrick ee6321b540 maintner: handle Gerrit ref meta changes occurring before dependent git commits
A previous bug in maintner caused Gerrit ref meta updates occuring in
the mutation log before the git meta hash was added to the log. This
CL handles such entries. We add CLs to a dirty set when we see a ref
update and wait until the end of the mutations to parse the fields out
of the meta commits, at which time the git commits will have appeared
in the log.

Also, don't enumerate over private CLs in ForeachOpenCL, which I
thought was the same bug but turned out to be different.

Fixes golang/go#22653

Change-Id: I79120f06b13c5e74c7761d04494215bf0da2e53d
Reviewed-on: https://go-review.googlesource.com/77690
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2017-11-15 21:03:45 +00:00
Andrew Bonventre 3cc70d7373 maintner/maintnerd: watch the golang/scratch repo for mutations
For use in testing.

Change-Id: I2806cdad11da7075ff27a23091293a925576e09a
Reviewed-on: https://go-review.googlesource.com/69651
Reviewed-by: Sarah Adams <shadams@google.com>
2017-10-10 21:03:10 +00:00
Andrew Bonventre acdb2c3909 maintner/maintnerd: update service definition to correct app name
Change-Id: Id3cff891476f87535c5a70f86b67d3526f081452
Reviewed-on: https://go-review.googlesource.com/69650
Reviewed-by: Sarah Adams <shadams@google.com>
2017-10-10 20:41:17 +00:00
Andrew Bonventre f3da906e98 maintner/maintnerd: update Dockerfile.0 dependencies
Change-Id: I9204318e42489396af2ab05b0b8f3bdab6ad0589
Reviewed-on: https://go-review.googlesource.com/69610
Reviewed-by: Sarah Adams <shadams@google.com>
2017-10-10 20:22:16 +00:00
Andrew Bonventre 93b7f03f09 maintner: add PullRequest field to GitHubIssue
All GitHub Pull Requests are Issues, but not all Issues are PRs.
Add a boolean field to track whether a GitHub issue is a Pull Request.

Update golang/go#18517

Change-Id: I5e61254f956ca90459ef0aafc4211fd3ee33f337
Reviewed-on: https://go-review.googlesource.com/69590
Reviewed-by: Sarah Adams <shadams@google.com>
2017-10-10 20:16:41 +00:00
Jude Pereira 11e039e9af cmd/cl: remove broken dependency on godash
Removed cmd/cl's dependency on godash (which was deleted recently), in
favour of using the Corpus to find open CLs.

Fixes golang/go#21216

Change-Id: Idc748feb10c81c92ffab941d6d43abff9b93e9e4
Reviewed-on: https://go-review.googlesource.com/65770
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2017-10-04 15:24:26 +00:00
Yann Salaün 824d052797 maintner: rename TrackGithub to TrackGitHub
Fixes golang/go#20236

Change-Id: If118a4592af9e63e99599149978f8c90d78983b1
Reviewed-on: https://go-review.googlesource.com/66030
Reviewed-by: Dmitri Shuralyov <shurcool@gmail.com>
2017-09-25 17:44:56 +00:00
Yann Salaün b60cce42b1 maintner: rename GithubRepoID to GitHubRepoID
Make the naming a little more consistent.

Change-Id: Icd40d3818c490fa0bd1562a924a684d79c17c4a4
Reviewed-on: https://go-review.googlesource.com/59590
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2017-09-25 02:33:15 +00:00
Andrew Bonventre 2f835b60ec x/build/maintner: add GerritCL.OwnerName() function
To easily get the name of the original author of a change.

Change-Id: Id006b6520fd72657252cbbf934aaf8fd10202fbf
Reviewed-on: https://go-review.googlesource.com/65073
Reviewed-by: Francesc Campoy Flores <campoy@golang.org>
2017-09-22 18:52:20 +00:00
Andrew Bonventre c1c213d296 all: normalize GKE configs/Makefiles to follow common patterns
When a push is made, the latest image is pushed to the registry
with the git hash of the repo and also the same image is pushed
with the :latest tag. This ensures that :latest always points to
the most recent image and that kubectl set image will trigger an
update on the pods without having to delete them.

Fixes golang/go#21772

Change-Id: I97c893f181cdd8891eb87efb3f9ab42ede107d97
Reviewed-on: https://go-review.googlesource.com/61730
Reviewed-by: Sarah Adams <shadams@google.com>
2017-09-08 22:20:10 +00:00
Andrew Bonventre f7c15b66cf maintner: decrease poll interval from 15 to 5 min
When Gerrit emails are not sent, maintner polls Gerrit every
15 minutes. We can safely reduce this to every 5 min given the
relatively small number of bots using maintner and the current
quota of 0.2 qps per day that Gerrit permits for unauthenticated
requests.

Update golang/go#21192

Change-Id: I233bc50998927daedb34d81436e182579d2b4031
Reviewed-on: https://go-review.googlesource.com/57710
Reviewed-by: Sarah Adams <shadams@google.com>
2017-08-21 21:01:17 +00:00
Dmitri Shuralyov 8c6825293e maintner/cmd/maintserve: fix redirect logic
There was a typo in the redirection code, causing invalid logic.
This change fixes it.

Change-Id: I71f1e98fff488689c988eb72a83b37e031d35b87
Reviewed-on: https://go-review.googlesource.com/56251
Reviewed-by: Kevin Burke <kev@inburke.com>
2017-08-18 17:44:22 +00:00
Sarah Adams b125a1d814 x/build/maintner/maintnerd: check CL is found before doing work
Fixes golang/go#21383

Change-Id: I58582709fd83bb5c6ee452bdc7e53658f58dcad8
Reviewed-on: https://go-review.googlesource.com/54751
Reviewed-by: Yuval Pavel Zholkover <paulzhol@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-08-11 17:45:34 +00:00
Brad Fitzpatrick 8a70402ebb maintner: add unused code for parsing Gerrit NoteDB info, sum label votes
Change-Id: I7208c1ed6cda42fb5ad2d13374bd34304c87644c
Reviewed-on: https://go-review.googlesource.com/51912
Reviewed-by: Kevin Burke <kev@inburke.com>
2017-08-07 21:21:00 +00:00
Dmitri Shuralyov 19c1169e30 maintner/cmd/maintserve: add maintserve command
maintserve is a program that serves Go issues over HTTP, so they
can be viewed in a browser. It uses x/build/maintner/godata as
its backing source of data.

Note that it statically embeds all the resources it uses, so it's
possible to use it when offline. During that time, the corpus will
not be able to update, and GitHub user profile pictures won't load.

This is an iteration of an existing command named servegoissues,
with import path github.com/bradfitz/go-issue-mirror/cmd/servegoissues.
That program served the same purpose, but was located in another
repository. It used a "previous generation" approach to having
a corpus of GitHub issues data for Go projects, namely the
github.com/bradfitz/go-issue-mirror/issues package, which used
github.com/bradfitz/issuemirror technology.

The intent of maintserve is to replace servegoissues. It uses
the golang.org/x/build/maintner/godata package as its source of
data, which is built on top of the golang.org/x/build/maintner
technology.

Currently, maintserve has 2 types of pages:

-	Index page, which lists repositories.
-	Issues pages, which display a read-only version of issues.
	This functionality is implemented in external issuesapp package.

By default, maintserve starts as an HTTP server at on port 8080,
so you should visit http://localhost:8080/ in a browser after
running the command. Note that the first run may take a while,
since godata.Get will need to download the entire corprus:

	The initial call to Get will download approximately 350-400 MB
	of data into a directory "golang-maintner" under your operating
	system's user cache directory. Subsequent calls will only
	download what's changed since the previous call.

Helps bradfitz/go-issue-mirror#7.
Depends on shurcooL/issues#5.

Change-Id: I421147df08c6f664afff0e70abb5d6aa6a42b2d5
Reviewed-on: https://go-review.googlesource.com/52932
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-08-03 19:13:04 +00:00
Brad Fitzpatrick 73f88a6d4c all: add README.md files where missing, and tool to keep them updated
Change-Id: I385171c415bf168c04c6c3a7a996bff88964af84
Reviewed-on: https://go-review.googlesource.com/52856
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2017-08-02 22:17:52 +00:00
Andrew Bonventre fc164926f2 all: rename -dev to -staging in filenames and Makefile targets
"Dev" should refer to local development, not the staging server.

Change-Id: Icb02095ee24b7f890ca1c867a13cbdc45d1232bc
Reviewed-on: https://go-review.googlesource.com/52290
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-07-31 20:52:40 +00:00
Brad Fitzpatrick fff6e1803a maintner/maintnerd: use Gerrit to calculate TryBot/Result votes
In https://golang.org/cl/51590 I tried to calculate the Run-TryBot and
TryBot-Result vote sums using the Gerrit NoteDB mirror we have in
maintner, but after two days of fighting it now, I've concluded it's
tricky. While I work on the tricky bits in parallel, this CL partially
reverts CL 51590, which had enough other cleanup and progress that it
wasn't worth reverting in its entirety.

Instead, move the Gerrit querying to maintnerd (instead of coordinator).
This isn't bad because maintnerd already queries Gerrit.

And coordinator will still be polling every second (introduced in
51590) instead of the old 60 seconds, but this CL now adds caching in
the RPC handler.

Change-Id: I80a519d9026a0981e3abf43d54a32b4684bda0e5
Reviewed-on: https://go-review.googlesource.com/51970
Reviewed-by: Kevin Burke <kev@inburke.com>
2017-07-30 16:09:47 +00:00
Brad Fitzpatrick 72ff3ff7f2 maintner: misc cleanups from CL 51590 feedback
Also, ignore -debug images in basepin creation. (Another misc change I
had sitting around.)

Change-Id: I8c0e4df3e1940694537db1ee9dfc6303cbc86528
Reviewed-on: https://go-review.googlesource.com/51792
Reviewed-by: Herbie Ong <herbie@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-07-28 23:32:51 +00:00
Brad Fitzpatrick 7d8c8e4252 maintner/maintnerd, cmd/coordinator: use maintnerd to find TryBot work
Instead of polling Gerrit every 60 seconds, poll maintnerd every
second. This should improve TryBot-requested to TryBot-running latency
by 30 seconds on average.

(Ideally it'd long poll for changes and not even have ~500ms delay,
but this is an improvement.)

Also, in the process this does most of the work for golang/go#17626.
And this cleans up the repo head tracking complication in the coordinator
and just asks maintner for it instead.

Running benchmarks in the coordinator has been disabled since
2017-06-23 but this CL disables it further, removing some code it'd
need to work. But considering that benchmarking would need code
repairs to get working again anyway, I consider this acceptable in the
short term. I left TODO notes.

Updates golang/go#17626
Updates golang/go#19871

Change-Id: Idab43f65a9cca861bffb37748b036a5c9baee864
Reviewed-on: https://go-review.googlesource.com/51590
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2017-07-28 22:26:36 +00:00