Skip to content

JVM large binary accepts incomplete S3 references #9625

Description

@Matthew-DWM

Feature Summary

The JVM LargeBinary constructor only checks the s3:// prefix. References with no bucket or no object key are accepted and fail later, when a stream calls S3. The Python largebinary is being changed to reject them (#8279), so a keyless reference built on the JVM would fail in the next Python operator instead.

Before: new LargeBinary("s3://bucket") is accepted with an empty object key

After: a reference must contain both a bucket and object key

Reproduction evidence:

LargeBinarySpec pins the bucket-only case as valid in "return an empty object key when the URI carries no path". On JDK 17 the getters return:

  • a null bucket for s3:///object;
  • an empty key for s3://bucket and s3://bucket/;
  • a thrown IllegalArgumentException for s3://.

Found while verifying the fix for #8279.

Proposed Solution or Design

Mirror the Python check, following LakeFSStorageClient.parsePhysicalAddress, which already makes this check for LakeFS addresses. Parse the URI in the constructor, wrapping any parse error, and throw IllegalArgumentException("LargeBinary URI must include a bucket and object key, got: " + uri) when the bucket is empty or the path is empty after removing all leading slashes, as Python does. Then change the bucket-only spec case to expect rejection.

Affected Area

Other, Workflow Engine (Amber)

Activity

  1. Matthew-DWM commented on Nov 22, 2026

    @Matthew-DWM
    Author

    /take

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions