Skip to content

S3: ListParts is unrouted, so GET ?uploadId falls through to GetObject and returns 404 NoSuchKey #551

Closed

Description

@scttfrdmn

Summary

ListParts is not routed. GET /<bucket>/<key>?uploadId=ID falls through to the
GetObject arm of parseS3Operation, so it looks for an object at the upload's key
and answers 404 NoSuchKey — even for an upload with parts successfully stored.

There is no listParts handler in the plugin at all (grep -rn 'listParts' emulator/
→ 0 hits), so this is a missing operation rather than a broken one.

Found while reproducing #532: ListParts is the natural way a caller diagnoses an
InvalidPart failure from CompleteMultipartUpload, and it is unavailable exactly
when it is most needed.

Reproducer

$ aws s3api create-multipart-upload --bucket lp-probe --key k
{"Bucket": "lp-probe", "Key": "k", "UploadId": "mpu-1785797912176650000"}

$ aws s3api upload-part --bucket lp-probe --key k --part-number 1 \
    --upload-id mpu-... --body /tmp/5mb        # succeeds

$ aws s3api list-parts --bucket lp-probe --key k --upload-id mpu-...
An error occurred (NoSuchKey) when calling the ListParts operation:
The specified key does not exist.

Raw wire confirms the misroute rather than an empty result:

$ curl -s -o - -w 'http=%{http_code}\n' \
    "http://localhost:4601/lp-probe/k2?uploadId=mpu-..."
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message>
<RequestId>SUBSTRATE</RequestId></Error>
http=404

Cause

parseS3Operation (emulator/s3_plugin.go:341-348) — the object-level GET arm
checks acl and tagging and then returns GetObject. It never checks uploadId.

Note the asymmetry with the sibling arms, which makes the omission clear: PUT
checks partNumber+uploadId → UploadPart (:337), DELETE checks uploadId
→ AbortMultipartUpload (:352), and POST checks uploadId →
CompleteMultipartUpload (:363). GET is the only multipart verb whose
uploadId check is missing.

The state to answer from already exists — uploadPart persists each part, and
completeMultipartUpload reads them back to assemble the object.

Acceptance criteria

Related

Activity

  1. added
    type: bug
    area: s3
    on Aug 3, 2026
  2. added this to the v0.90.0 milestone on Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: s3fidelitytype: bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions