Skip to content

Conversation

@apiraino
Copy link
Contributor

@apiraino apiraino commented Jan 29, 2025

This PR contains:

  • adds more logging when no candidates for a PR assignment are found
  • split and logs the exact reason why a user was filtered out from a list of possible candidates

Besides these changes, nothing in the PR assignment changes. Overall, this should help us getting more insights from the logs. I've tried splitting the changes in commits to make the review easier.

Thanks!

r? @Kobzol or @jackh726

{
// This is a comment, so there must already be a reviewer assigned. No need to assign anyone else.
issue
.post_comment(&ctx.github, &on_vacation_msg(&username))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

the deletion of on_vacation_msg is in 82c549a (sorry)

Copy link
Member

Choose a reason for hiding this comment

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

I find the functions better than the consts, because with the function you cannot forget to pass the required placeholders, with the static string you can easily just use it without replacing the placeholder.

}

log::info!("Filtered list of candidates: {:?}", filtered_candidates);
log::info!(
Copy link
Member

Choose a reason for hiding this comment

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

We should really migrate to tracing and use spans to get have proper log context :)

{
// This is a comment, so there must already be a reviewer assigned. No need to assign anyone else.
issue
.post_comment(&ctx.github, &on_vacation_msg(&username))
Copy link
Member

Choose a reason for hiding this comment

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

I find the functions better than the consts, because with the function you cannot forget to pass the required placeholders, with the static string you can easily just use it without replacing the placeholder.

Copy link
Member

@Kobzol Kobzol left a comment

Choose a reason for hiding this comment

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

This PR should hopefully only improve logging, so let's ship it.

@Kobzol Kobzol merged commit fedb383 into rust-lang:master Jan 30, 2025
2 checks passed
@apiraino apiraino deleted the track-reasons-filtered-out-candidates branch January 30, 2025 21:30
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.

2 participants