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 CD5D31FF17A for ; Tue, 11 Nov 2025 15:14:41 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id C91B9CBD7; Tue, 11 Nov 2025 15:15:27 +0100 (CET) Date: Tue, 11 Nov 2025 15:15:18 +0100 From: Fabian =?iso-8859-1?q?Gr=FCnbichler?= To: Proxmox Backup Server development discussion References: <20251020091559.106203-1-c.ebner@proxmox.com> In-Reply-To: <20251020091559.106203-1-c.ebner@proxmox.com> MIME-Version: 1.0 User-Agent: astroid/0.17.0 (https://github.com/astroidmail/astroid) Message-Id: <1762870508.7srw3wyq2u.astroid@yuna.none> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1762870498077 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 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [proxmox.com] Subject: [pbs-devel] applied: [PATCH proxmox] s3-client: make storage class in list objects v2 response optional 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" thanks! On October 20, 2025 11:15 am, Christian Ebner wrote: > Some providers (e.g. Google cloud) do not include the storage class > field in list objects v2 responses. > > Make the storage field optional, so response parsing does not fail if > it is absent. > > Since the PBS S3 backend does not use this field, and is currently > the only user of the crate, no further code adaptions are necessary. > > Reported-by: https://forum.proxmox.com/threads/173256/ > Signed-off-by: Christian Ebner > --- > proxmox-s3-client/src/response_reader.rs | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/proxmox-s3-client/src/response_reader.rs b/proxmox-s3-client/src/response_reader.rs > index afe501d5..bc01db6a 100644 > --- a/proxmox-s3-client/src/response_reader.rs > +++ b/proxmox-s3-client/src/response_reader.rs > @@ -92,7 +92,7 @@ pub struct ListObjectsV2Contents { > /// Content size of object. > pub size: u64, > /// Storage class the object is stored on. > - pub storage_class: String, > + pub storage_class: Option, > } > > #[derive(Debug)] > @@ -563,14 +563,14 @@ fn parse_list_objects_v2_response_test() { > last_modified: LastModifiedTimestamp::from_str("2011-02-26T01:56:20.000Z").unwrap(), > e_tag: "\"bf1d737a4d46a19f3bced6905cc8b902\"".to_string(), > size: 10, > - storage_class: "STANDARD".to_string(), > + storage_class: Some("STANDARD".to_string()), > }, > ListObjectsV2Contents { > key: S3ObjectKey::try_from("/.cnt/key1").unwrap(), > last_modified: LastModifiedTimestamp::from_str("2011-02-26T01:56:20.000Z").unwrap(), > e_tag: "\"9b2cf535f27731c974343645a3985328\"".to_string(), > size: 20, > - storage_class: "STANDARD".to_string(), > + storage_class: Some("STANDARD".to_string()), > }, > ] > ); > -- > 2.47.3 > > > > _______________________________________________ > 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