feat: cancel in-progress reviewbot pushes before new ones are started - #3590
Open
bhearsum wants to merge 1 commit into
Open
feat: cancel in-progress reviewbot pushes before new ones are started#3590bhearsum wants to merge 1 commit into
bhearsum wants to merge 1 commit into
Conversation
This was originally motivated by mozilla#3578, but it's valid and worthwhile on its own. Aside from the very roundabout way we have to find task group ids, this is pretty straightforward: simply find and cancel all previous task groups for the revision. This avoids doing work for something that's already stale. If someone knows of a way to find the task group id of the reviewbot push other than the roundabout way it's happening here, I'd be very happy to switch to it. I could not find any way to pull it (or even the treeherder link) through the API directly; the only thing that seems to available there is the task id of the initial code review task. In addition to the unit tests, I managed to run code review bot locally as some sort of integration test. I didn't have it actually cancel any tasks, but I _think_ I've done enough to make this landable. Ideally we can test in a non-prod environment before production.
bhearsum
marked this pull request as ready for review
August 26, 2026 14:42
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This was originally motivated by #3578, but it's valid and worthwhile on its own.
Aside from the very roundabout way we have to find task group ids, this is pretty straightforward: simply find and cancel all previous task groups for the revision. This avoids doing work for something that's already stale.
If someone knows of a way to find the task group id of the reviewbot push other than the roundabout way it's happening here, I'd be very happy to switch to it. I could not find any way to pull it (or even the treeherder link) through the API directly; the only thing that seems to available there is the task id of the initial code review task.
In addition to the unit tests, I managed to run code review bot locally as some sort of integration test. I didn't have it actually cancel any tasks, but I think I've done enough to make this landable. Ideally we can test in a non-prod environment before production.