Delete object doesn't check conditions
kvrhdn opened this issue · comments
Hi, thanks for this project, it's been really helpful for us!
I noticed that conditions are not checked when you delete an object. When we create or update objects conditions work as expected.
I'm sending a request with an invalid version 123
:
DELETE /storage/v1/b/tempo/o/overrides%2Fsingle-tenant%2Foverrides.json?alt=json&ifGenerationMatch=123&prettyPrint=false
This request should fail but it succeeds with a 200 and deletes the object.
Digging through the code it seems storageFS.DeleteObject
does not pass in conditions:
fake-gcs-server/internal/backend/fs.go
Lines 379 to 391 in 4f69521
Would the solution be as simple as passing in the Conditions
and checking them like you do in CreateObject
?
fake-gcs-server/internal/backend/fs.go
Line 199 in 4f69521
@fsouza Hi, are there any updates on that?