fix(worker): catch NoConfiguredAppsAvailable in load_commit_diff#727
Open
thomasrockhu-codecov wants to merge 1 commit intomainfrom
Open
fix(worker): catch NoConfiguredAppsAvailable in load_commit_diff#727thomasrockhu-codecov wants to merge 1 commit intomainfrom
thomasrockhu-codecov wants to merge 1 commit intomainfrom
Conversation
load_commit_diff already handles TorngitError and RepositoryWithoutValidBotError by returning None (the diff is optional), but NoConfiguredAppsAvailable and OwnerWithoutValidBotError were not caught. When a GitHub App is misconfigured, rate-limited, or suspended for an org, these exceptions propagated up and crashed the entire upload_finisher task instead of gracefully skipping the diff. This was causing ~240 errors/6h for SciML/* repos in production, contributing to the upload_finisher queue backlog. Made-with: Cursor
3 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #727 +/- ##
=======================================
Coverage 92.24% 92.24%
=======================================
Files 1302 1302
Lines 47890 47893 +3
Branches 1628 1628
=======================================
+ Hits 44177 44180 +3
Misses 3404 3404
Partials 309 309
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
jason-ford-codecov
approved these changes
Feb 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
load_commit_diffalready handlesTorngitErrorandRepositoryWithoutValidBotErrorby returningNone(the diff is optional), butNoConfiguredAppsAvailableandOwnerWithoutValidBotErrorwere not caughtTest plan
test_load_commit_diff_no_configured_apps— mocksget_repo_provider_serviceto raiseNoConfiguredAppsAvailable, assertsload_commit_diffreturnsNonetest_load_commit_diff_owner_without_bot— same pattern forOwnerWithoutValidBotErrorMade with Cursor
Note
Low Risk
Low risk: this only broadens exception handling around optional diff fetching and adds unit coverage; primary impact is reduced task failures when GitHub app configuration is invalid or unavailable.
Overview
load_commit_diffinupload_finishernow also catchesNoConfiguredAppsAvailableandOwnerWithoutValidBotError, records the existingREPO_BOT_INVALIDcommit error, logs a warning, and returnsNoneso the finisher continues without a diff.Unit tests were added to assert these new exception cases are handled by returning
None(matching prior behavior for missing diffs and invalid repo bots).Written by Cursor Bugbot for commit 49c4fbf. This will update automatically on new commits. Configure here.