Repository navigation
Keep the daemon's scheduled run going after an unchecked failure - #66
Merged
Merged
Conversation
Only an IOException was caught per user, so a RuntimeException for one user or organization skipped the rest of the run, its completion log and its backup-completed event until the next interval. Catch Exception, as the command-line loop already does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Self-review rubric (Copilot could not be added as a reviewer:
Observation for the reviewer: This review comment was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener). drafted by Claude on behalf of Daniel Stephenson |
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
ScheduledBackupService.runScheduledBackupnow catchesExceptioninstead of onlyIOExceptionaround each user's backup. An unchecked failure for one user or organization (for example aGHExceptionfrom github-api while paging through a repository listing) is logged asError backing up <name>: <message>like any other failure. The remaining users are still backed up, and the run is still logged and reported as completed. This matches the per-user catch already used by the non-interactive CLI loop inBackupCommandLineRunner.java.io.IOExceptionimport is removed.ScheduledBackupServiceTestcase is added, and aFixedentry is added toCHANGELOG.md.No other documentation needed changing.
COMMANDS.md,CONFIG.mdandUSER_GUIDE.mdalready say a daemon failure is "logged as an error", which is now true for unchecked failures as well.Test plan
testRunScheduledBackup_UncheckedExceptionDoesNotStopRemainingUserswas run against the unfixed code and failed withUnexpected exception thrown: java.lang.IllegalStateException: Listing interrupted. It passes with the fix.mvn test: 223 tests run, 0 failures, 0 errors, 1 skipped (pre-existing skip),BUILD SUCCESS.Buildworkflow green on the PR head.Triage notes
README.md,COMMANDS.md,CONFIG.md,USER_GUIDE.md,CONTRIBUTING.mdand the properties files were checked againstBackupCommandLineRunner,BackupController,BackupRequest,BackupService,GitHubService,RateLimitNoticeHandlerandScheduledBackupService, and no drift was found. The daemon's narrower catch turned up during that sweep and was filed as Daemon stops a scheduled run when one user fails with an unchecked exception #65.LICENSE) was skipped again: choosing the license, copyright holder and year is a maintainer decision.Closes #65
This PR description was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).
🤖 Generated with Claude Code
drafted by Claude on behalf of Daniel Stephenson