golang / go

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

x/build/maintner: GithubIssue.NotExist resurrection does not set Created #25060

Open FiloSottile opened 6 years ago

FiloSottile commented 6 years ago

Noticed while investigating #25031 that in Corpus.processGithubIssueMutation, when an issue is resurrected from NotExist state, its Created field is not set, as that only happens when the issue is first encountered.

No idea when NotExist is set, so not sure if it's an issue, but it looks like that codepath is either unused or broken.

/cc @bradfitz

FiloSottile commented 6 years ago

Also by the way there is a comment that says

// Check Updated before all other fields so they don't update if this
// Mutation is stale

but there is no return to implement that behavior.

dmitshur commented 6 years ago

While looking over this issue, I spotted https://go-review.googlesource.com/c/build/+/38137/4/maintner/github.go#456 in processGithubIssueMutation. Despite looking potentially related, I don't think it's actually related to this.