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/cmd/gopherbot: closeStaleWaitingForInfo fails to close issues #52017

Closed
hyangah opened this issue Mar 29, 2022 · 3 comments
Closed

x/build/cmd/gopherbot: closeStaleWaitingForInfo fails to close issues #52017

hyangah opened this issue Mar 29, 2022 · 3 comments
Labels
Builders x/build issues (builders, bots, dashboards) FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@hyangah
Copy link
Contributor

hyangah commented Mar 29, 2022

We are trying to understand why gopherbot is not closing old stale issues
For example vscode-go issue 2020 (note: I intentionally avoid linking to the issue)
which was labeled with "WaitingForInfo" multiple months ago.

I tested gopherbot with go run gopherbot.go --dry-run=true --only-run="close stale WaitingForInfo" and observed:

When closeStaleWaitingForInfo handles the mentioned issue (vscode-go 2020), the gi (maintner.GitHubIssue) does not have any entry in its events field. As a result, the callback set for gi.ForeachEvent never runs, and the issue is never considered as stale one.

Screen Shot 2022-03-29 at 2 29 32 PM

I am not familiar with maintner nor gopherbot, and am not sure if this is a bug in maintner code, or an incomplete log somewhere.
Not only this issue, I also observed some issues have incorrect states - for example, Closed field is not set for closed issue, etc.

Help with inspecting maintner is greatly appreciated.

ps. Why don't we move some of issue gardening automation (like closing stale issues) to github actions?

@gopherbot gopherbot added the Builders x/build issues (builders, bots, dashboards) label Mar 29, 2022
@gopherbot gopherbot added this to the Unreleased milestone Mar 29, 2022
@dmitshur dmitshur added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Mar 29, 2022
@dmitshur
Copy link
Contributor

Help with inspecting maintner is greatly appreciated.

In cases like this, it can work well to visualize maintner data via the maintserve command. Running it and navigating to http://localhost:8080/golang/vscode-go/2020 makes it visible that maintner corpus knows that issue exists, but doesn't have any of its comments, labels, or events. (screenshot) In contrast, a recent issue in the main issue tracker has replies, labels, events. (screenshot)

Looking at maintner log shows it failing to sync issue comments in the vscode-go issue tracker, with 236 outstanding issues, and repeatedly running into an error it considers as fatal while syncing comments for issue 1893, and not making any progress past it:

[...]
2022/03/30 11:14:30 sync github golang/vscode-go: Beginning sync.
2022/03/30 11:14:32 sync github golang/vscode-go: no changed issues; cached=false
2022/03/30 11:14:32 sync github golang/vscode-go: comment sync: 236 issues remaining; syncing issue 1893
2022/03/30 11:14:32 sync github golang/vscode-go: comment sync on issue 1893: GET https://api.github.com/repos/golang/vscode-go/issues/1893/comments?direction=asc&per_page=100&sort=updated: 404 Not Found []
2022/03/30 11:14:32 sync github golang/vscode-go: sync = GET https://api.github.com/repos/golang/vscode-go/issues/1893/comments?direction=asc&per_page=100&sort=updated: 404 Not Found []; sleeping
[...]
2022/03/30 11:29:32 sync github golang/vscode-go: Beginning sync.
2022/03/30 11:29:33 sync github golang/vscode-go: no changed issues; cached=false
2022/03/30 11:29:33 sync github golang/vscode-go: comment sync: 236 issues remaining; syncing issue 1893
2022/03/30 11:29:33 sync github golang/vscode-go: comment sync on issue 1893: GET https://api.github.com/repos/golang/vscode-go/issues/1893/comments?direction=asc&per_page=100&sort=updated: 404 Not Found []
2022/03/30 11:29:33 sync github golang/vscode-go: sync = GET https://api.github.com/repos/golang/vscode-go/issues/1893/comments?direction=asc&per_page=100&sort=updated: 404 Not Found []; sleeping
[...]

I think this problem has the same cause as #40640 and #37370—there's a transferred issue in vscode-go and maintner was never updated to handle those.

It seems the maintner corpus is really unhealthy in the vscode-go issue tracker because of this. Progress on #37370 has been hindered by #37603, but I think we can try a small change that should be safe/easy to review and might help. Mailed CL 397234 for that.

@gopherbot
Copy link

Change https://go.dev/cl/397234 mentions this issue: maintner: mark issues as NotExist when its comments are gone

@dmitshur dmitshur added NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Apr 1, 2022
@dmitshur
Copy link
Contributor

dmitshur commented Apr 1, 2022

The change helped, and vscode-go issue 2020 (among many others in the vscode-go issue tracker) has now been correctly closed by gopherbot by the closeStaleWaitingForInfo task. Please let us know if you spot something unexpected.

I'll close this issue as fixed, and issues #40640 and #37370 are still open to track what still remains to fully handle transferred issues.

Thanks for the detailed report.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Builders x/build issues (builders, bots, dashboards) FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
Archived in project
Development

No branches or pull requests

3 participants