Repository navigation
mirror-check: one rclone copy --checksum per branch, drop unused options - #1654
Merged
Merged
Conversation
AskAlexSharov
approved these changes
Nov 23, 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.
Follow-up to #1647, from the review in #1647 (comment).
Change
rclone copy --checksumper branch replaces the compare / copy / verify rounds (compare,count_extra,toml_count). Report-only runs add--dry-run.--checksumcompares size and MD5. The tomls are single-part uploads, so R2's ETag is their MD5 and comes with the listing: only the differing files are sent, and rclone checks each upload.--combinedgives the per-file result also with--dry-run:+/*are the files copied (or out of sync),-the files only in the bucket (the note column).REMOTE_TYPE(the check now requiress3),EXCLUDE_PATTERNS, and theMIRROR_CHECK_*repository variables.main release/*and 90 days are now constants in the script. Thebranchesinput still covers one-off runs.test_notificationinput and its 7 conditions. To test the webhook after a rotation, send one request to it by hand.The script is 64 lines shorter (247 → 183), the workflow 16 (129 → 113). The report, the alerts and the exit status keep their meaning.
Tested
Locally, with a stubbed rclone (copy with
--checksum,--combined,--dry-run) and a local git repo: in sync; a differing, a missing and a bucket-only file (repaired / reported, note1 toml files only in the bucket); report-only (no alert, bucket unchanged); a new branch (published); an old branch (skipped); a published branch without tomls; a failed copy (FAILED, exit 1, account id redacted); a remote of the wrong type (exit 1); thebranchesfilter.bash -nand the workflow YAML parse. ShellCheck was not run locally.The report-only run on this PR exercises the new rclone command against the bucket.