Closed vohoanglong0107 closed 1 day ago
Oh that makes perfect sense. You want me to document this into the code, to prevent future "clean up" attempts? 😆
On Mon, Nov 25, 2024, 17:39 Jakub Beránek @.***> wrote:
@.**** commented on this pull request.
Left one comment, otherwise the cleanup looks nice.
In src/github/api/mod.rs https://github.com/rust-lang/bors/pull/180#discussion_r1856116018:
app.clone(),
installation_client.clone(), team_api_client, repo.clone(), name.clone(), ) .await
- .map_err(|error| {
- anyhow::anyhow!("Cannot load repository {:?}: {error:?}", repo.full_name)
- });
- {
- Ok(repo_state) => repo_state,
The complicated handling of results here was by design, because we wanted to have a hard error when the repos fail to load when the bot starts, but only log a warning when we reload the state during the bot's execution. By moving the error handling here, it is not possible to distinguish these two cases. So I would prefer keeping the previous approach of returning Result
. — Reply to this email directly, view it on GitHub https://github.com/rust-lang/bors/pull/180#pullrequestreview-2457649961, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASTX42DI6CGFGWI2GNFPFX32CLO4LAVCNFSM6AAAAABSJFFWNOVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDINJXGY2DSOJWGE . You are receiving this because you authored the thread.Message ID: @.***>
Yes please :)
Why
Previously RepositoryLoader was created to ease the migration from trait to sqlx. Now that the migration is complete, we can safely clean it up.