-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x/build/maintner: new empty milestones are not detected #25744
Comments
I ran into what I suspect to be a related issue while doing #26949. A newly added GitHub repository with zero issues does not show up in the corpus. As soon as I created the first Pull Request (which counts as an issue), the repository showed up: 1. added "dl" to whitelist (CL x) and redeployed maintnerd
2. corpus.GitHub().Repo("golang", "dl") // nil
3. created first issue/PR in the repo https://github.com/golang/dl/pull/1
4. corpus.GitHub().Repo("golang", "dl") // non-nil (Thanks @FiloSottile for reporting this issue; if I hadn't seen it, it would've been harder for me to debug what went wrong.) To test this, I used package main
import (
"context"
"fmt"
"log"
"golang.org/x/build/maintner"
"golang.org/x/build/maintner/godata"
)
func main() {
corpus, err := godata.Get(context.Background())
if err != nil {
log.Fatalln(err)
}
num := make(map[string]int)
for _, name := range []string{"example", "dl"} {
repo := corpus.GitHub().Repo("golang", name)
if repo == nil {
continue
}
err = repo.ForeachIssue(func(gi *maintner.GitHubIssue) error {
num[name]++
return nil
})
if err != nil {
log.Println(err)
}
}
fmt.Println(num)
} Before first PR:
After first PR:
Edit: That said, I don't think this is necessarily a bad behavior that must be changed. Perhaps the right fix is documentation. I'd need to think through the trade-offs before making a decision. |
After going through the latest Go release, I think this is indeed a bug. If a new, empty milestone is not picked up by the corpus, then the new milestone for the next release will be ignored. The current code will then require that some random issue is added to this future milestone in order to be picked up and allow the release to proceed. I also used this issue to prime the corpus as @FiloSottile did, but that feels like a bit of a hack. |
A new milestone with no issues does not show up in the corpus.
(Also, don't mind me while I use this issue to prime the corpus.)
The text was updated successfully, but these errors were encountered: