Repository: go
Issue: x/build/cmd/gopherbot: keeps repeating some actions without effect
Labels: Builders,NeedsInvestigation,umbrella

I noticed this in the gopherbot logs recently, and it's possible to reproduce locally in dry-run mode. Gopherbot keeps on repeating some actions every iteration. These actions don't have an effect, and so gopherbot never stops repeating them.

```
2018/10/22 07:44:15 got corpus update after 252.395017ms
2018/10/22 07:44:15 No reviewers or cc: https://go-review.googlesource.com/c/gddo/+/135536
2018/10/22 07:44:15 Adding no-owners tag to change https://go-review.googlesource.com/c/gddo/+/135536...
2018/10/22 07:44:15 No reviewers or cc: https://go-review.googlesource.com/c/gddo/+/135537
2018/10/22 07:44:15 Adding no-owners tag to change https://go-review.googlesource.com/c/gddo/+/135537...
2018/10/22 07:44:16 closing scratch CL https://golang.org/cl/71730 ...
2018/10/22 07:44:16 closing scratch CL https://golang.org/cl/71850 ...
2018/10/22 07:44:16 closing scratch CL https://golang.org/cl/72090 ...
2018/10/22 07:44:16 closing scratch CL https://golang.org/cl/72091 ...
2018/10/22 07:44:16 closing scratch CL https://golang.org/cl/72110 ...
2018/10/22 07:44:16 closing scratch CL https://golang.org/cl/72131 ...
2018/10/22 07:44:16 gopherbot ran in 1.335854405s
```

<details><summary>Reproduce Steps</summary><br>

```
$ go get -u golang.org/x/build/cmd/gopherbot
$ go run golang.org/x/build/cmd/gopherbot -dry-run -daemon
2018/10/22 14:27:47 Loading data from log *maintner.netMutSource ...
2018/10/22 14:27:47 Downloading 39043 bytes of https://maintner.golang.org/logs/41 ...
2018/10/22 14:27:47 wrote /Users/dmitshur/Library/Caches/golang-maintner/0041.growing.mutlog
2018/10/22 14:27:55 Reloaded data from log *maintner.netMutSource.
2018/10/22 14:27:56 No reviewers or cc: https://go-review.googlesource.com/c/gddo/+/135536
2018/10/22 14:27:56 Adding no-owners tag to change https://go-review.googlesource.com/c/gddo/+/135536...
2018/10/22 14:27:56 No reviewers or cc: https://go-review.googlesource.com/c/gddo/+/135537
2018/10/22 14:27:56 Adding no-owners tag to change https://go-review.googlesource.com/c/gddo/+/135537...
2018/10/22 14:27:56 [dry-run] would've closed scratch CL https://golang.org/cl/71730 ...
2018/10/22 14:27:56 [dry-run] would've closed scratch CL https://golang.org/cl/71850 ...
2018/10/22 14:27:56 [dry-run] would've closed scratch CL https://golang.org/cl/72090 ...
2018/10/22 14:27:56 [dry-run] would've closed scratch CL https://golang.org/cl/72091 ...
2018/10/22 14:27:56 [dry-run] would've closed scratch CL https://golang.org/cl/72110 ...
2018/10/22 14:27:56 [dry-run] would've closed scratch CL https://golang.org/cl/72131 ...
2018/10/22 14:27:56 gopherbot ran in 1.434313646s
2018/10/22 14:27:56 Updating data from log *maintner.netMutSource ...
2018/10/22 14:29:22 Downloading 1242 bytes of https://maintner.golang.org/logs/41 ...
2018/10/22 14:29:22 wrote /Users/dmitshur/Library/Caches/golang-maintner/0041.growing.mutlog
2018/10/22 14:29:22 Reloaded data from log *maintner.netMutSource.
2018/10/22 14:29:22 got corpus update after 1m25.647922592s
2018/10/22 14:29:23 No reviewers or cc: https://go-review.googlesource.com/c/gddo/+/135536
2018/10/22 14:29:23 Adding no-owners tag to change https://go-review.googlesource.com/c/gddo/+/135536...
2018/10/22 14:29:23 No reviewers or cc: https://go-review.googlesource.com/c/gddo/+/135537
2018/10/22 14:29:23 Adding no-owners tag to change https://go-review.googlesource.com/c/gddo/+/135537...
2018/10/22 14:29:23 [dry-run] would've closed scratch CL https://golang.org/cl/71730 ...
2018/10/22 14:29:23 [dry-run] would've closed scratch CL https://golang.org/cl/71850 ...
2018/10/22 14:29:23 [dry-run] would've closed scratch CL https://golang.org/cl/72090 ...
2018/10/22 14:29:23 [dry-run] would've closed scratch CL https://golang.org/cl/72091 ...
2018/10/22 14:29:23 [dry-run] would've closed scratch CL https://golang.org/cl/72110 ...
2018/10/22 14:29:23 [dry-run] would've closed scratch CL https://golang.org/cl/72131 ...
2018/10/22 14:29:23 gopherbot ran in 860.347827ms
2018/10/22 14:29:23 Updating data from log *maintner.netMutSource ...
2018/10/22 14:29:23 Downloading 1317 bytes of https://maintner.golang.org/logs/41 ...
2018/10/22 14:29:23 wrote /Users/dmitshur/Library/Caches/golang-maintner/0041.growing.mutlog
2018/10/22 14:29:23 gerrit code.googlesource.com/gocloud: Ref {CLNumber:34491 Version:0} => 4702bd58135b78127c759a94658b7606e5445e46
2018/10/22 14:29:23 Reloaded data from log *maintner.netMutSource.
2018/10/22 14:29:23 got corpus update after 195.853575ms
2018/10/22 14:29:24 No reviewers or cc: https://go-review.googlesource.com/c/gddo/+/135536
2018/10/22 14:29:24 Adding no-owners tag to change https://go-review.googlesource.com/c/gddo/+/135536...
2018/10/22 14:29:24 No reviewers or cc: https://go-review.googlesource.com/c/gddo/+/135537
2018/10/22 14:29:24 Adding no-owners tag to change https://go-review.googlesource.com/c/gddo/+/135537...
2018/10/22 14:29:24 [dry-run] would've closed scratch CL https://golang.org/cl/71730 ...
2018/10/22 14:29:24 [dry-run] would've closed scratch CL https://golang.org/cl/71850 ...
2018/10/22 14:29:24 [dry-run] would've closed scratch CL https://golang.org/cl/72090 ...
2018/10/22 14:29:24 [dry-run] would've closed scratch CL https://golang.org/cl/72091 ...
2018/10/22 14:29:24 [dry-run] would've closed scratch CL https://golang.org/cl/72110 ...
2018/10/22 14:29:24 [dry-run] would've closed scratch CL https://golang.org/cl/72131 ...
2018/10/22 14:29:24 gopherbot ran in 726.996791ms
2018/10/22 14:29:24 Updating data from log *maintner.netMutSource ...
2018/10/22 14:29:41 Downloading 37 bytes of https://maintner.golang.org/logs/41 ...
2018/10/22 14:29:41 wrote /Users/dmitshur/Library/Caches/golang-maintner/0041.growing.mutlog
2018/10/22 14:29:41 Reloaded data from log *maintner.netMutSource.
2018/10/22 14:29:41 got corpus update after 17.501948429s
2018/10/22 14:29:42 No reviewers or cc: https://go-review.googlesource.com/c/gddo/+/135536
2018/10/22 14:29:42 Adding no-owners tag to change https://go-review.googlesource.com/c/gddo/+/135536...
2018/10/22 14:29:42 No reviewers or cc: https://go-review.googlesource.com/c/gddo/+/135537
2018/10/22 14:29:42 Adding no-owners tag to change https://go-review.googlesource.com/c/gddo/+/135537...
2018/10/22 14:29:42 [dry-run] would've closed scratch CL https://golang.org/cl/71730 ...
2018/10/22 14:29:42 [dry-run] would've closed scratch CL https://golang.org/cl/71850 ...
2018/10/22 14:29:42 [dry-run] would've closed scratch CL https://golang.org/cl/72090 ...
2018/10/22 14:29:42 [dry-run] would've closed scratch CL https://golang.org/cl/72091 ...
2018/10/22 14:29:42 [dry-run] would've closed scratch CL https://golang.org/cl/72110 ...
2018/10/22 14:29:42 [dry-run] would've closed scratch CL https://golang.org/cl/72131 ...
2018/10/22 14:29:42 gopherbot ran in 723.348371ms
2018/10/22 14:29:42 Updating data from log *maintner.netMutSource ...
```

</details><br>

It's pretty harmless, but would be nice to fix.

The underlying issues causing this are:

- [ ] #22635–x/build/maintner: Gerrit CL deletions are not reflected in model
- [ ] #30184–x/build/maintner: GitHub issue becoming 404 is not reflected in model
- [x] #28318–x/build/maintner: reports incorrect Hashtags for some CLs

Fixing those issues should resolve this issue.

/cc @bradfitz @andybons