minio / warp

S3 benchmarking tool

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

clean up: always sending x-amz-bypass-governance-retention

bentsku opened this issue · comments

Hi and thank you so much for this very useful tool, it is really awesome!

It seems there's an issue with the cleanup, it always sends the x-amz-bypass-governance-retention header, but AWS or other tools will respond with an exception:Invalid argument: x-amz-bypass-governance-retention is only applicable to Object Lock enabled buckets.

It seems it is here:

errCh := cl.RemoveObjects(ctx, c.Bucket, objectsCh, minio.RemoveObjectsOptions{GovernanceBypass: true})

One fix would be to validate if the bucket has it enabled beforehand with a call to GeObjectLockConfiguration. I'm not very proficient in go, I could try to have a look.

Thanks again for this excellent tool!