Skip to content
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: Maintner does not detect transferred issues #37370

Open
jmdobry opened this issue Feb 22, 2020 · 2 comments
Open

x/build/maintner: Maintner does not detect transferred issues #37370

jmdobry opened this issue Feb 22, 2020 · 2 comments

Comments

@jmdobry
Copy link

@jmdobry jmdobry commented Feb 22, 2020

Related to #30184.

Maintner's sync loop uses a ListIssues call sorted by update time to determine which issues it needs to re-fetch issue data and event data for. Deleted issues and transferred issues don't show up in the ListIssues response, Maintner is never aware that they're gone, and ultimately those issues are frozen in the corpus in the state they had before they were deleted/transferred. They are never marked NotExist (tombstoned). https://go-review.googlesource.com/c/build/+/161521/ is an insufficient fix for this reason.

https://go-review.googlesource.com/c/build/+/205598 proposes exposing a mutation method so an external process can inform Maintner of the deleted/transferred issues, but that requires an external process (also, see other comments on that CL).

I think a better solution would be for Maintner, during its issue sync, to pull repository events up to the GitHub poller's lastUpdated timestamp, looking specifically for issue transfer and issue delete events, and tombstoning (mark as NotExist) the appropriate issues before moving onto the regular issue sync.

The difficulty will be for repos that are already being synced, this doesn't provide a way to go back in time and handle previous deletes/transfers, which, the external process would be capable of doing.

/cc @bradfitz @dmitshur @orthros

@gopherbot gopherbot added this to the Unreleased milestone Feb 22, 2020
jmdobry added a commit to jmdobry/build that referenced this issue Feb 22, 2020
jmdobry added a commit to jmdobry/build that referenced this issue Feb 22, 2020
jmdobry added a commit to jmdobry/build that referenced this issue Feb 22, 2020
@jmdobry
Copy link
Author

@jmdobry jmdobry commented Feb 22, 2020

I implemented my suggestion, and discovered that GitHub doesn't actually add deleted and transferred events to the originating repository's issue events, rendering this idea a non-starter.

Instead, I'm reverting back to relying on https://golang.org/cl/161521/ as a partial fix.

@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Apr 9, 2021

@dmitshur has suggested that we could check the endpoint https://api.github.com/repos/golang/vscode-go/issues/144/events (for an issue like https://github.com/golang/vscode-go/issues/144). Then, we could just skip adding any issue that no longer exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants