Skip to content

Implement refresh mechanism for unknown mergeable PRs #247

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

Merged
merged 3 commits into from
Apr 28, 2025

Conversation

Sakib25800
Copy link
Contributor

@Sakib25800 Sakib25800 commented Mar 24, 2025

Fixes #218

This PR:

  • Adds mergeable queue processing on periodic refresh

@Sakib25800 Sakib25800 force-pushed the feat/async-merge-check branch from bf1e6d4 to 4f5b820 Compare March 24, 2025 16:35
@Sakib25800
Copy link
Contributor Author

@Kobzol could you take a quick look to make sure I'm on the right track on how I've implemented the background processing for the mergeable queue?

You can ignore the logic and what actually happens right now since it's very much a WIP, but I want to make sure I'm going about the actual queue task implementation correctly.

@Kobzol
Copy link
Contributor

Kobzol commented Apr 1, 2025

Yeah, I think that's mostly fine. I would use a "native" queue from tokio, rather than implementing it with a Mutex + sleep, that's unnecessary and hacky. Also waiting 10 secs for the item to be processed in tests would be annoying.

Also I would split this into multiple PRs:

  • Introduce the queue and the processing loop, push to the queue after pushes to the base branch.
  • Also push to the queue in the refresh handler.

@Sakib25800 Sakib25800 force-pushed the feat/async-merge-check branch from a38daf6 to 1c57795 Compare April 26, 2025 11:04
@Sakib25800 Sakib25800 marked this pull request as ready for review April 26, 2025 11:08
Copy link
Contributor

@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.

Thanks!

])
.await;

if results.iter().all(|result| result.is_ok()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

We're swallowing errors here, we should log them instead. It was pre-existing though, so let's fix it in a separate PR.

@Kobzol Kobzol added this pull request to the merge queue Apr 28, 2025
Merged via the queue into rust-lang:main with commit ea094b6 Apr 28, 2025
2 checks passed
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.

Detect unmergeable status of PRs
2 participants