Wrong error code for CompleteMultipartUpload when write condition fails
In Trino project we have a test using S3Mock.
We're upgrading to use S3Mock 4.10.0 to benefit from its support for S3 conditional writes.
We currently have two code paths for conditional writes with If-None-Match: *
- via
PutObjectrequest - via multi-part upload where write condition is verified in
CompleteMultipartUploadrequest
We noticed that in the second code path, when running with S3Mock 4.10.0, we get Status Code: 304 rather than 412 error code.
Did you test this against AWS S3? We have a few ITs to verify the current behaviour, and those passed against S3 as well (I validate all tests roughly once per year against S3) https://github.com/search?q=repo%3Aadobe%2FS3Mock%20if-none-match&type=code
Yes, AFAICT same test passed against AWS S3, Minio, LocalStack and Moto
have you had time to test this against S3 yet?
just wrote a new test that passes against S3 APIs.
S3Mock 4.x returns a 304 where it should return a 412 on CompleteMultipartRequests when the If-None-Match condition is true.
I just pushed a fix that will be released with the first 5.x release.