Skip to content

[python] Remove PyFlink gateway fallback from AgentConfigOptions#867

Open
aka-dag wants to merge 1 commit into
apache:mainfrom
aka-dag:fix/remove-config-options-java-gateway-fallback
Open

[python] Remove PyFlink gateway fallback from AgentConfigOptions#867
aka-dag wants to merge 1 commit into
apache:mainfrom
aka-dag:fix/remove-config-options-java-gateway-fallback

Conversation

@aka-dag

@aka-dag aka-dag commented Jul 3, 2026

Copy link
Copy Markdown

Python AgentConfigOptions used a metaclass to resolve missing options from Java via get_gateway(), which can fail during Pemja worker initialization. Declare config options explicitly in Python instead.

Linked issue: #866

Purpose of change

Python AgentConfigOptions used a metaclass fallback to resolve missing options from Java through pyflink.java_gateway.get_gateway(). This can start a PyFlink gateway while importing runtime modules inside the Pemja worker.
This change removes the Java-backed dynamic lookup and declares Python config options explicitly.

Tests

  • Added/updated Python option compatibility coverage.
  • Added regression coverage that importing runtime modules does not trigger get_gateway().
  • Ran ./tools/ut.sh -p.
  • Ran ./tools/lint.sh.

API

This changes the implementation of Python AgentConfigOptions. Publicly supported options remain accessible as explicit Python ConfigOption declarations. Dynamic access to Java-only options is removed.

Documentation

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

Python AgentConfigOptions used a metaclass to resolve missing options from
Java via get_gateway(), which can fail during Pemja worker initialization.
Declare config options explicitly in Python instead.
@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. labels Jul 3, 2026
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