Repository navigation
Java SDK: Reject byte arrays instead of hanging or failing silently - #74218
Merged
jason810496 merged 1 commit intoOct 15, 2026
Merged
Conversation
Signed-off-by: PoAn Yang <payang@apache.org>
FrankYang0529
force-pushed
the
airflow-java-sdk-reject-byte-array
branch
from
October 15, 2026 06:17
d6a58ff to
7570af2
Compare
jason810496
approved these changes
Oct 15, 2026
jason810496
left a comment
Member
There was a problem hiding this comment.
Nice, thanks for the improvement.
Contributor
Backport successfully created: v3-4-testNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
|
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.
Why
byte[], for example withclient.setXCom("payload", bytes)orclient.getTaskStateStore().set("key", bytes), doesn't return an error that explains the problem. What happens depends on the values of the bytes:0x80and0xDF, the supervisor rejects the byte array because the supervisor only accepts JSON values. The supervisor logsUnable to decode messageand doesn't reply, so the task doesn't finish on its own.0x80and0xDF, the frame is corrupted. ThepackByteArraywrote each byte withpackByte, which encodes a byte in that range as two bytes, but the bin header still declares the original array length. The supervisor of the task stops with an exception while decoding the frame, and the task fails with nothing in the task log.How
packAnythrowsIllegalArgumentExceptionfor aByteArray, including aByteArraynested in a map or list, before anything is written to the socket. The exception message asks the task author to encode the bytes as a string.Was generative AI tooling used to co-author this PR?