From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 213331FF17A for ; Tue, 11 Nov 2025 15:02:25 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 80312C2FB; Tue, 11 Nov 2025 15:02:44 +0100 (CET) Date: Tue, 11 Nov 2025 15:02:03 +0100 From: Fabian =?iso-8859-1?q?Gr=FCnbichler?= To: Proxmox Backup Server development discussion References: <20250916145220.727899-1-c.ebner@proxmox.com> In-Reply-To: <20250916145220.727899-1-c.ebner@proxmox.com> MIME-Version: 1.0 User-Agent: astroid/0.17.0 (https://github.com/astroidmail/astroid) Message-Id: <1762869704.fl089ua6rc.astroid@yuna.none> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1762869703677 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 SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pbs-devel] [PATCH proxmox] s3-client: drop unused optional object list v2 response fields 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" looks sensible, but needs a rebase ;) please add the corresponding bug to the commit title if you respin! On September 16, 2025 4:52 pm, Christian Ebner wrote: > The ListObjectsV2 Response contains fields as bucket name, number of > keys, number of max keys of the response and prefix of the response > keys [0]. Since the AWS S3 API reference documentation does not > explicitly mention these fields as required, they are to be > considered optional and because they are currently not used other > than for response deserialization which will fail if missing, drop > these fields for now. > > Fixes: https://forum.proxmox.com/threads/171899/ > Signed-off-by: Christian Ebner > --- > proxmox-s3-client/src/response_reader.rs | 24 ------------------------ > 1 file changed, 24 deletions(-) > > diff --git a/proxmox-s3-client/src/response_reader.rs b/proxmox-s3-client/src/response_reader.rs > index c00c7bd4..c705c104 100644 > --- a/proxmox-s3-client/src/response_reader.rs > +++ b/proxmox-s3-client/src/response_reader.rs > @@ -21,14 +21,6 @@ pub(crate) struct ResponseReader { > pub struct ListObjectsV2Response { > /// Parsed http date header from response. > pub date: Option, > - /// Bucket name. > - pub name: String, > - /// Requested key prefix. > - pub prefix: String, > - /// Number of keys returned in this response. > - pub key_count: u64, > - /// Number of max keys the response can contain. > - pub max_keys: u64, > /// Flag indication if response was truncated because of key limits. > pub is_truncated: bool, > /// Token used for this request to get further keys in truncated responses. > @@ -44,14 +36,6 @@ pub struct ListObjectsV2Response { > /// Subset of items used to deserialize a list objects v2 respsonse. > /// https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html#API_ListObjectsV2_ResponseSyntax > struct ListObjectsV2ResponseBody { > - /// Bucket name. > - pub name: String, > - /// Requested key prefix. > - pub prefix: String, > - /// Number of keys returned in this response. > - pub key_count: u64, > - /// Number of max keys the response can contain. > - pub max_keys: u64, > /// Flag indication if response was truncated because of key limits. > pub is_truncated: bool, > /// Token used for this request to get further keys in truncated responses. > @@ -66,10 +50,6 @@ impl ListObjectsV2ResponseBody { > fn with_optional_date(self, date: Option) -> ListObjectsV2Response { > ListObjectsV2Response { > date, > - name: self.name, > - prefix: self.prefix, > - key_count: self.key_count, > - max_keys: self.max_keys, > is_truncated: self.is_truncated, > continuation_token: self.continuation_token, > next_continuation_token: self.next_continuation_token, > @@ -550,10 +530,6 @@ fn parse_list_objects_v2_response_test() { > > "#; > let result: ListObjectsV2ResponseBody = serde_xml_rs::from_str(&response_body).unwrap(); > - assert_eq!(result.name, "bucket0"); > - assert_eq!(result.prefix, ".cnt"); > - assert_eq!(result.key_count, 2); > - assert_eq!(result.max_keys, 1000); > assert_eq!(result.is_truncated, false); > assert_eq!( > result.contents.unwrap(), > -- > 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