From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 2D0491FF164 for ; Fri, 22 Nov 2024 13:49:03 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 1E5D512785; Fri, 22 Nov 2024 13:49:12 +0100 (CET) MIME-Version: 1.0 In-Reply-To: <20241122103011.165010-1-c.ebner@proxmox.com> References: <20241122103011.165010-1-c.ebner@proxmox.com> From: Fabian =?utf-8?q?Gr=C3=BCnbichler?= To: Christian Ebner , pbs-devel@lists.proxmox.com Date: Fri, 22 Nov 2024 13:49:01 +0100 Message-ID: <173227974191.2118190.13647075496700342338@yuna.proxmox.com> User-Agent: alot/0.10 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.047 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pbs-devel] applied-series: [PATCH v5 proxmox-backup 0/5] introduce dedcated archive name api type X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Backup Server development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pbs-devel-bounces@lists.proxmox.com Sender: "pbs-devel" with two follow-up patches squashed in (acked by Chris), in order to keep the "constant" names for manifest, log, catalog and key via LazyLock, and a third patch extending the tests slightly added. Quoting Christian Ebner (2024-11-22 11:30:06) > There is currently no dedicated api type for the archive names, given > as input parameters to several api methods. > > This patches introduce a dedicated type for archive names, in order > to collect the code for checks and eventual mappings into one > location and reduce possible unintentional misuse by passing > incorrect argument values to the functions and methods consuming > the archive names. > > Further, drop all archive name constants in favor of helper methods on > the api type to generate `BackupArchiveName` instances for them. This > allows for direct comparison with other `BackupArchiveName` instances. > > As a positive side effect, the mapping now allows also for the server > archive type extensions to be optionally passed as input to several > commands, e.g. > ``` > proxmox-backup-client restore .pxar.didx > ``` > is now valid, being equal to > ``` > proxmox-backup-client restore > ``` > > Changes since version 4: > - Rebased onto current master > - Extended to newly introduced sync jobs in push direction > > Changes since version 3: > - Removed catchall fallback to blob type, reworked type parsing logic > - Removed archive name constants in favor of helper methods to generate > archive names for them > - Extended tests > > Changes since version 2: > - Rebased onto current master > - Amended commit messages > > Changes since version 1 (thanks @Gabriel): > - Rebased onto current master > - Added unit tests for archive name parsing > - Added missing check for invalid archive names ending with '/' > - Inlined variable names for format strings > - Import implemented traits at top > > Christian Ebner (5): > datastore: move `ArchiveType` to api types > api types: introduce `BackupArchiveName` type > client/server: use dedicated api type for all archive names > client: drop unused parse_archive_type helper > api types: add unit tests for backup archive name parsing > > pbs-api-types/src/datastore.rs | 238 ++++++++++++++++++++++++++- > pbs-client/src/backup_reader.rs | 18 +- > pbs-client/src/backup_writer.rs | 43 +++-- > pbs-client/src/pxar/tools.rs | 3 +- > pbs-client/src/tools/mod.rs | 28 ++-- > pbs-datastore/src/backup_info.rs | 22 +-- > pbs-datastore/src/datastore.rs | 7 +- > pbs-datastore/src/lib.rs | 3 - > pbs-datastore/src/manifest.rs | 55 +++---- > pbs-datastore/src/snapshot_reader.rs | 11 +- > proxmox-backup-client/src/catalog.rs | 35 ++-- > proxmox-backup-client/src/helper.rs | 7 +- > proxmox-backup-client/src/main.rs | 138 +++++++++------- > proxmox-backup-client/src/mount.rs | 33 ++-- > proxmox-file-restore/src/main.rs | 13 +- > src/api2/admin/datastore.rs | 70 ++++---- > src/api2/backup/mod.rs | 3 +- > src/api2/reader/mod.rs | 7 +- > src/api2/tape/restore.rs | 17 +- > src/backup/mod.rs | 3 - > src/backup/verify.rs | 7 +- > src/bin/proxmox_backup_debug/diff.rs | 16 +- > src/server/pull.rs | 24 +-- > src/server/push.rs | 31 ++-- > src/server/sync.rs | 11 +- > tests/prune.rs | 5 +- > 26 files changed, 539 insertions(+), 309 deletions(-) > > -- > 2.39.5 > > > > _______________________________________________ > pbs-devel mailing list > pbs-devel@lists.proxmox.com > https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel > > _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel