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

Allow pr-bot to re-assign reviewers when stopped #31436

Merged
merged 1 commit into from
Jul 9, 2024

Conversation

nielm
Copy link
Contributor

@nielm nielm commented May 29, 2024

Fixes #31437

Enables the command assign set of reviewers to restart notifications if stopped, for example after manual reviewer assignment.

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

@nielm
Copy link
Contributor Author

nielm commented May 29, 2024

R: @TheNeuralBit
R: @damccorm

Copy link
Contributor

Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control

@liferoad liferoad requested a review from damccorm June 10, 2024 14:30
@@ -94,6 +94,15 @@ async function processPrComment(
return;
}

// Check to see if notifications have been stopped before processing further
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Could we move this above the removeSlowReviewLabel check, and add an explanatory comment of why we still want to processCommand and not early exit sooner?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we move this above the removeSlowReviewLabel check
Done

add an explanatory comment of why we still want to processCommand and not early exit sooner?

More comments added to code, but did you mean add a comment to the PR?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

Copy link
Contributor

@damccorm damccorm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, overall this LGTM - just had one suggestion.

We should monitor it to make sure we're not running into any GitHub token limits, but I don't anticipate that being a problem

@nielm
Copy link
Contributor Author

nielm commented Jul 8, 2024

Apologies for slow reply.

We should monitor it to make sure we're not running into any GitHub token limits, but I don't anticipate that being a problem

This change will not alter the frequency in which PRBot will run, nor the actual number of reads of the PRState object (except for the cases where notifications are restarted!)

Admittedly the reading/writing of PRstate is a bit inefficient - it could be read only once and then cached, and then the write deferred until the end of the PRBot run, but I didn't want to dive any deeper into this code!

Fixes apache#31437

Enables the command `assign set of reviewers` to restart notifications if stopped
@damccorm
Copy link
Contributor

damccorm commented Jul 9, 2024

This change will not alter the frequency in which PRBot will run, nor the actual number of reads of the PRState object (except for the cases where notifications are restarted!)

Yeah, I think its fine - I was thinking grabbing the comment body would incur an API call, but we actually already have that, so it should be fine

@damccorm damccorm merged commit fa9c618 into apache:master Jul 9, 2024
3 checks passed
@damccorm
Copy link
Contributor

damccorm commented Jul 9, 2024

Thanks!

acrites pushed a commit to acrites/beam that referenced this pull request Jul 17, 2024
Fixes apache#31437

Enables the command `assign set of reviewers` to restart notifications if stopped
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.

[Feature Request]: PrBot should have a workflow to re-assign reviewers if stopped
2 participants