golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
123.55k stars 17.61k forks source link

x/build/cmd/gopherbot: wait-author tag not being auto-removed from updated CLs #28510

Closed bradfitz closed 5 years ago

bradfitz commented 5 years ago

Gopherbot is supposed to be removing the wait-author tag on CLs when an OP replies or updates a new patchset.

I've noticed it hasn't been. Here's an example:

https://go-review.googlesource.com/c/go/+/142537

I added the tag at https://go-review.googlesource.com/c/go/+/142537#message-38fe2a310757d0fde272356e560843068aa980c3 and then PS2 was uploaded, but the wait-author tag remains.

/cc @dmitshur @katiehockman @bcmills

dmitshur commented 5 years ago

This is likely caused by issue #28318.

If you do go run golang.org/x/build/maintner/cmd/maintserve -http=localhost:8080, then visit http://localhost:8080/go.googlesource.com/go and search for "#142537", you'll see that maintner reports that CL as not having any tags:

image

As a result, gopherbot doesn't believe that the CL has a wait-author tag, so it doesn't try to remove it.

dmitshur commented 5 years ago

A simple program that confirms it:

package main

import (
    "context"
    "fmt"
    "log"

    "golang.org/x/build/maintner/godata"
)

func main() {
    corpus, err := godata.Get(context.Background())
    if err != nil {
        log.Fatalln(err)
    }
    cl := corpus.Gerrit().Project("go.googlesource.com", "go").CL(142537)
    fmt.Printf("tags = %q\n", cl.Meta.Hashtags())

    // Output:
    // tags = ""
}
Skarlso commented 5 years ago

Note here too. I volunteered for the fix of the corresponding issue #25253.

Skarlso commented 5 years ago

Tags are now correctly displayed on a local test run:

screenshot 2018-11-17 at 21 01 43

And the linked issue:

screenshot 2018-11-17 at 21 05 40 screenshot 2018-11-17 at 21 04 12
gopherbot commented 5 years ago

Change https://golang.org/cl/152779 mentions this issue: maintner: fix GerritMeta.Hashtags to look at earlier meta parents for answer

bradfitz commented 5 years ago

gopherbot was re-deployed with the maintner fix.