* [pbs-devel] [PATCH proxmox v2] fix #7008: s3-client: drop unused optional object list v2 response fields
@ 2025-11-11 14:47 Christian Ebner
2025-11-11 15:08 ` Fabian Grünbichler
2025-11-11 15:25 ` [pbs-devel] applied: " Fabian Grünbichler
0 siblings, 2 replies; 4+ messages in thread
From: Christian Ebner @ 2025-11-11 14:47 UTC (permalink / raw)
To: pbs-devel
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/
Fixes: https://bugzilla.proxmox.com/show_bug.cgi?id=7008
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
changes since version 1:
- include issue which fixes this as well
- rebased onto current master
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 bc01db6a..47fcd129 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<HttpDate>,
- /// 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<HttpDate>) -> 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() {
</ListBucketResult>
"#;
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!(!result.is_truncated);
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [pbs-devel] [PATCH proxmox v2] fix #7008: s3-client: drop unused optional object list v2 response fields
2025-11-11 14:47 [pbs-devel] [PATCH proxmox v2] fix #7008: s3-client: drop unused optional object list v2 response fields Christian Ebner
@ 2025-11-11 15:08 ` Fabian Grünbichler
2025-11-11 15:20 ` Christian Ebner
2025-11-11 15:25 ` [pbs-devel] applied: " Fabian Grünbichler
1 sibling, 1 reply; 4+ messages in thread
From: Fabian Grünbichler @ 2025-11-11 15:08 UTC (permalink / raw)
To: Proxmox Backup Server development discussion
On November 11, 2025 3:47 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.
do we expect to have a use case for the mat some point? then it might be
better to make them optional instead of dropping them altogether?
(not a nack, just a question ;))
>
> Fixes: https://forum.proxmox.com/threads/171899/
> Fixes: https://bugzilla.proxmox.com/show_bug.cgi?id=7008
> Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
> ---
> changes since version 1:
> - include issue which fixes this as well
> - rebased onto current master
>
> 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 bc01db6a..47fcd129 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<HttpDate>,
> - /// 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<HttpDate>) -> 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() {
> </ListBucketResult>
> "#;
> 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!(!result.is_truncated);
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [pbs-devel] [PATCH proxmox v2] fix #7008: s3-client: drop unused optional object list v2 response fields
2025-11-11 15:08 ` Fabian Grünbichler
@ 2025-11-11 15:20 ` Christian Ebner
0 siblings, 0 replies; 4+ messages in thread
From: Christian Ebner @ 2025-11-11 15:20 UTC (permalink / raw)
To: Proxmox Backup Server development discussion, Fabian Grünbichler
On 11/11/25 4:08 PM, Fabian Grünbichler wrote:
> On November 11, 2025 3:47 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.
>
> do we expect to have a use case for the mat some point? then it might be
> better to make them optional instead of dropping them altogether?
>
> (not a nack, just a question ;))
No, that was also a reason to rather drop them (and thereby skip
serialization) instead of making them optional here. They were only
added during initial development because they seemed to be relevant
enough to de-serialize, but then never actually used.
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pbs-devel] applied: [PATCH proxmox v2] fix #7008: s3-client: drop unused optional object list v2 response fields
2025-11-11 14:47 [pbs-devel] [PATCH proxmox v2] fix #7008: s3-client: drop unused optional object list v2 response fields Christian Ebner
2025-11-11 15:08 ` Fabian Grünbichler
@ 2025-11-11 15:25 ` Fabian Grünbichler
1 sibling, 0 replies; 4+ messages in thread
From: Fabian Grünbichler @ 2025-11-11 15:25 UTC (permalink / raw)
To: pbs-devel, Christian Ebner
On Tue, 11 Nov 2025 15:47:23 +0100, 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.
>
> [...]
Applied, thanks!
[1/1] fix #7008: s3-client: drop unused optional object list v2 response fields
commit: eb559d8718fad4338edb71f4329b060a0f6c17bb
Best regards,
--
Fabian Grünbichler <f.gruenbichler@proxmox.com>
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-11-11 15:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-11 14:47 [pbs-devel] [PATCH proxmox v2] fix #7008: s3-client: drop unused optional object list v2 response fields Christian Ebner
2025-11-11 15:08 ` Fabian Grünbichler
2025-11-11 15:20 ` Christian Ebner
2025-11-11 15:25 ` [pbs-devel] applied: " Fabian Grünbichler
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.