Simplify location parsing, remove socket: remainders#9754
Open
ThomasWaldmann wants to merge 2 commits into
Open
Simplify location parsing, remove socket: remainders#9754ThomasWaldmann wants to merge 2 commits into
ThomasWaldmann wants to merge 2 commits into
Conversation
For sftp/http(s)/s3/b2/rclone repositories, borg only detects the scheme now and hands the raw URL to borgstore, which parses and validates it - removing the duplicate parsing borg used to do. Precise field extraction (user/host/ port/path) is kept only for the protocols borg itself reads: file, rest and legacy ssh. - drop http_re, s3_re, rclone_re and the sftp arm of the old ssh_or_sftp_re - add a single scheme-detection pass-through against BORGSTORE_SCHEMES; reject unknown schemes (e.g. socket://) as before - canonical_path() returns the processed URL for the delegated protocols, with embedded credentials stripped so secrets never reach the security state file or logs - source local_path_re's scheme exclusions from BORGSTORE_SCHEMES - create: use proto == "file" instead of "not location.host" for the local repo-dir inode skip Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The unix-socket transport (socket:// repositories, the --socket option and "borg serve" over a socket) was never part of a stable borg 2 release and the old RPC protocol it relied on is gone, so the remaining code was dead: - legacy remote: drop the unreachable proto == "socket" connection branch and the now-unused self.sock handling, "import socket" and get_socket_filename import (LegacyRemoteRepository is only built for proto == "ssh") - helpers: remove get_socket_filename() and its export - parseformat: drop "socket" from local_path_re - socket:// is now treated like any other unknown scheme (a local path) rather than being special-cased - tests: drop test_socket and the self.sock check in the legacy reopen helper - docs: drop the stale --socket entry from the manually maintained common-options.rst.inc (the auto-generated usage/man docs are left untouched here and will be rebuilt in a separate commit) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #9754 +/- ##
==========================================
+ Coverage 84.86% 85.00% +0.14%
==========================================
Files 92 92
Lines 14968 14923 -45
Branches 2233 2227 -6
==========================================
- Hits 12702 12686 -16
+ Misses 1572 1545 -27
+ Partials 694 692 -2 ☔ View full report in Codecov by Harness. |
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.
No description provided.