x/build/maintner: Maintner does not detect transferred issues #37370
Labels
Builders
x/build issues (builders, bots, dashboards)
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
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
The text was updated successfully, but these errors were encountered: