-
Notifications
You must be signed in to change notification settings - Fork 139
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
Build Cop: duplicate issues for same test failure? #283
Comments
My first thought was that this was a race condition when parallel runs finish at the same time. But, it looks like some of those issues were filed days apart. GoogleCloudPlatform/python-docs-samples#2892 and GoogleCloudPlatform/python-docs-samples#2891 look like a race condition. I'm not sure why the other issues aren't being found (or, only found sometimes). |
The problem is pagination. There are > 32 Build Cop issues in python-docs-samples: https://github.com/GoogleCloudPlatform/python-docs-samples/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22buildcop%3Aissue%22 But, we currently only get the first 32 issues. So, it's just luck with whether or not the already-existing issue is returned/found. repo-automation-bots/packages/buildcop/src/buildcop.ts Lines 115 to 123 in 4dd6255
Pagination docs are here: https://octokit.github.io/rest.js/#pagination I'll send a PR. |
Part of the fix needs to include closing duplicate issues, maybe preferring to keep an issue someone other than the bot has commented on. |
For some reason, we're getting many, many duplicate comments on issues (sorry!) Example: GoogleCloudPlatform/python-docs-samples#2849 Looking. |
All of the duplicate comments are because there are many, many sponge_log.xml files that get sent to the bot. The bot then has a different instance for each one of the logs. They are all running at the same time, they all try to close the duplicate issues, then they all comment at the same time. I can't think of a way to prevent this race condition within the bot itself. So, one idea is to add some sort of external locking mechanism. We could limit concurrency, but the same Cloud Function is used for every repo, so that would just slow things down. |
Otherwise, if there are 50 invocations of the bot at the same time, they will all try to close the duplicate issues. This isn't perfect, but will be way better than 50. Fixes #283
d70933a commit d70933a Author: Tyler Bui-Palsulich <[email protected]> Date: Tue Feb 18 09:21:32 2020 -0500 feat(Build Cop): handle issue pagination and duplicates (#291) Fixes #283.
9e953ad commit 9e953ad Author: Tyler Bui-Palsulich <[email protected]> Date: Wed Feb 19 13:09:53 2020 -0500 fix(Build Cop): only close duplicates when the test was run (#297) Otherwise, if there are 50 invocations of the bot at the same time, they will all try to close the duplicate issues. This isn't perfect, but will be way better than 50. Fixes #283
Unclear why we're getting multiple bugs for the same test:
https://github.com/GoogleCloudPlatform/python-docs-samples/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+test_ncaa_tutorial
Currently yields 4 issues for the same test:
GoogleCloudPlatform/python-docs-samples#2892
GoogleCloudPlatform/python-docs-samples#2891
GoogleCloudPlatform/python-docs-samples#2849
GoogleCloudPlatform/python-docs-samples#2800
The text was updated successfully, but these errors were encountered: