Repository navigation
feat(workflow-core): require bucket and key in LargeBinary - #9634
Draft
Matthew-DWM wants to merge 1 commit into
Draft
Matthew-DWM wants to merge 1 commit into
Matthew-DWM wants to merge 1 commit into
Conversation
The LargeBinary constructor only checked for null and the "s3://" prefix, so references such as "s3://bucket", "s3://bucket/" or "s3:///object" were accepted and failed later, when a stream reached S3, or, once the Python check lands, in the next Python operator. The constructor now parses the URI and rejects it when java.net.URI finds no host or the path is empty after removing every leading slash, with the Python check's wording: "LargeBinary URI must include a bucket and object key, got: <uri>". A URI that java.net.URI cannot parse, including a bare "s3://" on JDK 17, is rejected as "not a valid URI", with the parse error as the cause. Bucket names containing "_", which java.net.URI reads as having no host and the getters cannot use either, are now rejected too.
Contributor
Automated Reviewer SuggestionsBased on the
|
Matthew-DWM
marked this pull request as draft
November 23, 2026 17:49
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this PR?
The JVM
LargeBinaryconstructor only checked for null and thes3://prefix, sos3://bucket,s3://bucket/ands3:///objectwere accepted and failed later at S3 (or, once #9626 lands, in the next Python operator). It now parses the URI withjava.net.URI, reading the bucket and key as the getters do, and throwsIllegalArgumentExceptionnaming the URI when either is empty. As in #9626, all leading slashes are stripped first, sos3://bucket//ands3://bucket/?versionId=1are rejected too.Behavior changes:
LARGE_BINARYfield, read back from Iceberg or deserialized. URIs minted bynew LargeBinary()always have a key.java.net.URIcannot parse, including a bares3://on JDK 17, getsLargeBinary URI is not a valid URI, got: ...with the parse error as the cause._is rejected:java.net.URIreads no host from it, so the getters already returnednull, and S3 bucket names can't contain_.Any related issues, documentation, discussions?
Closes #9625. JVM side of #9626 (for #8279).
How was this PR tested?
In
LargeBinarySpec, the case that pinneds3://bucket-onlyas accepted now expects rejection. New tests check the exact messages for six incomplete URIs and two unparseable ones, a keyless JSON payload, and that keys ending in/or holding non-ASCII characters are still accepted. The new tests were written before the fix and all pass with it; 3 of them fail on main withExpected exception ... but no exception was thrown.With JDK 17 and Docker running, using CI's commands:
The service modules built on
workflow-corepass too, andWorkflowCore/jacococovers every changed line and branch.Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 5.5)