rust-lang / triagebot

Automation/tooling for Rust spaces
https://triage.rust-lang.org
Apache License 2.0
177 stars 75 forks source link

Make missing commit lookup more robust #1598

Closed Kobzol closed 2 years ago

Kobzol commented 2 years ago

The code now builds a queue of unresolved commits (pre-filled with a newly received commit and all missing commits from the DB). Then it recursively resolves each commit from the queue. When a new unresolved commit is found during the resolve, it is added to the queue.

Fixes: https://github.com/rust-lang/triagebot/issues/1483

Mark-Simulacrum commented 2 years ago

I think this looks pretty good, so happy to merge with the nit fixed.

Kobzol commented 2 years ago

I refactored the while let. VecDeque probably isn't strictly necessary, but it shouldn't hurt anything.

I don't have a way to test the change properly though, we'll probably have to see how it works in production.