Skip to content

[hotfix][runtime] Reject raw bytes from PyFlink inputs - #1075

Merged
wenjin272 merged 1 commit into
apache:mainfrom
wenjin272:codex/python-input-type-validation
Aug 31, 2026
Merged

[hotfix][runtime] Reject raw bytes from PyFlink inputs#1075
wenjin272 merged 1 commit into
apache:mainfrom
wenjin272:codex/python-input-type-validation

Conversation

@wenjin272

@wenjin272 wenjin272 commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Linked issue: N/A (hotfix)

Purpose of change

Python agent execution expects input values to use PyFlink's default pickle representation, but this contract was not enforced at the Java bridge. As a result, explicitly typed inputs could reach the bridge in an unsupported representation.

This change validates the PyFlink keyed-stream input type before constructing the agent operator. It accepts values described by PickledByteArrayTypeInfo and rejects raw byte-array and other explicitly typed values with an actionable error. The Row-field validation is shared by the existing key check and the new
value check.

Tests

  • mvn --batch-mode --no-transfer-progress -pl runtime -am test
    • API: 376 tests, 0 failures, 0 errors, 11 skipped.
    • Plan: 288 tests, 0 failures, 0 errors, 1 skipped.
    • Runtime: 751 tests, 0 failures, 0 errors, 0 skipped.
  • Inspected real PyFlink graph types: explicitly typed raw bytes use PrimitiveArrayTypeInfo, while default Python objects use PickledByteArrayTypeInfo.
  • git diff --check

API

No public APIs are changed. Unsupported raw byte-array inputs now fail early with guidance to convert them through a Python operator using the default pickle output type.

Documentation

  • doc-needed
  • doc-not-needed
  • doc-included

Was this patch authored or co-authored using generative AI tooling?

  • Yes
  • No

Generated-by: OpenAI Codex 0.144.5 (GPT-5)

Validate PyFlink value type information before building the agent operator so only the supported pickled representation reaches Python deserialization. Add regression coverage for pickled, explicit, and malformed input types.

Generated-by: OpenAI Codex 0.144.5 (GPT-5)

Co-authored-by: Codex <codex@openai.com>
@github-actions github-actions Bot added doc-not-needed Your PR changes do not impact docs fixVersion/0.4.0 priority/major Default priority of the PR or issue. and removed doc-not-needed Your PR changes do not impact docs labels Aug 31, 2026
@wenjin272 wenjin272 changed the title [hotfix][runtime][java] Reject raw bytes from PyFlink inputs [hotfix][runtime]Reject raw bytes from PyFlink inputs Aug 31, 2026
@wenjin272 wenjin272 changed the title [hotfix][runtime]Reject raw bytes from PyFlink inputs [hotfix][runtime] Reject raw bytes from PyFlink inputs Aug 31, 2026
@github-actions github-actions Bot added doc-not-needed Your PR changes do not impact docs and removed doc-not-needed Your PR changes do not impact docs labels Aug 31, 2026
@wenjin272
wenjin272 merged commit 169de4a into apache:main Aug 31, 2026
58 of 59 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-not-needed Your PR changes do not impact docs fixVersion/0.4.0 priority/major Default priority of the PR or issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant