aboutsummaryrefslogtreecommitdiff
path: root/src/api/s3_put.rs
Commit message (Collapse)AuthorAgeFilesLines
* First implementation of K2V (#293)Alex2022-05-101-753/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | **Specification:** View spec at [this URL](https://git.deuxfleurs.fr/Deuxfleurs/garage/src/branch/k2v/doc/drafts/k2v-spec.md) - [x] Specify the structure of K2V triples - [x] Specify the DVVS format used for causality detection - [x] Specify the K2V index (just a counter of number of values per partition key) - [x] Specify single-item endpoints: ReadItem, InsertItem, DeleteItem - [x] Specify index endpoint: ReadIndex - [x] Specify multi-item endpoints: InsertBatch, ReadBatch, DeleteBatch - [x] Move to JSON objects instead of tuples - [x] Specify endpoints for polling for updates on single values (PollItem) **Implementation:** - [x] Table for K2V items, causal contexts - [x] Indexing mechanism and table for K2V index - [x] Make API handlers a bit more generic - [x] K2V API endpoint - [x] K2V API router - [x] ReadItem - [x] InsertItem - [x] DeleteItem - [x] PollItem - [x] ReadIndex - [x] InsertBatch - [x] ReadBatch - [x] DeleteBatch **Testing:** - [x] Just a simple Python script that does some requests to check visually that things are going right (does not contain parsing of results or assertions on returned values) - [x] Actual tests: - [x] Adapt testing framework - [x] Simple test with InsertItem + ReadItem - [x] Test with several Insert/Read/DeleteItem + ReadIndex - [x] Test all combinations of return formats for ReadItem - [x] Test with ReadBatch, InsertBatch, DeleteBatch - [x] Test with PollItem - [x] Test error codes - [ ] Fix most broken stuff - [x] test PollItem broken randomly - [x] when invalid causality tokens are given, errors should be 4xx not 5xx **Improvements:** - [x] Descending range queries - [x] Specify - [x] Implement - [x] Add test - [x] Batch updates to index counter - [x] Put K2V behind `k2v` feature flag Co-authored-by: Alex Auvolat <alex@adnab.me> Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/293 Co-authored-by: Alex <alex@adnab.me> Co-committed-by: Alex <alex@adnab.me>
* Move block manager to separate moduleAlex Auvolat2022-03-231-1/+1
|
* garage_api: Handle streaming payload early in request handlingKokaKiwi2022-03-231-51/+4
|
* Support for PostObject (#222)trinity-1686a2022-02-211-16/+38
| | | | | | | | | | | | | | | | | | Add support for [PostObject](https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPOST.html) - [x] routing PostObject properly - [x] parsing multipart body - [x] validating signature - [x] validating policy - [x] validating content length - [x] actually saving data Co-authored-by: trinity-1686a <trinity@deuxfleurs.fr> Co-authored-by: Trinity Pointard <trinity.pointard@gmail.com> Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/222 Reviewed-by: Alex <alex@adnab.me> Co-authored-by: trinity-1686a <trinity.pointard@gmail.com> Co-committed-by: trinity-1686a <trinity.pointard@gmail.com>
* Add restriction on part ordering in CompleteMultipartUploadv0.6.0-rc1get-head-part-numberAlex Auvolat2022-01-251-0/+11
|
* Multipart improvementsAlex Auvolat2022-01-241-5/+33
| | | | | - support part_number for HeadObject - add checks in complete_multipart_upload
* Fix Multipart Upload with WinSCP (#164) (#193)Jill2022-01-171-2/+7
| | | | | | | | Closes #164. Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/193 Co-authored-by: Jill <kokakiwi@deuxfleurs.fr> Co-committed-by: Jill <kokakiwi@deuxfleurs.fr>
* Support STREAMING-AWS4-HMAC-SHA256-PAYLOAD (#64) (#156)Jill2022-01-171-23/+87
| | | | | | | | Closes #64. Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/156 Co-authored-by: Jill <kokakiwi@deuxfleurs.fr> Co-committed-by: Jill <kokakiwi@deuxfleurs.fr>
* Add quotes in returned etagsimprove-copiesAlex Auvolat2022-01-131-1/+1
|
* Implement UploadPartCopyAlex Auvolat2022-01-131-4/+17
|
* Implement ListMultipartUploads (#171)Quentin2022-01-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Implement ListMultipartUploads, also refactor ListObjects and ListObjectsV2. It took me some times as I wanted to propose the following things: - Using an iterator instead of the loop+goto pattern. I find it easier to read and it should enable some optimizations. For example, when consuming keys of a common prefix, we do many [redundant checks](https://git.deuxfleurs.fr/Deuxfleurs/garage/src/branch/main/src/api/s3_list.rs#L125-L156) while the only thing to do is to [check if the following key is still part of the common prefix](https://git.deuxfleurs.fr/Deuxfleurs/garage/src/branch/feature/s3-multipart-compat/src/api/s3_list.rs#L476). - Try to name things (see ExtractionResult and RangeBegin enums) and to separate concerns (see ListQuery and Accumulator) - An IO closure to make unit tests possibles. - Unit tests, to track regressions and document how to interact with the code - Integration tests with `s3api`. In the future, I would like to move them in Rust with the aws rust SDK. Merging of the logic of ListMultipartUploads and ListObjects was not a goal but a consequence of the previous modifications. Some points that we might want to discuss: - ListObjectsV1, when using pagination and delimiters, has a weird behavior (it lists multiple times the same prefix) with `aws s3api` due to the fact that it can not use our optimization to skip the whole prefix. It is independant from my refactor and can be tested with the commented `s3api` tests in `test-smoke.sh`. It probably has the same weird behavior on the official AWS S3 implementation. - Considering ListMultipartUploads, I had to "abuse" upload id marker to support prefix skipping. I send an `upload-id-marker` with the hardcoded value `include` to emulate your "including" token. - Some ways to test ListMultipartUploads with existing software (my tests are limited to s3api for now). Co-authored-by: Quentin Dufour <quentin@deuxfleurs.fr> Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/171 Co-authored-by: Quentin <quentin@dufour.io> Co-committed-by: Quentin <quentin@dufour.io>
* Fix some error codesAlex Auvolat2022-01-051-8/+8
|
* New model for bucketsAlex Auvolat2022-01-041-22/+22
|
* add proper request router for s3 api (#163)trinity-1686a2021-12-061-6/+1
| | | | | | | | | | | | | fix #161 Current request router was organically grown, and is getting messier and messier with each addition. This router cover exaustively existing API endpoints (with exceptions listed in [#161(comment)](https://git.deuxfleurs.fr/Deuxfleurs/garage/issues/161#issuecomment-1773) either because new and old api endpoint can't feasabily be differentied, or it's more lambda than s3). Co-authored-by: Trinity Pointard <trinity.pointard@gmail.com> Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/163 Reviewed-by: Alex <alex@adnab.me> Co-authored-by: trinity-1686a <trinity.pointard@gmail.com> Co-committed-by: trinity-1686a <trinity.pointard@gmail.com>
* Fix clippy lints (fix #121)Alex Auvolat2021-10-261-5/+5
|
* Improved XML serializationbetter_xmlAlex Auvolat2021-05-061-35/+17
| | | | | | - Use quick_xml and serde for all XML response returned by the S3 API. - Include tests for all structs used to generate XML - Remove old manual XML escaping function which was unsafe
* rename types to CamelCaseTrinity Pointard2021-05-031-3/+3
|
* fix clippy warnings on apiTrinity Pointard2021-05-031-16/+20
|
* Update dependenciesAlex Auvolat2021-03-161-4/+4
|
* Time and metadata improvementsAlex Auvolat2021-03-151-4/+22
|
* Fix race conditionAlex Auvolat2021-03-151-19/+24
|
* Implement table gc, currently for block_ref and version onlyAlex Auvolat2021-03-121-3/+1
|
* Fix merkle updater not being notified; improved loggingAlex Auvolat2021-03-121-2/+2
|
* Very minor changesAlex Auvolat2021-03-101-6/+4
|
* Correctly implement CompleteMultipartUpload with etag check of partsAlex Auvolat2021-03-101-19/+30
|
* Switch to blake2 sum for identifying blocks by their dataAlex Auvolat2021-03-101-27/+27
|
* Refactor model stuff, including cleaner CRDTsAlex Auvolat2021-03-101-18/+19
|
* Cargo fmtAlex Auvolat2021-02-231-8/+23
|
* rename hash() to sha256sum(), we might want to change it at some placesAlex Auvolat2021-02-211-15/+15
|
* Add verification of part numbers in CompleteMultipartUpload (WIP #30)Alex Auvolat2021-02-201-7/+52
|
* S3 compatibility: return 404 instead of 400 on some multipart commandsAlex Auvolat2021-02-191-13/+3
|
* Fix #28, extra headers being ignored (because of profound stupidity)Alex Auvolat2021-02-191-1/+3
|
* Small improvements in the S3 put workflowAlex Auvolat2021-02-191-39/+70
|
* Propose ETag fixbug/etagAlex Auvolat2020-12-051-1/+16
|
* Small optimisationAlex Auvolat2020-11-291-1/+1
|
* ETag patchAlex Auvolat2020-11-291-3/+7
|
* Small refactoringsAlex Auvolat2020-11-291-8/+2
|
* Also check hash for < 3KB filesbug/checksumsQuentin2020-11-221-0/+14
|
* Fix base64/hex checksum comparisonQuentin2020-11-221-44/+52
|
* Convert bucket table to better CRDT representationAlex Auvolat2020-11-201-1/+1
|
* Replace with option syntaxic sugarQuentin2020-11-111-24/+10
|
* Refactor error management in API parterror-refactoringAlex Auvolat2020-11-081-17/+15
|
* trace testAlex Auvolat2020-07-151-0/+8
|
* prettyAlex Auvolat2020-07-151-6/+9
|
* Validate content MD5 and SHA256 sums for PutObject and UploadPartAlex Auvolat2020-07-151-15/+63
|
* Implement correct ETag for objects created with PutObjectAlex Auvolat2020-07-131-8/+20
|
* More headers taken into accountAlex Auvolat2020-07-091-8/+25
|
* cargo fmtAlex Auvolat2020-07-081-45/+50
|
* Migrate S3 api to use new modelAlex Auvolat2020-07-081-28/+44
|
* Update to Hyper 0.13.6 that accepts non-Sync streams in wrap_stream.Alex Auvolat2020-07-071-12/+11
| | | | Simplifies code and makes it possible to publish on crates.io