Fix rsync exit code 23 hint and container start retry logic#686
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #686 +/- ##
==========================================
- Coverage 92.30% 91.96% -0.35%
==========================================
Files 9 9
Lines 1091 1107 +16
==========================================
+ Hits 1007 1018 +11
- Misses 84 89 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Fixes two bugs reported by users after the 2.15.0 / 2.17.0 releases.
Changes
rsync exit code 23 — symlink hint (
backup.py)Exit code 23 (partial transfer) fires when the destination filesystem doesn't support symlinks. All regular files are still backed up. The error message now explains the cause and points at the fix:
Container start retry logic (
backup.py)Two bugs in
_start_container:returnbefore the recursive retry call — a successful retry always returnedFalseto the caller, incorrectly recording the container as failed even when it started fine.if status != "exited") was also triggered during retries when the container was in a legitimate transitional state (e.g.restarting). The fix splits the check:running→ never stopped; any other non-exitedstate → wait 2 s and retry (up to 3×).A comment listing the valid Docker container statuses (
created / restarting / running / paused / exited / dead) is included to make clear there is no"starting"state.Tests
Three new tests added to
pytest/test_backup.py:test_start_container_transitional_state_eventually_running— container inrestartingstate afterc.start()is retried and eventually reachesrunning; backup marked completed.test_start_container_retry_success_propagates— container start succeeds on attempt 2; backup marked completed (not failed), verifying the missing-returnfix.test_rsync_exit_code_23_includes_symlink_hint— exit code 23 error message contains the symlink hint and--no-linksreference.