Skip to content

feat: cancel in-progress reviewbot pushes before new ones are started - #3590

Open
bhearsum wants to merge 1 commit into
mozilla:masterfrom
bhearsum:feat-cancel-in-progress-review
Open

feat: cancel in-progress reviewbot pushes before new ones are started#3590
bhearsum wants to merge 1 commit into
mozilla:masterfrom
bhearsum:feat-cancel-in-progress-review

Conversation

@bhearsum

Copy link
Copy Markdown
Contributor

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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant