aka-dag opened a new pull request, #867: URL: https://github.com/apache/flink-agents/pull/867
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. <!-- * Thank you very much for contributing to Flink Agents. * Please add the relevant components in the PR title. E.g., [api], [runtime], [java], [python], [hotfix], etc. --> <!-- Please link the PR to the relevant issue(s). Hotfix doesn't need this. --> 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 <!-- Do not remove this section. Check the proper box only. --> - [ ] `doc-needed` <!-- Your PR changes impact docs --> - [x] `doc-not-needed` <!-- Your PR changes do not impact docs --> - [ ] `doc-included` <!-- Your PR already contains the necessary documentation updates --> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
