Implement ListParts #194

Merged
quentin merged 3 commits from features/list-parts into main 2022-01-21 10:33:11 +00:00
Owner
  • Test structure output
  • Update documentation
  • Implement logic
  • Add unit tests
  • Add integration tests with s3api
  • Test with docker registry
- [X] Test structure output - [X] Update documentation - [X] Implement logic - [X] Add unit tests - [X] Add integration tests with s3api - [X] Test with docker registry
quentin force-pushed features/list-parts from 479c1596cf to 071caa57ae 2022-01-18 11:12:48 +00:00 Compare
quentin force-pushed features/list-parts from 071caa57ae to 5d2e40f398 2022-01-18 11:18:10 +00:00 Compare
quentin force-pushed features/list-parts from fa80e00807 to 1beca7c30e 2022-01-20 15:39:05 +00:00 Compare
quentin changed title from WIP: Implement ListParts to Implement ListParts 2022-01-20 15:39:56 +00:00
lx approved these changes 2022-01-20 16:20:28 +00:00
lx left a comment
Owner

LGTM

LGTM
@ -236,0 +266,4 @@
garage
.object_table
.get(&query.bucket_id, &query.key)
.map_err(Error::from),
Owner

I think we can remove map_err(Error::from) here and below as it is implied in the ? operator.

I think we can remove `map_err(Error::from)` here and below as it is implied in the `?` operator.
quentin marked this conversation as resolved
@ -236,0 +288,4 @@
.iter()
.map(|part| s3_xml::PartItem {
etag: s3_xml::Value(format!("\"{}\"", part.etag)),
last_modified: s3_xml::Value(msec_to_rfc3339(0)),
Owner

Rather than 0 I think here we should put the timestamp of the object version

Rather than 0 I think here we should put the timestamp of the object version
quentin marked this conversation as resolved
trinity-1686a reviewed 2022-01-20 16:40:20 +00:00
@ -297,0 +308,4 @@
key,
upload_id,
part_number_marker: part_number_marker.map(|p| min(10000, max(1, p))),
max_parts: max_parts.map(|p| min(1000, max(1, p))).unwrap_or(1000),

prefere using clamp, min(max(..)..) is unclear and very much subject to inverting bounds.

prefere using [`clamp`](https://doc.rust-lang.org/std/cmp/trait.Ord.html#method.clamp), min(max(..)..) is unclear and very much subject to inverting bounds.
quentin marked this conversation as resolved
quentin force-pushed features/list-parts from 1beca7c30e to 94f0e7c135 2022-01-21 09:42:49 +00:00 Compare
quentin merged commit 94f0e7c135 into main 2022-01-21 10:33:11 +00:00
quentin deleted branch features/list-parts 2022-01-21 10:33:11 +00:00
Sign in to join this conversation.
No reviewers
lx
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Deuxfleurs/garage#194
No description provided.