Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing headers in delete response when versioning is suspended #85

Open
jewharton opened this issue Oct 7, 2024 · 1 comment
Open
Labels
bug Something isn't working edge

Comments

@jewharton
Copy link
Contributor

Description

The x-amz-delete-marker and x-amz-version-id headers are missing from responses to DeleteObject requests that are made against buckets with versioning suspended.

Reproduction steps

  1. Create a bucket.
  2. Enable bucket versioning.
  3. Suspend bucket versioning.
  4. Upload an object.
  5. Delete the object, specifying only its name and not its version so that a delete marker will be created.
  6. Inspect the deletion response.

Using AWS CLI

aws s3api create-bucket --bucket my-bucket
aws s3api put-bucket-versioning --bucket my-bucket --versioning-configuration Status=Enabled
aws s3api put-bucket-versioning --bucket my-bucket --versioning-configuration Status=Suspended
aws s3api put-object --bucket my-bucket --body test.txt --key test.txt
aws s3api delete-object --bucket my-bucket --key test.txt

Expected behavior

I expected to receive a response containing the missing headers. In AWS CLI, the output should resemble this:

{
    "DeleteMarker": true,
    "VersionId": "null"
}

Actual behavior

The response does not contain the header, and the AWS CLI output is empty.

Environment

Links

@jewharton jewharton added bug Something isn't working edge labels Oct 7, 2024
@jewharton
Copy link
Contributor Author

  • MinIO doesn't set these headers if a version ID isn't provided in the info returned from the gateway. [link]
  • Uplink refuses to return the version IDs of objects that aren't either 1) committed and versioned, or 2) a versioned delete marker. [link] This, in turn, prevents the gateway from returning them.

This means that unversioned delete markers (delete markers made in versioning-suspended buckets) will never have their version IDs passed to MinIO in this situation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working edge
Projects
None yet
Development

No branches or pull requests

1 participant